What actually made vLLM faster on a DGX Spark: 15 weeks of A/B tests
อ่านภาษาไทย
This post summarises fifteen weeks of experiments serving one model on one DGX Spark for a Thai hospital RAG pilot. Every number was measured on that box between 5 July and 15 October 2026 unless marked otherwise.
The short version: on a single local box, most of the speedups we chased turned out to be measurement noise. The gains that held up came from moving fewer bytes per token, from batch capacity and from speculative decoding.
At a glance
- 108.9 tok/s, Thai, one user (was 58.0 until October)
- 556 tok/s out, 32 streams (was 454 the same night)
- 2.9% drift between restarts of an identical config
- 2 of 6 repeat pairs agreed at temperature 0
Experiment journal, measurements of 31 July, 4 August and 15 October 2026
TL;DR
- Estimate a model’s speed from gigabytes per token, not parameter count. On this box, single-stream decode is roughly memory bandwidth divided by the bytes read per decode step. That estimate was enough to rule out most candidate models before downloading them.
- Three changes accounted for almost all the gain. Raising
--max-num-seqsfrom 4 to 32 roughly tripled aggregate throughput. MTP speculative decoding explains why vLLM beat SGLang. A lighter checkpoint on vLLM v0.28 took Thai decode from 58.0 to 108.9 tok/s. - Most other flags made no measurable difference. Restarting the same configuration moved the baseline by 2.9%, which is more than most of the effects we were testing.
- A faster checkpoint is not necessarily a correct one. Two quantized checkpoints were faster and smaller, and both dropped Thai tone marks. For one of them the cause turned out to be the tokenizer, not the weights.
- Temperature 0 did not give repeatable answers. In a small pilot, the same case returned the same codes in only 2 of 6 repeat pairs. We have not isolated the cause.
The setup
One NVIDIA DGX Spark serves the whole pilot: an ARM64 GB10 with a Blackwell SM121 GPU and 128 GB of unified memory. The model is Qwen3.6-35B-A3B, a mixture-of-experts model with about 3B active parameters per token, served by vLLM to at most ten concurrent staff users.
Staff may type patient information into prompts, so inference, embeddings, the vector index and chat history all stay on that one machine. There is no second node and no cloud fallback. Every capacity and quality question therefore became a measurement on the box itself.
The work ran as a series of same-day A/B tests in dependency order: serving parameters first, then the engine, then the model, then the quantization. Each verdict was written down with its evidence, including the many that said “no change”.
A mental model: the box is bandwidth-bound
Single-stream decode on this hardware is limited by how many bytes of weights each token has to read. The Spark’s unified memory is specified at about 273 GB/s, and we measured 233.6 GB/s as achievable. Divide that by the gigabytes read per decode step and you get a ceiling in tokens per second.
This is why MoE models suit the box and dense ones do not. A dense model reads every parameter on every step. An MoE reads its attention path, its output head and only the routed experts.

Experiment journal · GB per step read from safetensors headers; bandwidth 233.6 GB/s measured on the box
Three practical points follow.
- “Active parameters” is not the number that matters. Gemma 4’s MoE has 4B active parameters but reads 40% more bytes per step than the incumbent, because its output projection is larger and it routes 8 of 128 experts instead of 8 of 256.
- Two builds of the same model can differ by 40%. The RedHatAI and NVIDIA NVFP4 checkpoints have identical experts. The difference is the dense and attention path read every step: 3.39 GB against 1.77 GB.
- You can compute this before downloading. A safetensors file starts with a small JSON header listing every tensor’s dtype and shape. We read those headers over HTTP and sum only the tensors a text decode step touches. Hugging Face’s aggregate dtype counts are not a substitute: they are dominated by the vision tower and embeddings that decode never reads.
The ceiling is an upper bound on a bare decode step, so it can retire a candidate but never promote one. Speculative decoding emits more than one token per step, which is how the production figure ends up above its own ceiling.
The vLLM settings that mattered
Four settings changed behaviour on this box. Everything else we tried sits in the next two sections.
- Batch capacity. Raising
--max-num-seqsfrom 4 to 16 gave 2.3 times the aggregate throughput at concurrency 16. Going from 16 to 32 added a further 37% at concurrency 32, with zero failed requests. This was the largest single lever for a multi-user service. - KV cache dtype. We adopted
--kv-cache-dtype fp8_e4m3for memory safety at high concurrency with long context, after an earlier BF16 configuration exhausted unified RAM and crashed the box. - Memory utilisation decides the KV pool; context length does not. Raising
--max-model-lenfrom 131,072 to 262,144 changed the KV pool by 0.5%. What it changes is how many maximum-length requests fit at once. 262,144 is the checkpoint’s hard ceiling, set by its position embeddings. - Co-residency is bounded by context, not utilisation. A second vLLM instance for OCR aborted at boot with 49,152 context and booted cleanly at 16,384 beside the main model. On unified memory, fix the context length first.
Long context is cheap in memory and expensive in time.

Experiment journal · context-length study, 28 July 2026, idle-gated rows only
We left the desktop client’s default at 131,072 so that one pasted document cannot occupy the GPU for two minutes.
A sketch of the serving command, reconstructed from the knobs above. Treat it as a starting point and check each flag against your vLLM version.
vllm serve nvidia/Qwen3.6-35B-A3B-NVFP4 \
--tokenizer RedHatAI/Qwen3.6-35B-A3B-NVFP4 \
--max-num-seqs 32 \
--max-model-len 262144 \
--gpu-memory-utilization 0.70 \
--kv-cache-dtype fp8_e4m3 \
--speculative-config '{"method": "mtp", "num_speculative_tokens": 3}'
One prefix-caching detail is specific to hybrid models like this one. vLLM sets the attention block size to 2,112 tokens here, and prefix reuse happens per whole block. A 1,954-token prompt replayed three times hit the cache 0% of the time. An identical 16,519-token prompt hit exactly six blocks, and its prefill dropped from 2.70 s to 0.77 s. Short prompts are uncacheable by construction, so tidying their prefixes will not help.
Why vLLM won here: speculative decoding
vLLM beat SGLang on every end-to-end measure on the same checkpoint, and the reason was multi-token prediction (MTP), not raw kernel speed. Four engines were attempted in July. Two booted.
| Measure (July, same box, same prompts) | vLLM | SGLang |
|---|---|---|
| Single-stream decode (tok/s) | 53.3 | 35.6 |
| TTFT, single stream (ms) | 162 | 292 |
| TTFT p50 at concurrency 8 (ms) | 264 | 597 |
| Raw time per output token (ms) | 34.1 | 28.6 |
The last row is the instructive one. SGLang’s raw per-step time was better, yet it lost end to end, because vLLM’s MTP drafts were accepted 86% of the time and SGLang did not support MTP for this model. TensorRT-LLM and Ollama (llama.cpp) could not load the architecture at the time. We record those as blocked on model support, not rejected.
Two things we learned about MTP are worth passing on.
- The best draft depth depends on how heavy the base step is. On the 4.00 GB/step checkpoint, depth 1 was best and depth 3 cost speed. On the 2.38 GB/step checkpoint with vLLM v0.28, depth 3 was best for Thai RAG and summarisation, and depth 4 was worse everywhere. Re-measure the ladder whenever the checkpoint or engine changes.
- Benchmark prompts understate real traffic. Over thirteen hours of staff use, first-position draft acceptance was 89.2%, against 76% on our Thai test prompt. Real questions were more predictable than the benchmark.
What did not help
Most of what we tried changed nothing. We list it anyway, because null results that go unreported tend to be tested again by someone else.
| What we tried | Result | Verdict |
|---|---|---|
| MTP off, to restore full CUDA graphs | 39.3 tok/s against 54.9 | 28% slower |
TRITON_ATTN with full decode graphs |
55.7 against 54.9 | +1.5%, inside the 2.6% run spread |
Forcing FULL_DECODE_ONLY on FlashInfer |
Accepted, then silently downgraded | No-op |
| A community leaderboard’s flags for the same model and board | Best arm 60.3 in English; 54.2 against 54.9 in Thai | Not reproduced |
| A newer image alone (v0.25.1) | +1.6%, per-step time unchanged | Inside noise |
| LMCache for the 160k-token shared prefix | Warm path 12.0 s to 6.7 s; cold 74.6 s to 83.0 s | Works, not kept |
| llm-d | Needs replicas to route between | Not applicable to one GPU |

Experiment journal · A/B runs of 28 and 31 July and 2 August 2026, three idle-gated runs per arm
Some detail behind the rows.
The boot warning was not a tuning opportunity. With speculative decoding active, vLLM downgrades the CUDA-graph mode, and the log line reads like a misconfiguration. We priced it. Turning MTP off does shorten each step from 33.3 to 27.6 ms, but each step then emits one token instead of about 1.9.
The leaderboard gap was the checkpoint, not a flag. Entries for our exact model listed 105 to 119 tok/s, twice our figure. We replicated every published flag, three idle runs per arm, in English and Thai. None closed the gap. The explanation arrived two months later (next section).
LMCache lost to unified memory. Its advantage over vLLM’s built-in prefix cache is that the KV survives a vLLM restart, because a separate process holds it. On a Spark that process shares the same memory pool the engine needs, and vLLM would not boot beside it. It also forced --max-num-batched-tokens from 8,192 down to 4,223 on this hybrid model. One more trap: the --kv-offloading-backend lmcache shortcut requires disabling the hybrid KV cache manager, which this model cannot do. The multiprocess connector is the path that works.
Looking for LMCache found a real defect. The shared knowledge-base prefix was being evicted by ordinary daytime traffic. Sixteen hours after the morning warm-up, the same call cost 72 s at a 0% cache hit, then 11.6 s when re-run immediately. An hourly warm-up request fixed it with no new dependency.
Pin a version, not a moving tag. The nightly container tag we benchmarked all summer had last been pushed in April. Every “retry on a new image” had pulled the same build.
The change that doubled speed
Thai decode went from 58.0 to 108.9 tok/s on 15 October by switching to NVIDIA’s NVFP4 checkpoint on vLLM v0.28 with MTP depth 3. The vLLM project’s GB10 recipe for this model claims 97.7 tok/s at concurrency 1. On the recipe’s own shape (8K in, 256 out) we measured 97.1, against 54.1 for the old profile the same night.
Only one ingredient mattered: the checkpoint reads 2.38 GB per step instead of 4.00. It had failed to load on our older vLLM build in August, and v0.28 loads it.

Experiment journal · single user, same night (15 October 2026), idle-gated medians
At concurrency 32 the gain is smaller: 550 to 563 output tok/s against 445 to 462, about +22%, with 0 of 200 requests failed on either side. With 32 streams sharing each step, bytes per token stop being the only limit. The KV pool also grew from 1.35M to 4.82M tokens at the same memory utilisation.
The tokenizer trap. The first run on the new checkpoint rejected our knowledge-base prompt: 242,802 tokens had become 324,057. The checkpoint’s tokenizer.json is correct, but its tokenizer_config.json names a tokenizer class that transformers 5 rebuilds with a regex lacking \p{M}. Thai vowels and tone marks are Unicode combining marks, so without it they split off into tokens of their own.
The fix is one flag: --tokenizer pointed at a repository whose tokenizer loads correctly, with the same vocabulary. If you serve Thai, load the tokenizer the way vLLM does, through AutoTokenizer, and count how many combining marks end up alone in a token. A correct load orphaned about 5% of marks on our corpus. The broken load orphaned 91.6%.
Benchmark hygiene on a shared box
Several early numbers were artefacts of how we measured, not of the configuration. Each rule below came from one specific measurement failure, given with it.
- Gate on an idle server. Identical configs read 57.8, then 37.5, then 39.2 tok/s because staff traffic was sharing the GPU. We now require
vllm:num_requests_running == 0and sample it during the run, not only before. One concurrent coding session turned a 1.26 s prefill into 7.68 s. - Pair arms on the same day. The same configuration measured 53.3 tok/s one day and 50.6 six days later.
- Re-measure across restarts. Two container starts of byte-identical configuration read 55.4 and 57.0 tok/s. Three runs inside one boot cannot resolve a 2% effect.
- Separate prefill from decode. A wall-clock figure that included generation read 1.3, 9.2, 11.6 and 1.9 s across four prompt sizes, which is not even monotonic. Measured with
max_tokens=1, cutting a 172k-token prompt by 65% saved 1.9 s per call against about 45 s of generation. The lever for “slow” was the output budget. - Defeat the prefix cache when measuring prefill. Use random-word prompts, or a cache hit will be reported as computation.
- Distrust the flattering prompt. A short counting task read 62.4 tok/s where the standard benchmark read 54.7, because MTP predicts counting unusually well.
- For Thai, quote characters per second. On the old profile, tokens per second were the same in Thai and English (56.2 against 54.4), but a token carried 2.5 Thai characters against 6.3 English ones. The reader saw 171.8 chars/s in Thai against 347.1 in English.
- Check what the eval harness sends. Our RAG evaluation sent no session ID, so the chat front end replayed the previous 20 chats into every question. One question had been “passing” on that history while its retrieval failed every run.
- Never believe one run. A Thai routing evaluation scored between 85% and 100% across sixteen runs of unchanged code, two of them ninety seconds apart.
Quality gates for Thai
Twice, a checkpoint that was better on every performance measure produced corrupted Thai text. Pass/fail scores did not catch either case reliably; reading the raw output did.
| Candidate | Speed against incumbent | What went wrong |
|---|---|---|
| Mixed-precision 4.75-bit quant | +8% single stream, 4 GB smaller | Dropped tone marks in 2 of 3 reruns of one question |
| “Fast” NVFP4 repackaging | +41% single stream | Tone marks fell from 71.3 to 60.7 per 1,000 Thai characters in long RAG answers |
The corruption looks like this: ผู้ป่วย becomes ผูปวย, and ล้างมือ becomes ลางมอ. Tone marks and vowels carry meaning in Thai, and hospital staff read the result as broken text.
We misdiagnosed the second one. We first blamed English-only calibration data. Weeks later, comparing tokenizer files showed the vocabulary and merges were identical to the official model. The difference was one regex in the pre-tokenizer, with \p{M} removed. The weights may be fine; the checkpoint was shipping a tokenizer that disagreed with them. That check needs a 20 MB file and six seconds, where the original A/B needed a 23 GB download and a night.
Two gates passed the broken checkpoint. A 250-word standalone generation came back clean, because the damage scales with how much Thai is in the prompt. A tool-routing evaluation scored 97%, because it emits a tool name and not Thai prose. Test the path users actually hit.
The gate we use now for any checkpoint or tokenizer change:
- Five runs of the RAG golden set per side, compared as distributions and not single scores.
- Tone-mark and vowel density per 1,000 Thai characters across all answers.
- A scan for known words with their marks stripped.
- A person reading the raw answers.
The gate still has a hole. One chat path code-switches into Chinese characters in some answers, on both old and new profiles, and a check that counts Thai marks does not see other scripts.
Temperature 0 is not reproducibility
Setting temperature to 0 did not make the server answer the same case the same way twice. An ICD-10 coding assistant ran at temperature 0 precisely so that it could not change its answer between days. In a two-repeat pilot, same-case answers agreed in 2 of 6 pairs.
At five repeats, one admission returned 9 distinct diagnosis codes across five identical calls. One code appeared in all five and a second in three.
Our working explanation is continuous batching: the numerics of a request depend on what else shares the batch, so temperature 0 removes sampling randomness but not scheduling effects. We did not isolate this with a batch-size-1 control, so treat the cause as likely and not proven. Speculative decoding and kernel-level non-determinism are other candidates.
The practical response does not depend on the cause.
- Use self-consistency. Sample each suggestion N times and keep what recurs. At five samples our nightly job went from about 45 seconds to about 4 minutes, which costs nothing at 02:00.
- Print the denominator. “66.7% accurate” was 2 of 3 graded reviews. The screen now shows the count and warns below a minimum N.
- Size evaluations to the noise. A two-repeat comparison could not have detected any effect, and we first read it as if it could.
What you can take away
Four techniques from this post work on any single-node vLLM deployment, not only on a Spark.
| Technique | What it saves you | Where it is shown |
|---|---|---|
| Estimate decode speed from safetensors headers: bandwidth divided by GB read per step | A night of downloading and benchmarking a candidate that cannot win | A mental model: the box is bandwidth-bound |
| Load the tokenizer as vLLM does and count orphaned Thai combining marks | Adopting a fast checkpoint that corrupts Thai | The change that doubled speed; Quality gates for Thai |
| Benchmark idle, same day, across restarts, with prefill and decode separated | Chasing effects smaller than the 2.9% restart drift | Benchmark hygiene on a shared box |
| Treat temperature 0 as non-deterministic and sample repeatedly | Relying on a single answer or a single graded run | Temperature 0 is not reproducibility |
The knobs worth touching were --max-num-seqs, MTP depth and the choice of checkpoint. Decode-path flags, leaderboard flags and LMCache on unified memory were not.
A checklist to reuse
Before adopting a new model, checkpoint or engine version on a single-node vLLM deployment:
- Price the checkpoint from its safetensors headers: gigabytes read per decode step, divided into your measured bandwidth.
- Load its tokenizer through
AutoTokenizerand count orphaned combining marks on your own corpus. - Pin a container version and write it down next to every number.
- Benchmark on an idle server, both arms the same day, across at least two restarts.
- Report prefill and decode separately, and characters per second for Thai.
- Re-measure the MTP depth ladder; do not carry it over from another checkpoint.
- Run the quality set five times per side and read the raw output.
- Record the verdict with its evidence, and say what would reopen it.
Caveats
- This is one box, one model family and one workload. The bandwidth reasoning should carry over to other unified-memory machines; the specific numbers will not.
- Samples are small: three runs per arm, no confidence intervals. Effects under about 3% are beyond what this setup can resolve.
- The batch-capacity and engine comparisons were run in early July, before we started gating on an idle server. The direction is unlikely to change, but the exact magnitudes are less certain.
- The golden set has 11 questions. It separates checkpoints only as a distribution over repeated runs.
- Rows marked “not run” are arithmetic from published checkpoint headers or parameter counts, not measurements.
- No medical benchmark has been run on the production model on this box. Speed and Thai text integrity were measured; clinical accuracy was not.
- Model and engine support moves fast. Engines recorded as blocked in July may load this model today.
This post is a condensed version of a longer experiment journal. Corrections and replication attempts are welcome.
Sources
- The experiment journal this post condenses: “Serving a 35B MoE LLM for a Thai Hospital RAG Pilot on a Single DGX Spark (GB10)”, measurement campaign 5 July to 15 October 2026.
- The vLLM project’s GB10 recipe for Qwen3.6-35B-A3B, source of the 97.7 tok/s figure we reproduced.
- spark-arena.com, the community DGX Spark leaderboard whose entries we tried to replicate.
- github.com/spped2000/thai-llm-dgx-spark, the public Thai tokenizer study that prompted our tokenizer check.
- Background: Kwon et al., “Efficient Memory Management for Large Language Model Serving with PagedAttention” (SOSP 2023), the vLLM paper.
- Background: Leviathan, Kalman and Matias, “Fast Inference from Transformers via Speculative Decoding” (ICML 2023).
- Background: Wang et al., “Self-Consistency Improves Chain of Thought Reasoning in Language Models” (ICLR 2023).


