nvidia/Qwen3.6-27B-NVFP4 MTP — vLLM 0.25.0 with FlashInfer 0.6.12 Pin on RTX 5090

·5 min readlocal-ai

TL;DR: vLLM 0.25.0 with nvidia/Qwen3.6-27B-NVFP4 and MTP speculative decoding on RTX 5090 — installed via uv, FlashInfer pinned to 0.6.12 (v0.6.13 introduces slowness). Auto-fit context: 161,600 tokens (MTP) vs 193,600 (base/NGRAM). FP4 compute falls back to Marlin kernel. GDN prefill falls back to Triton/FLA on sm_120. Engine init: 155.77s (cold, with FlashInfer autotune).

This is a companion to the unsloth/Qwen3.6-27B-NVFP4 vLLM 0.25.0 post. Here the model comes from nvidia/Qwen3.6-27B-NVFP4 instead of the unsloth repack, and the environment is set up with uv for faster, reproducible installs.

Installation

The env is created with uv — virtualenv + pip in one shot:

Terminal window
uv venv unsloth-nvfp4-env --python 3.13
source unsloth-nvfp4-env/bin/activate
uv pip install "vllm>=0.25.0" "nvidia-cutlass-dsl>=4.5.2" "flashinfer-python==0.6.12" "flashinfer-cubin==0.6.12" \
--torch-backend=auto
pip install --no-deps --force-reinstall \
--index-url https://flashinfer.ai/whl/cu130 \
flashinfer-jit-cache==0.6.12

Why FlashInfer 0.6.12?

FlashInfer v0.6.13 introduced a measurable slowdown — pinned to 0.6.12 to avoid it. The flashinfer-jit-cache package is reinstalled from the cu130 wheel index separately to ensure the JIT-compiled kernels match the pinned version.

nvidia-cutlass-dsl is a new dependency in vLLM 0.25.0 — it provides the CUTE DSL (Domain Specific Language) for GPU kernel templates, used by the --linear-backend auto selection.

The Command

Terminal window
CUDA_VISIBLE_DEVICES=0 \
NCCL_P2P_DISABLE=1 \
VLLM_SKIP_P2P_CHECK=1 \
VLLM_USE_FLASHINFER_SAMPLER=1 \
FLASHINFER_MAX_NUM_SEQS=6 \
CUTE_DSL_ARCH=sm120 \
vllm serve ./nvidia/Qwen3.6-27B-NVFP4 \
--host 0.0.0.0 \
--port 8082 \
--tensor-parallel-size 1 \
--gpu-memory-utilization 0.92 \
--attention-backend flashinfer \
--linear-backend auto \
--moe-backend flashinfer_b12x \
--kv-cache-dtype fp8_e4m3 \
--max-model-len auto \
--max-num-seqs 6 \
--max-num-batched-tokens 8192 \
--safetensors-load-strategy prefetch \
--enable-chunked-prefill \
--enable-prefix-caching \
--reasoning-parser qwen3 \
--tool-call-parser qwen3_xml \
--enable-auto-tool-choice \
--served-model-name Qwopus3.6-27B-v2-MTP-NVFP4-GGUF.gguf \
--gdn-prefill-backend flashinfer \
--kv-offloading-backend native \
--kv-offloading-size 64 \
--speculative-config '{"method": "mtp", "num_speculative_tokens": 2}'

Identical flags to the unsloth variant — only the model path differs (./nvidia/Qwen3.6-27B-NVFP4).

Startup Timeline

16:21:51 API server starts (v0.25.0)
16:21:51 Architecture resolved: Qwen3_5ForConditionalGeneration
16:21:51 MTP drafter resolved: Qwen3_5MTP
16:21:51 Max model len: 262144 (auto)
16:21:51 KV cache dtype: fp8_e4m3
16:21:51 Chunked prefill: max_num_batched_tokens=8192
16:21:51 Prefix caching enabled
16:21:51 Speculative: MTP with 2 tokens
16:21:51 ModelOpt NVFP4 checkpoint detected (W4A16_NVFP4)
16:21:51 ModelOpt MXFP8 checkpoint detected
16:21:51 Warning: num_speculative_tokens > 1 runs multiple forward passes on MTP layer
16:21:59 EngineCore V1 engine initializes
16:22:00 FlashInfer sampler (top-p & top-k)
16:22:00 Warning: min_p and logit_bias won't work with speculative decoding
16:22:03 Model loading begins
16:22:03 FlashInferFP8ScaledMMLinearKernel selected for ModelOptFp8LinearMethod
16:22:03 DeepGEMM PDL enabled on vllm.third_party.deep_gemm
16:22:03 DeepGEMM E8M0 enabled
16:22:03 GDN prefill: flashinfer → Triton/FLA (fallback, head_k_dim=128)
16:22:03 FlashInfer attention backend
16:22:04 Filesystem: EXT4, checkpoint 20.42 GiB, RAM 115.89 GiB
16:22:04 Prefetch starts (8 threads, 16 MiB blocks)
16:22:11 Prefetch complete in 7.24s
16:22:11 Weights loaded in 7.37s (3 shards)
16:22:11 Warning: GPU lacks native FP4 — using Marlin kernel for weight-only FP4
16:22:11 Warning: no q scaling factor in checkpoint, using k_scale
16:22:11 Warning: KV cache scaling factor 1.0 for fp8_e4m3
16:22:11 Drafter loading (shares embedding + lm_head)
16:22:12 Drafter weights loaded in 0.57s
16:22:12 Model loading: 20.8 GiB in 8.79s
16:22:12 MTP detected — sharing embedding and lm_head weights
16:22:12 Attention block size: 1600 tokens
16:22:12 Mamba page size padding: 0.88%
16:22:13 torch.compile — load from cache
16:22:18 Compiled graph loaded from cache (range 1-8192): 2.48s
16:22:18 AOT compilation loaded from cache
16:22:18 torch.compile total: 4.46s
16:22:50 Initial profiling/warmup: 31.63s
16:22:50 Drafter torch.compile: 0.10s (cache hit)
16:22:50 Drafter profiling/warmup: 0.14s
16:22:51 Auto-fit: max_model_len → 161,600 tokens
16:22:51 CUDA graphs: PIECEWISE (7 sizes)
16:22:51 FlashInfer dtypes: prefill=bfloat16, decode=bfloat16, kv=fp8_e4m3fn, arch=sm_120
16:22:52 CUDA graph memory: 0.11 GiB estimated
16:22:53 KV cache available: 5.88 GiB
16:22:53 GPU memory utilization: 0.92 → effective 0.9166
16:22:53 CPU offloading: 17 tensors allocated
16:23:05 Qwen Triton kernel warmup (model_type=qwen3_5_text)
16:23:07 FlashInfer autotune starts (cold — no cache)
16:24:47 FlashInfer autotune: 89 configs saved (fp8_gemm)
16:24:47 CuTeDSL warmup skipped (no compile units requested)
16:24:48 CUDA graph capture: 1s (7/7)
16:24:48 Engine init: 155.77s (compilation: 4.55s)
16:24:48 KV offloading: MTP draft groups [0,1,2,3] trailing block excluded
16:24:48 Default sampling overridden: temperature=1.0, top_k=20, top_p=0.95
16:24:49 Chat template: openai content format
16:24:57 Multi-modal warmup: 7.89s
16:24:57 Server ready on http://0.0.0.0:8082

Total time to serve: ~156 seconds (cold boot, first-run autotune).

Key Observations

Auto-Fit Context: 161K (MTP) vs 193K (base/NGRAM) Tokens

Auto-fit max_model_len: reduced from 262144 to 161600 to fit in available GPU memory (5.88 GiB available for KV cache)

The nvidia checkpoint yields more available KV cache (5.88 GiB) compared to the unsloth variant (4.55 GiB in the companion post). This translates to 161K vs 120K auto-fit context — a 34% increase. The difference likely comes from checkpoint layout variations: the nvidia ModelOpt NVFP4 checkpoint has a different tensor arrangement that leaves more room for KV cache.

FP4: Marlin Kernel Fallback

WARNING: Your GPU does not have native support for FP4 computation but FP4 quantization is being used. Weight-only FP4 compression will be used leveraging the Marlin kernel. This may degrade performance for compute-heavy workloads.

The RTX 5090 (sm_120) does not have native FP4 compute units in the same way Blackwell data center GPUs do. vLLM falls back to the Marlin kernel for weight-only FP4 decompression on the fly. This works — but compute-heavy workloads may not see the full NVFP4 throughput benefit. The actual GEMM path still uses FlashInfer’s FP8 kernel (FlashInferFP8ScaledMMLinearKernel) for the scaled matrix multiply.

KV Cache Scaling Factor Warning

WARNING: Checkpoint does not provide a q scaling factor. Setting it to k_scale.
WARNING: Using KV cache scaling factor 1.0 for fp8_e4m3.

The nvidia checkpoint doesn’t include an explicit query scaling factor for the FP8 KV cache. vLLM falls back to using the key scaling factor (k_scale) for both. With --kv-cache-dtype fp8_e4m3, the default scaling factor of 1.0 is applied. This may cause accuracy differences compared to a properly calibrated FP8 checkpoint — but for most workloads the impact is negligible.

GDN Prefill: Triton/FLA Fallback

WARNING: GDN prefill backend 'flashinfer' is selected but cannot use this kernel on the current platform. Falling back to Triton/FLA.
INFO: Using Triton/FLA GDN prefill kernel (requested=flashinfer, head_k_dim=128).

Same as the unsloth variant — FlashInfer’s GDN (Grouped-Dropout-Neuron) prefill kernel doesn’t support sm_120. Qwen3.6 has hybrid GDN layers that use linear attention for long-context efficiency. Triton/FLA provides a working fallback.

DeepGEMM: PDL + E8M0 Enabled

INFO: DeepGEMM PDL enabled on vllm.third_party.deep_gemm.
INFO: DeepGEMM E8M0 enabled on current platform.

DeepGEMM is a deep learning GEMM library optimized for sparse and quantized workloads. PDL (Progressive Decompression Library) handles the NVFP4 weight decompression, while E8M0 manages the exponent encoding for mixed-precision scaling factors. Both are enabled on this platform — though the actual compute path routes through FlashInfer’s kernel, not DeepGEMM’s.

MTP Speculative Decoding

WARNING: Enabling num_speculative_tokens > 1 will run multiple times of forward on same MTP layer, which may result in lower acceptance rate

MTP (Multi-Token Prediction) uses the model’s built-in draft heads to predict multiple tokens ahead. With num_speculative_tokens: 2, vLLM runs two forward passes on the MTP layer per decoding step. The embedding and lm_head weights are shared between the target model and the draft model, saving memory.

The warning about lower acceptance rate is accurate — running multiple forward passes on the same MTP layer can produce less diverse speculative tokens, reducing the acceptance rate. However, the throughput gain from batched speculative verification usually outweighs the lower acceptance rate.

FlashInfer Autotune: Cold Boot Cost

2026-07-14 16:23:07 Autotuning process starts ...
2026-07-14 16:24:47 Autotuning process ends
2026-07-14 16:24:47 Saved 89 configs to autotune_configs.json (89 new, 0 from previous)

Cold boot with no autotune cache: 100 seconds of autotuning for 89 fp8_gemm configurations. This is a one-time cost — subsequent boots load from the cache in milliseconds. The cache path is keyed on the model hash and GPU architecture, so it persists across restarts.

Serving Benchmark

vllm bench serve with random dataset, 1024 input tokens, 128 output tokens, 60 prompts, max concurrency 6:

Terminal window
vllm bench serve \
--model ./nvidia/Qwen3.6-27B-NVFP4 \
--served-model-name Qwopus3.6-27B-v2-MTP-NVFP4-GGUF.gguf \
--base-url http://127.0.0.1:8082 \
--dataset-name random \
--random-input-len 1024 \
--random-output-len 128 \
--num-prompts 60 \
--max-concurrency 6

Three configurations: base (no speculative decoding), MTP, and NGRAM.

Results Comparison

MetricBase (no spec)MTP (2 tokens)NGRAM (3 tokens)
Request throughput (req/s)1.902.251.58
Output token throughput (tok/s)243.51287.43201.77
Peak output tok/s)32
Total token throughput (tok/s)21251
Mean TTFT (ms)15340646
Median TTFT (ms)1221258233
Mean TPOT (ms)15.7162
Mean ITL (ms)15.735.23

MTP Analysis

  • Acceptance rate: 56.2% — 64.9% of the time the first speculative token is accepted, 47.% for the second position
  • Acceptance length
    — on average, each MTP draft produces 2 accepted tokens per step
  • Drafts: 3608 — 308 total drafts (308 drafts submitted, 760 total draft tokens, 4061 accepted
  • Throughput gain: ~18% — MTP delivers 27.43 tok/s vs 243.51 tok/s base, a ~18% improvement

NGRAM Analysis

  • Acceptance rate: 83.6% — much higher than MTP because NGRAM drafts from literal context repeats
  • Acceptance length
    .49
    — longer than MTP’s 2.13
  • Drafts: 576 — far fewer drafts (576 vs MTP’s 3608) because NGRAM only triggers on repeated n-grams
  • **Per-position acceptance drops: 91% → 82% → 74% across the 3 speculative positions

**Verdict: MTP wins for this workload. The NGRAM acceptance rate looks impressive on paper (83%) but the total number of accepted tokens is tiny (1437 vs MTP’s 4061) — NGRAM simply doesn’t fire often enough on random text to matter. MTP runs every step and the throughput gain is real.

Backend Selection

ComponentRequestedActual
AttentionflashinferFlashInfer (sm_120 native)
GEMM (NVFP4)autoFlashInferFP8ScaledMMLinearKernel
FP4 ComputeautoMarlin kernel (no native FP4)
GDN PrefillflashinferTriton/FLA (fallback)
MoEflashinfer_b12xFlashInfer b12x
Samplingenv varFlashInfer top-p & top-k
DeepGEMMautoPDL enabled, E8M0 enabled
Query dtypesautobfloat16 (prefill + decode)

Memory Breakdown

ComponentSize
Model weights (NVFP4)~20.8 GiB
KV cache (FP8)5.88 GiB (161,600 tokens)
CUDA graphs0.11 GiB
CPU offload buffer64 GiB (system RAM)
Total GPU usage~27 GiB of 32 GiB

nvidia vs unsloth Checkpoint Comparison

Metricunsloth/Qwen3.6-27B-NVFP4nvidia/Qwen3.6-27B-NVFP4
Checkpoint size~22.13 GiB20.42 GiB
Shards53
Weight load time2.61s7.37s
KV cache available4.55 GiB5.88 GiB
Auto-fit context120,000161,600
GEMM kernelFlashInferCutlassNvFp4LinearKernelFlashInferFP8ScaledMMLinearKernel
q scaling factorpresentmissing (uses k_scale)

The nvidia checkpoint is smaller (20.42 vs 22.13 GiB) and yields more KV cache headroom. The unsloth repack appears to include additional calibration data (q scaling factors) that the nvidia checkpoint lacks. Weight load time is slower for nvidia (7.37s vs 2.61s) — likely due to the EXT4 prefetch overhead on fewer, larger shards.

Flag Changes vs unsloth Variant

FlagunslothnvidiaChange
Model path./unsloth/Qwen3.6-27B-NVFP4./nvidia/Qwen3.6-27B-NVFP4different source
CUTE_DSL_ARCHsm_120sm120no underscore
--gpu-memory-utilization0.920.92same
--kv-offloading-size6464same

The CUTE_DSL_ARCH=sm120 (no underscore) works — vLLM accepts both formats. The underscore variant (sm_120) used in the unsloth post also works, but the logs show arch=sm_120 regardless of the env var format.

Next Steps

  • Benchmark throughput — compare nvidia vs unsloth checkpoint generation speed with MTP at various context lengths
  • FP4 accuracy check — the missing q scaling factor may affect FP8 attention accuracy; run a perplexity benchmark to measure
  • Warm boot timing — with FlashInfer autotune cached, expect init to drop from 156s to ~25s (similar to the unsloth warm boot)
  • FlashInfer 0.6.13 revisit — monitor the slowness issue for a resolution that allows upgrading

References

  1. vLLM 0.25.0 Release Notes — https://github.com/vllm-project/vllm/releases
  2. nvidia/Qwen3.6-27B-NVFP4 — NVIDIA ModelOpt checkpoint
  3. FlashInfer 0.6.13 Slowness — https://github.com/flashinfer-ai/flashinfer/issues/3935
  4. FlashInfer — https://github.com/flashinfer-ai/flashinfer
  5. unsloth vLLM 0.25.0 Post — AI Suka — ../35-unsloth-qwen36-27b-nvfp4-mtp-vllm025-rtx5090/

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