You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
SGLang + DFlash on DGX Spark (Qwen3-Coder-Next NVFP4)
Running Qwen3-Coder-Next-NVFP4-GB10 with DFlash speculative decoding on SGLang.
Tested on a Lenovo ThinkStation PGX (NVIDIA GB10 Grace Blackwell, 128 GB unified memory).
What you get
Test
SGLang DFlash
vLLM DFlash+Marlin
Delta
Short code (307 tok)
150 tok/s
108 tok/s
+38%
Medium code (917 tok)
81 tok/s
84 tok/s
-4%
Long code (1434 tok)
99 tok/s
—
—
Short-to-medium code generation is significantly faster. Long sequences are comparable.
Tool calling works (--tool-call-parser qwen3_coder).
Why SGLang instead of vLLM
DFlash was merged into SGLang on April 7 2026 (PR #22077). SGLang uses FlashInfer which has
native tree attention mask support — this makes the DFlash verification step faster than
vLLM's FlashAttention backend, especially for short sequences.
Any SGLang nightly after 2026-04-07 with cu13 tag should work. The NVIDIA container
(nvcr.io/nvidia/sglang:26.02-py3) ships 0.5.8 which does not have DFlash.
Two bugs in the SGLang nightly prevent Qwen3-Coder-Next NVFP4 from loading:
Bug 1: qwen3_next.py — GDN layers crash with compressed-tensors (NVFP4) quantization.
MergedColumnParallelLinear doesn't have a .weight attribute during init.
Startup takes about 5 minutes. Watch logs with docker logs -f sglang_production.
5. Test
curl http://localhost:8000/v1/chat/completions \
-H "Content-Type: application/json" \
-d '{ "model": "Qwen3-Coder-Next-DFlash", "messages": [{"role": "user", "content": "Write a binary search tree in Python."}], "max_tokens": 1024, "temperature": 0.0 }'
Notes
--mamba-scheduler-strategy extra_buffer is required — Qwen3-Next has hybrid GDN (recurrent) layers that need this scheduler mode for speculative decoding
DeepGEMM disabled — the scale format of this checkpoint doesn't match what DeepGEMM expects on Blackwell, causes accuracy degradation
FP4 backend auto-selects flashinfer_cudnn which is fastest on SM120. cutlass is ~15% slower
CUDA graphs: help long generations (+6%) but hurt short ones (-14%). I skip them for code generation workloads
mem-fraction-static 0.55 is conservative. You might go to 0.60 once stable, but I wouldn't go higher — unified memory OOM crashes require a physical power cycle
The API is OpenAI-compatible on port 8000 (mapped from internal 30000)