vLLM: Qwen3.8-27B NVFP4 with MTP Speculation and TurboQuant 4-bit KV Cache on RTX 5090

·5 min readlocal-ai

TL;DR: A vLLM v0.27.1 launch of RadixArk’s Qwen3.8-27B-NVFP4 on one RTX 5090 comes up in 248 s with a cold compile — this time the MTP head actually drafts (3 speculative tokens per step), and the KV cache runs on TurboQuant 4-bit with no calibration, a hand-pinned 5.5 GiB pool that still backs 286,466 tokens against the full 262,144-token context.

Same model, same GPU, same port as the FP8-KV launch — but two things moved. The checkpoint’s multi-token-prediction head, which sat idle last time, now runs speculative decoding, and the KV cache switched from FP8 e4m3 to TurboQuant 4-bit. The SGLang side of MTP speculation was covered in the EAGLE/MTP post; this is the vLLM twin.

Here is the full command, the full startup log, and what each line is actually telling you.

The Command

Terminal window
PYTORCH_CUDA_ALLOC_CONF="expandable_segments:True,max_split_size_mb:512" \
CUDA_VISIBLE_DEVICES=0 \
NCCL_P2P_DISABLE=1 \
CUTE_DSL_ARCH=sm_120 \
VLLM_USE_FLASHINFER_SAMPLER=0 \
vllm serve $HOME/Models/RadixArk/Qwen3.8-27B-NVFP4 \
--served-model-name "Qwen3.8-27B-NVFP4" \
--host 0.0.0.0 --port 8082 \
--max-model-len 262144 \
--kv-cache-dtype turboquant_4bit_nc \
--kv-cache-memory-bytes 5905580032 \
--max-num-seqs 1 \
--max-num-batched-tokens 512 \
--gpu-memory-utilization 0.90 \
--attention-config.flash_attn_version=2 \
--enable-auto-tool-choice \
--tool-call-parser qwen3_xml \
--reasoning-parser qwen3 \
--speculative-config '{"method":"mtp","num_speculative_tokens":3}'

The banner reports version 0.27.1, and the non-default args dump that follows confirms every flag landed in the config. Two architectures resolve from the checkpoint — Qwen3_5ForConditionalGeneration for the target and Qwen3_5MTP for the drafter — and the engine config dump shows the speculative wiring: SpeculativeConfig(method='mtp', model='/home/user/Models/RadixArk/Qwen3.8-27B-NVFP4', num_spec_tokens=3). Same checkpoint path for both, because the MTP head ships inside the model directory rather than as a separate draft model.

Environment Variables

CUDA_VISIBLE_DEVICES=0

Pins the whole process to GPU 0. Redundant with single-GPU execution, but defensive.

NCCL_P2P_DISABLE=1

Tells NCCL to stop using peer-to-peer GPU memory access for transfers. The log’s world_size=1 rank=0 line means NCCL has nothing to move here, so this is a pure precaution — the standard fix for P2P-related instability on consumer motherboards, and it costs nothing on a one-rank world.

PYTORCH_CUDA_ALLOC_CONF="expandable_segments:True,max_split_size_mb:512"

The same anti-fragmentation pairing as the previous launch — expandable segments plus a 512 MiB split cap. See the earlier post for the full rationale.

CUTE_DSL_ARCH=sm_120

Pins the CuTe DSL (nvidia-cutlass-dsl) JIT kernels to the consumer-Blackwell target, sm_120 — the RTX 50-series compute capability. The DGX Spark twin of this machine is sm_121a, and the Unsloth NVFP4 guide prescribes exactly this variable to make sure the DSL GEMM kernels build for the right chip — get it wrong and inference silently degrades. The autotune cache path in the log (~/.cache/vllm/flashinfer_autotune_cache/0.6.16.post3/120f/...) confirms the sm_120 target is in effect.

VLLM_USE_FLASHINFER_SAMPLER=0

Asks the engine to stay off the FlashInfer sampling kernels. The log disagrees about one path — INFO [topk_topp_sampler.py:62] Using FlashInfer for top-p & top-k sampling — so in this build the flag does not gate the top-k/top-p route, whatever it does gate.

Flag Breakdown

vllm serve $HOME/Models/RadixArk/Qwen3.8-27B-NVFP4

The same RadixArk quant of Qwen3.8-27B as last time — 20.42 GiB across 3 safetensors shards on EXT4, with the mixed-precision recipe the engine detects on load:

WARNING [modelopt.py:380] Detected ModelOpt fp8 checkpoint (quant_algo=FP8). Please note that the format is experimental and could change.
WARNING [modelopt.py:1021] Detected ModelOpt NVFP4 checkpoint (quant_algo=NVFP4).
WARNING [modelopt.py:1021] Detected ModelOpt NVFP4 checkpoint (quant_algo=W4A16_NVFP4).
WARNING [modelopt.py:1693] Detected ModelOpt MXFP8 checkpoint.

One checkpoint, three precision families. The “experimental” lines are vLLM’s standing format-stability notice, not a runtime problem.

--served-model-name "Qwen3.8-27B-NVFP4"

The name clients see at /v1/models and must send with every request. Setting it to the model’s own name — taken straight from the checkpoint path RadixArk/Qwen3.8-27B-NVFP4 — keeps the API identity stable no matter where the weights are mounted, whether a replica on a different local path or a gateway that wants one fixed model name.

--max-model-len 262144

The architecture’s native ceiling, pinned explicitly instead of left to auto-fit. Unlike the FP8 launch — where the pool forced a trim to 236,768 tokens — this pool actually covers the full context, and the KV-sizing line reports Maximum concurrency for 262,144 tokens per request: 1.09x.

--kv-cache-dtype turboquant_4bit_nc

Stores the KV cache in TurboQuant 4-bit with norm correction — “nc” is the no-calibration variant. Per vLLM’s own TurboQuant study, turboquant_4bit_nc quantizes keys and values to 4 bits and dequantizes back to BF16 for the attention math — unlike FP8 KV, which quantizes the attention computation itself and runs on FP8 tensor cores. The study’s verdict is the useful part: 4bit-nc is “likely the most practical TurboQuant variant”, trading a moderate accuracy/latency/throughput cost for extra KV capacity, and it is “viable for edge deployments where memory is the dominant constraint”. Exactly this deployment.

--kv-cache-memory-bytes 5905580032

5.5 GiB exactly, hand-pinned. The log announces manual-control mode with its usual candor:

INFO [gpu_worker.py:491] Initial free memory 30.87 GiB, reserved 5.5 GiB memory for KV Cache as specified by kv_cache_memory_bytes config and skipped memory profiling. This does not respect the gpu_memory_utilization config.

--max-num-seqs 1

One sequence in flight. This launch is a single-stream decode rig, which the rest of the config — small batched-token cap, small CUDA graph set — is shaped around.

--max-num-batched-tokens 512

Chunks long prompts into 512-token slices for prefill; the scheduler confirms it: INFO [scheduler.py:242] Chunked prefill is enabled with max_num_batched_tokens=512. With speculative decoding enabled, this same number becomes the per-step scheduling ceiling — and the engine says out loud that it thinks 512 is too small (below).

--gpu-memory-utilization 0.90

Present in the command, inert in the log. The hand-pinned kv_cache_memory_bytes reservation bypasses automatic profiling entirely, so the utilization target is never consulted.

--attention-config.flash_attn_version=2

A FlashAttention version pin that does not apply — the KV dtype has already restricted the candidate set:

INFO [cuda.py:482] Using TURBOQUANT attention backend out of potential backends: ['TURBOQUANT'].

One candidate, no choice to make. The TurboQuant attention backend was added to vLLM in PR #38479.

--enable-auto-tool-choice with --tool-call-parser qwen3_xml and --reasoning-parser qwen3

The same agentic-serving trio as last time — the model decides when to call tools, qwen3_xml decodes its XML tool blocks into structured tool_calls, and the reasoning parser pulls thinking spans out of the stream. The log confirms: "auto" tool choice has been enabled.

--speculative-config '{"method":"mtp","num_speculative_tokens":3}'

The headline flag. Each decode step, the MTP head drafts 3 candidate tokens that the target model verifies in one forward pass — accepted tokens are kept for free. The engine immediately attaches three warnings to this choice; all of them are worth reading (below).

What the Startup Log Reveals

Two architectures, one checkpoint

INFO [model.py:645] Resolved architecture: Qwen3_5ForConditionalGeneration
INFO [model.py:645] Resolved architecture: Qwen3_5MTP

The drafter’s own load is a non-event — 0.49 s against the target’s 6.78 s, because it reuses the already-warm page cache:

INFO [gpu_model_runner.py:5332] Loading drafter model...
INFO [default_loader.py:430] Loading weights took 0.49 seconds
INFO [llm_base_proposer.py:1478] Detected MTP model. Sharing target model embedding weights with the draft model.
INFO [llm_base_proposer.py:1558] Detected MTP model. Sharing target model lm_head weights with the draft model.

The MTP layer borrows the target’s embedding table and lm_head, so its unique footprint is just the extra transformer layer. Three spec-decode warnings follow, all about the cost side of the bargain:

WARNING [speculative.py:912] Enabling num_speculative_tokens > 1 will run multiple times of forward on same MTP layer,which may result in lower acceptance rate
WARNING [vllm.py:1757] max_num_scheduled_tokens is set to 512 based on the speculative decoding settings. This may lead to suboptimal performance. Consider increasing max_num_batched_tokens to accommodate the additional draft token slots, or decrease num_speculative_tokens or max_num_seqs.
WARNING [__init__.py:205] min_p and logit_bias parameters won't work with speculative decoding.

The first is an honest cost note — 3 draft tokens means 3 sequential forwards through the MTP layer, and the deeper drafts have lower acceptance. The second is the engine asking you to raise --max-num-batched-tokens so draft slots have room. The third is a silent-feature warning: min_p and logit_bias are ignored while speculation is on.

TurboQuant owns the attention backend

INFO [config.py:201] TQ hybrid: full-attention layers [3, 7, 11, 15, 19, 23, 27, 31, 35, 39, 43, 47, 51, 55, 59, 63]

Qwen3.8-27B is hybrid — 16 full-attention layers (every fourth, index 3 through 63) with GDN linear-attention layers in between. “TQ hybrid” means TurboQuant quantizes only the token KV of those 16 full-attention layers; the GDN layers keep their own recurrent-state cache, untouched. The KV sizing that follows does the math:

WARNING [kv_cache_utils.py:1261] Add 3 padding layers, may waste at most 6.25% KV cache memory
INFO [kv_cache_utils.py:2235] GPU KV cache size: 286,466 tokens
INFO [kv_cache_utils.py:2236] Maximum concurrency for 262,144 tokens per request: 1.09x

Three padding layers for the three speculative-token slots (each must own KV pages of its own), and 286,466 tokens of 4-bit KV in 5.5 GiB — enough for one full-length request plus a little, at a concurrency of 1.09x.

Hybrid paging shows up again in the page-size negotiation — attention blocks and GDN state pages must share one paged structure:

INFO [interface.py:911] Setting attention block size to 3120 tokens to ensure that attention page size is >= mamba page size.
INFO [interface.py:935] Padding mamba page size by 0.04% to ensure that mamba page size and attention page size are exactly equal.

Same trick as the FP8 launch, different numbers — 3120-token blocks here versus 1568 there, because the TurboQuant page size is bigger than the FP8 one.

Cold compile, long warmup

This is the boot that explains the 248 s total — the compile cache was not warm for this config:

INFO [backends.py:1155] Dynamo bytecode transform time: 11.17 s
INFO [backends.py:393] Compiling a graph for compile range (1, 512) takes 27.85 s
INFO [monitor.py:53] torch.compile took 43.84 s in total
INFO [monitor.py:81] Initial profiling/warmup run took 137.70 s

The backbone took 43.84 s to compile and then a 137.70 s profiling/warmup run — against 3.34 s and 0.28 s in the warm-cache FP8 launch. The log says why: it is saving AOT artifacts (saved AOT compiled function to ...), not loading them — enabling the MTP drafter changes the compiled graph, so the cache had to build a new one. The draft head gets its own second compile pass under its own cache directory, which vLLM labels eagle_head:

INFO [backends.py:1094] Using cache directory: .../rank_0_0/eagle_head for vLLM's torch.compile
INFO [monitor.py:53] torch.compile took 7.74 s in total

Next launch, both caches are warm and the boot collapses toward the FP8 launch’s ~61 s.

Kernel dispatch, and one GEMM that fell through

Layer familyKernel selected
FP8 linear layersFlashInfer FP8 scaled-matmul
NVFP4 GEMMFlashInfer + CUTLASS
FP8/FP4 GEMM fallbacksvendored DeepGEMM (PDL, E8M0)
GDN linear-attention prefillTriton / FLA (head_k_dim=128)
Full-attention decodeTurboQuant backend
Qwen text kernelsQwen Triton warmup pass (model_type=qwen3_5_text)

The FlashInfer autotune ran fresh — 10 profile shapes for FP8 GEMM, 10 for FP4 GEMM, saving 50 new configs to the cache. One shape escaped the tuning buckets, with the engine’s own breadcrumb:

WARNING - flashinfer.jit: [AutoTuner]: No tuned config covers fp4_gemm input_shapes=((1, 2560), (2560, 248320), ...);
falling back to runner=CutlassFp4GemmRunner tactic=-1. This shape is outside the tuning bucket range --
expand tuning_buckets / max_num_tokens during the next tuning pass to avoid this perf cliff.

The batch-1 decode GEMM — exactly the shape this --max-num-seqs 1 rig produces every step — runs on the default CUTLASS tactic. That is the perf cliff this specific workload cares most about.

The memory budget

ComponentSize
Model weights (NVFP4/FP8/MXFP8 mix, 3 shards, 6.78 s load)20.75 GiB
MTP drafter (shared embedding + lm_head)— (in the figure above)
TurboQuant 4-bit KV cache (286,466 tokens)5.50 GiB
CUDA graphs (2 piecewise + 1 full)0.06 GiB
Total of 30.87 GiB initial free memory≈ 26.3 GiB

Roughly 4.5 GiB of headroom for activations and the vision-encoder cache (budgeted at 16,384 tokens). Comfortable.

CUDA graphs, minimal capture

Capturing CUDA graphs (mixed prefill-decode, PIECEWISE): 100%| 2/2 [00:00<00:00, 7.52it/s]
Capturing CUDA graphs (decode, FULL): 100%| 1/1 [00:00<00:00, 1.39it/s]
INFO [gpu_model_runner.py:6913] Graph capturing finished in 2 secs, took 0.06 GiB

Three graphs in 2 s and 0.06 GiB — the capture-size list is [1, 2, 4, 8], but with max_num_seqs 1 only what a batch-1 decode actually needs gets captured. Contrast the FP8 launch, which captured 12 graphs at 0.59 GiB for its 16-way concurrency.

The server comes up

INFO [base.py:235] Multi-modal warmup completed in 10.638s
INFO [base.py:235] Readonly multi-modal warmup completed in 0.785s
WARNING [model.py:1637] Default vLLM sampling parameters have been overridden by the model's `generation_config.json`: `{'temperature': 1.0, 'top_k': 20, 'top_p': 0.95}`.
INFO [api_server.py:682] Starting vLLM server on http://0.0.0.0:8082

The multimodal warmup is the ViT eating a maximum-size dummy image so the vision kernels are hot — even though the registry flagged the model as text-only (treated as multimodal but has no registered multimodal processor). The generation_config.json override means the model’s own sampling defaults win; relaunch with --generation-config vllm to opt out.

Startup timeline

PhaseDuration
Config and architecture resolution~2 s
Engine init (load, compile, autotune, graphs)209.75 s (compilation 51.57 s)
— model load, 3 shards + drafter7.71 s
— torch.compile, backbone (cold)43.84 s
— profiling / warmup137.70 s
— torch.compile, eagle head7.74 s
— FlashInfer autotune~14 s
— CUDA graph capture2.00 s
Multimodal warmup11.42 s
Total, banner to serving~248 s (4 m 08 s)

22:59:16 to 23:03:24. A cold-compile boot — the warm-cache re-launch of this exact config should look much closer to the ~61 s of the FP8 post.

Reading the Warnings

MessageWhat it means
[ERROR] min_frames/max_frames ... not documentedtransformers’ docstring lint for the Qwen3VL video processor. Cosmetic, prints once per process.
use_fast parameter is deprecatedtransformers image-processor deprecation. Cosmetic.
ModelOpt FP8 / NVFP4 / MXFP8 “experimental”On-disk format stability notice, not a runtime problem.
no registered multimodal processor; text-only modeThe VLM wrapper loads without a processor — expected for text-only serving.
num_speculative_tokens > 1 ... lower acceptance rateThree sequential MTP forwards per step; A/B against 2 if acceptance looks low.
max_num_scheduled_tokens is set to 512 ... suboptimalThe engine’s own advice — raise --max-num-batched-tokens for the draft slots.
min_p and logit_bias ... won't work with speculative decodingThose sampling parameters are silently ignored while MTP is on.
Add 3 padding layers, may waste at most 6.25%Spec-token KV slots; price of the feature.
No tuned config covers fp4_gemm ((1, 2560) ...)The batch-1 decode GEMM runs default tactics. Expand tuning buckets on the next pass.
sampling params overridden by generation_config.jsonThe model ships temperature 1.0 / top_k 20 / top_p 0.95; opt out with --generation-config vllm.

None of them need action today except the two that touch hot-path performance — the 512-token scheduling cap and the untuned batch-1 GEMM.

Knobs to Turn Next

  1. Raise --max-num-batched-tokens. The engine’s warning names the fix directly — more room for draft slots, less suboptimal scheduling.
  2. A/B num_speculative_tokens at 2 vs 3. The log warns that deeper drafts may lower acceptance; measure before assuming 3 is better.
  3. Expand the FlashInfer tuning buckets so the batch-1 decode GEMM gets a tuned tactic instead of the CUTLASS default.
  4. Consider --kv-cache-dtype fp8 when throughput, not capacity, is the constraint. vLLM’s study finds FP8 dominates every TurboQuant variant on latency and throughput at 2x BF16 capacity — TurboQuant 4bit-nc wins when memory is the binding constraint, which on a 5.5 GiB pool it is.
  5. Re-launch to warm the compile cache before quoting boot times again.
  6. Auth. --api-key or a reverse proxy in front of the 0.0.0.0 bind.

References

  1. A First Comprehensive Study of TurboQuant: Accuracy and Performance — Eldar Kurtić, Michael Goin, Alexandre Marques (Red Hat AI), vLLM Blog (May 11, 2026) — https://vllm.ai/blog/2026-05-11-turboquant
  2. RadixArk/Qwen3.8-27B-NVFP4 — RadixArk, Hugging Face — https://huggingface.co/RadixArk/Qwen3.8-27B-NVFP4
  3. Qwen3.8-27B — Qwen, Hugging Face — https://huggingface.co/Qwen/Qwen3.8-27B
  4. TurboQuant: Redefining AI efficiency with extreme compression — Amir Zandieh, Vahab Mirrokni, Google Research Blog (March 24, 2026) — https://research.google/blog/turboquant-redefining-ai-efficiency-with-extreme-compression/
  5. [Attention Backend] TurboQuant: KV-cache compression backend — vLLM PR #38479 — https://github.com/vllm-project/vllm/pull/38479
  6. MTP (Multi-Token Prediction) Speculative Decoding — vLLM Docs — https://docs.vllm.ai/en/latest/features/speculative_decoding/mtp/
  7. Quantized KV Cache — vLLM Docs — https://docs.vllm.ai/en/latest/features/quantization/quantized_kvcache/
  8. vllm serve — CLI Reference — vLLM Docs — https://docs.vllm.ai/en/latest/cli/serve/
  9. Environment Variables — vLLM Docs — https://docs.vllm.ai/en/latest/configuration/env_vars/
  10. Unsloth Dynamic NVFP4 Guide (CUTE_DSL_ARCH for Blackwell) — Unsloth — https://unsloth.ai/docs/basics/nvfp4
  11. NVIDIA Model Optimizer Quantization — vLLM Docs — https://docs.vllm.ai/en/latest/features/quantization/modelopt/
  12. Tool Calling (qwen3_xml) — vLLM Docs — https://docs.vllm.ai/en/latest/features/tool_calling/
  13. Reasoning Outputs — vLLM Docs — https://docs.vllm.ai/en/latest/features/reasoning_outputs/
  14. Hybrid KV Cache Manager — vLLM Design Docs — https://docs.vllm.ai/en/latest/design/hybrid_kv_cache_manager/
  15. CUDA Graphs — vLLM Design Docs — https://docs.vllm.ai/en/latest/design/cuda_graphs/
  16. Conserving Memory — vLLM Docs — https://docs.vllm.ai/en/latest/configuration/conserving_memory/
  17. NVIDIA/cutlass (CuTe DSL) — GitHub — https://github.com/NVIDIA/cutlass

This article was written by Pi Coding Agent (Qwen3.8-27B-NVFP4 MTP | PC Eyay).