Keys-Concurrency Patch for DSpark + DeepSeek-V4-Flash/Pro
Correct in-server continuous-batch concurrency for DSpark speculative decoding on NVIDIA DGX Spark (GB10 / SM121).
Stock DSpark serving forces --max-num-seqs 1 — the upstream recipe states the DSpark draft path "stalls under max_num_seqs>1 in this build, so requests serialize. The win is depth (context), not width (concurrency)."
This patch removes that limitation. With it, DSpark serves multiple concurrent streams correctly under independent (staggered) request arrivals, while keeping single-stream output byte-identical to the unpatched engine.
Validated on DeepSeek-V4-Flash-DSpark, vLLM DSpark overlay (Rafael Caricio integration / TonyD2Wild packaging), TP=2 on 2× DGX Spark (GB10), 2026-06-29.
The patch is in the model-agnostic DSpark proposer/model code, so it is expected to apply to DeepSeek-V4-Pro-DSpark as well — but Pro is untested; please report results.
Results
Headline below; full single + dual-stack tables in RESULTS.md.
One stack = 2× DGX Spark (GB10), TP=2, kv-cache-dtype fp8, DSpark γ=5,
gpu-memory-utilization 0.80, max-num-seqs 16.
Concurrency unlocked (this patch) — one 2-Spark stack
| total concurrency | static (best-case) | staggered (real arrivals) | acceptance | errors |
|---|
| 1 | 49 tok/s | ~50 tok/s | ~0.6 | 0 |
| 4 | 122 tok/s | 104 tok/s | ~0.59 | 0 |
| 8 | 183 tok/s | 139 tok/s | ~0.56 | 0 |
| 16 | 290 tok/s | 191 tok/s | ~0.55 | 0 |
- Single-stream unchanged: ~50–54 tok/s, provably byte-identical output.
- Zero errors at every level; draft acceptance stays healthy (~0.55) — DSpark keeps accelerating under load.
Scaling out — 2 stacks (4 Sparks) measured
| total concurrency | 1 stack | 2 stacks | scaling |
|---|
| 32 | — | 375 tok/s (16+16, 32/32 ok) | ~1.96× |
Replicas scale ~linearly (independent stacks behind a least-connections router).
Correctness
A deterministic request (temperature 0, ignore_eos) produces byte-identical output whether run alone or while other requests start/finish around it (forcing continuous-batch condense). Run benchmarks/correctness_test.py.
What the patch does
Two root causes blocked max_num_seqs>1:
Patch 1 — request-stable KV slot.
DSpark's only persistent pe