•
4 min read

Running Qwen4-35B-A3B at 315 tok/s with a bare-metal C++ engine (and the two Blackwell bugs we hit)

Earlier today we tried serving Qwen4-35B-A3B on a DGX Spark with vLLM. Loading stalled on a surprise: the model carries a 20.5B per-layer embedding (PLE) table that vLLM pinned into host RAM outside --gpu-memory-utilization, eating all free memory until we offloaded it to disk.

Hours later, sfumato-ai/seppia merged PR #15 adding native Qwen4-35B-A3B support in bare-metal C++20 and CUDA. It tackles that exact bottleneck with zero Python: streaming the 20.5B PLE table from 2 MiB hugepages asynchronously behind layer 0 (0.00 GiB VRAM), compressing global KV with 2-bit SealKV (seal2), and pairing it with RadixArk/Qwen4-35B-A3B-Dflash2 block-diffusion speculation.

We built and benchmarked seppia (0b32b09) from source on both our DGX Spark (sm_121) and a rented RTX PRO 6000 Blackwell (sm_120, 96 GB). Neither ran out of the box—and both needed a one-line fix.

Two Blackwell bugs, two one-line fixes

  • DGX Spark (sm_121): All 317 targets compiled cleanly on aarch64 with CUDA 13.0, and 30/30 CPU tests passed. On L0 GPU tests, 3 of 15 (kernels_dense_gemv, kernels_attn_decode, kernels_bitlock) failed with cudaErrorInvalidClusterSize. Unlike RTX 5090 (sm_120), GB10 reports cudaDevAttrClusterLaunch != 0, causing seppia to pick cluster_reduce paths that fail on sm_121. Setting has_clusters = false for cc == 121 in src/gpu/cuda/device.cpp brought L0 to 15/15 passing (107.43 s).
  • RTX PRO 6000 (sm_120): Built cleanly (--preset sm120, 219 targets), then crashed on token generation with cudaErrorIllegalAddress regardless of --embed-host, kv=seal2/fp8, or --no-cuda-graphs. Under compute-sanitizer (4 tokens) and CUDA_LAUNCH_BLOCKING=1 (64 tokens), it ran with zero errors—pointing to an async race in Programmatic Dependent Launch (has_pdl). Setting f.has_pdl = false in device.cpp fixed it immediately, unlocking CUDA-graph execution at 245+ tok/s plain.

Measured throughput: DGX Spark vs RTX PRO 6000

Both machines ran the exact same Qwen4-35B-A3B-UD-IQ4_XS GGUF (--quant kv=seal2 --embed-host --ctx 65536), with RadixArk/Qwen4-35B-A3B-Dflash2 for speculative decoding (llm-serving-bench v3.3, 2 prompts per category, effort=low, 256 tokens):

Mode / SuiteDGX Spark (sm_121, ~273 GB/s)RTX PRO 6000 (sm_120, 96 GB)Speedup
Warm load + graph capture4.5 s4.7 s—
Plain chat / code (smoke)59.7 / 61.3 tok/s244.6 / 252.0 tok/s4.1×
DFlash2 smoke chat / code67.0 / 85.8 tok/s259.9 / 371.4 tok/s3.9–4.3×
DFlash2 mt_bench57.6 tok/s (2.22 tok/v)292.6 tok/s (3.03 tok/v)5.1×
DFlash2 translation54.9 tok/s (2.16 tok/v)412.8 tok/s (4.28 tok/v)7.5×
DFlash2 math_reasoning99.9 tok/s (3.98 tok/v)536.7 tok/s (5.51 tok/v)5.4×
DFlash2 12-prompt mean58.3 tok/s (2.30 tok/v)315.5 tok/s (3.39 tok/v)5.4×
DFlash2 1M ctx smoke (--ctx 1048576)65.5 / 84.1 tok/s258.8 / 372.7 tok/s4.0–4.4×

Single-stream decode tracks memory bandwidth closely. On Spark, DFlash2 still lifted code by +40% and math_reasoning by +63% (to 99.9 tok/s), while median TTFT dropped to 132.4 ms (39.1 ms on PRO 6000).

Why 1M context fits so easily

Qwen4-35B-A3B has 40 layers, of which 30 are Gated DeltaNet (fixed ~63.6 MiB state) and only 10 are Query-Sparse Attention (kv_heads=2, head_dim=256). Even in FP8, global KV plus seppia’s 4:1 compressed QSA index takes 10,560 B/token (~10.1 GiB at 1M). With seal2 (2-bit CPTC L=10 Viterbi trellis coding), that drops to 3,420 B/token—about 3.26 GiB for 1,048,576 tokens.

For production multi-user serving, seppia is still an early single-stream beta without a public license yet. For local single-stream speed and 1M-context experiments, it is already remarkably fast.

KV sizing breakdown and comparison with vLLM and Splash: tokenflow.dev/notes/qwen4-seppia-blackwell.