vLLM 0.25.1 — TurboQuant KV Cache, 262K Context on RTX 5090

·5 min readlocal-ai

TL;DR: vLLM 0.25.1 with TurboQuant 4-bit KV cache (turboquant_4bit_nc) fits 262K context on a single RTX 5090 — leaving 316K tokens of GPU KV cache and 1.21x max concurrency. Triton GDN prefill, DeepGEMM PDL, and sm_120a Cutlass warmup round out the stack. Cold boot init: 20.21s, model loading: 3.33s.

Following up on the vLLM 0.25.0 post. The standing changes: dropped speculative decoding, switched KV cache from fp8_e4m3 to turboquant_4bit_nc, pinned context to 262K, switched GDN prefill to Triton, and targeted the correct Cutlass architecture for GeForce Blackwell.

The command:

Terminal window
CUDA_VISIBLE_DEVICES=0 \
NCCL_P2P_DISABLE=1 \
VLLM_SKIP_P2P_CHECK=1 \
CUTE_DSL_ARCH=sm_120a \
vllm serve ./unsloth/Qwen3.6-27B-NVFP4 \
--host 0.0.0.0 \
--port 8082 \
--tensor-parallel-size 1 \
--kv-cache-dtype turboquant_4bit_nc \
--max-model-len 262144 \
--max-num-seqs 6 \
--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 \
--kv-offloading-backend native \
--kv-offloading-size 32 \
--gdn-prefill-backend triton \
--chat-template ./chat_template-fixes/chat_template.jinja \
--max-num-batched-tokens 4096

TurboQuant 4-bit KV Cache

The biggest change. Previous runs used --kv-cache-dtype fp8_e4m3. This run uses turboquant_4bit_nc — 4-bit non-composite KV cache compression via Hadamard rotation and Lloyd-Max scalar quantization.

For hybrid models like Qwen3.6 (GDN linear-attention + full-attention), TurboQuant compresses only the full-attention layers. The GDN recurrent state stays at fp16 since it has no paged KV cache to quantize. The logs confirm this:

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

16 full-attention layers out of 64 total get compressed. The remaining 48 GDN layers skip TQ compression.

The result: with explicit 262K context and TurboQuant 4-bit, vLLM still has 5.36 GiB of available KV cache memory and can fit 316,282 tokens of GPU KV cache — giving 1.21x maximum concurrency at full context length. Without TurboQuant, fitting 262K context at fp16 KV would exceed the 32 GB VRAM of a single RTX 5090 after model weights consume ~21 GiB.

262K Context on 32 GB VRAM

Previous posts used --max-model-len auto, which auto-fitted context based on remaining memory. This run pins it explicitly at 262,144 tokens — the model’s documented maximum context length.

INFO: Using max model len 262144
INFO: GPU KV cache size: 316,282 tokens
INFO: Maximum concurrency for 262,144 tokens per request: 1.21x

The math works because of the stacked compression:

ComponentApproximate Size
Model weights (NVFP4)21.34 GiB
CUDA graphs0.05 GiB
KV cache (TurboQuant 4-bit, 262K ctx)~5.36 GiB
Overhead + compilation cache~3.5 GiB
Total~30.3 GiB / 32 GB

Without TurboQuant, the KV cache alone at bf16 for 262K context would consume most of the remaining ~10 GiB headroom, capping concurrency or context.

Triton GDN Prefill

Switched from flashinfer to triton for GDN prefill:

INFO: Using Triton/FLA GDN prefill kernel (requested=triton, head_k_dim=128).

The GDN (Gated Delta Network) layers use linear attention for O(1) decode memory. The prefill kernel choice affects how these layers process long prompts. Triton was previously the default; the earlier post used FlashInfer. Switching back is likely a stability preference — the FlashInfer GDN path had known edge cases with certain sequence lengths.

Blackwell GeForce Architecture: sm_120a

The environment variable changed from CUTE_DSL_ARCH=sm_120 to CUTE_DSL_ARCH=sm_120a:

Terminal window
CUTE_DSL_ARCH=sm_120a

The a suffix targets GeForce Blackwell specifically. The f suffix (sm_120f) targets datacenter Blackwell with TMA warp-specialized tactics. Cutlass’s Python DSL was initially restrictive about which architectures enabled FP4 operations — GitHub issue #2800 tracked this. The sm_120a target ensures the correct kernel templates compile:

INFO: Skipping CuTeDSL warmup because no compile units were requested.

CuTeDSL warmup is skipped here because the model uses CompressedTensors W8A8 FP8 for dense layers (handled by Cutlass C++ API, not the Python DSL), and NVFP4 GEMM is handled by FlashInfer’s Cutlass integration.

DeepGEMM PDL and E8M0

vLLM 0.25.0 bundled DeepGEMM into the wheel with SM120 support. The logs show both PDL (Prefill Deep Linear) and E8M0 (dynamic quantization exponent format) enabled:

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

DeepGEMM provides optimized GEMM kernels for deep learning workloads. PDL accelerates the prefill phase, while E8M0 enables efficient per-tensor dynamic quantization using the FP8 exponent format — important for the CompressedTensors W8A8 FP8 path.

CompressedTensors and FlashInfer

The model uses CompressedTensors format for W8A8 FP8 quantization, with FlashInfer’s Cutlass kernel handling NVFP4 GEMM:

INFO: Selected CutlassFP8ScaledMMLinearKernel for CompressedTensorsW8A8Fp8
INFO: Using FlashInferCutlassNvFp4LinearKernel for NVFP4 GEMM

FlashInfer also handles sampling:

INFO: Using FlashInfer for top-p & top-k sampling.

Fast Model Loading

INFO: Prefetching checkpoint files into page cache finished in 1.39s
INFO: Loading weights took 2.55 seconds
INFO: Model loading took 21.34 GiB memory and 3.328852 seconds

--safetensors-load-strategy prefetch background-prefetches checkpoint shards into the OS page cache while the main thread parses metadata. On EXT4 with 112 GiB available RAM and a 21.81 GiB checkpoint, the prefetch completes in 1.39s and the actual weight loading is 2.55s — dominated by GPU memory copies, not disk I/O.

Mamba Cache Alignment

The hybrid architecture triggers Mamba cache alignment mode:

INFO: Mamba cache mode is set to 'align' for Qwen3_5ForConditionalGeneration by default when prefix caching is enabled
INFO: Setting attention block size to 3072 tokens to ensure that attention page size is >= mamba page size.
INFO: Padding mamba page size by 0.38% to ensure that mamba page size and attention page size are exactly equal.

vLLM pads the Mamba page size to exactly match the attention page size so both cache types share the same block allocator. The 0.38% padding is negligible. This is documented as experimental for Mamba layers with prefix caching.

Boot Time Breakdown

Engine initialization: 20.21s total
├─ Model loading: 3.33s
├─ torch.compile: 5.11s (loaded from cache)
├─ Initial profiling/warmup: 2.95s
├─ CUDA graph capture: 1.00s
└─ KV cache + offloading setup: ~7.82s

The torch.compile cache is served from disk (2.629s to load from cache), avoiding recompilation. FlashInfer autotune configs are also cache-hit:

INFO: Config cache hit for fp4_gemm (runner=CutlassFp4GemmRunner, source=config file)

What Was Dropped

Compared to the vLLM 0.25.0 post:

  • No speculative decoding (--speculative-config removed) — speculative decoding in vLLM disables min_p and logit_bias sampling parameters, which caused the model to hallucinate on complex prompts. Without min_p, the model couldn’t filter out low-probability tokens from its distribution, producing incoherent or fabricated output on reasoning tasks. This is a known restriction — spec-decode is also incompatible with guided decoding and structured output generation.
  • No explicit --attention-backend flashinfer (auto-selects TURBOQUANT)
  • No --linear-backend auto or --moe-backend flags
  • No VLLM_USE_FLASHINFER_SAMPLER env var
  • --kv-offloading-size reduced from 64 to 32
  • --max-num-batched-tokens reduced from 8192 to 4096 (TurboQuant + chunked prefill workaround)

References

  1. TurboQuant PR #38479 — vibhavagarwal5, vllm-project/vllm (April 15, 2026) — https://github.com/vllm-project/vllm/pull/38479
  2. vLLM 0.25.0 Release — vllm-project/vllm (July 2026) — https://github.com/vllm-project/vllm/releases/tag/v0.25.0
  3. TurboQuant Fix for Qwen 3.5+ — The Neural Feed (May 5, 2026) — https://theneuralfeed.com/article/vllm-just-merged-turboquant-fix-for-qwen-3-5/ctyrhbdO
  4. TurboQuant 4-bit KV Cache Issue #41560 — vllm-project/vllm (May 3, 2026) — https://github.com/vllm-project/vllm/issues/41560
  5. Cutlass SM120 FP4 Restriction Issue #2800 — NVIDIA/cutlass (November 22, 2025) — https://github.com/NVIDIA/cutlass/issues/2800
  6. vLLM TurboQuant Documentation — vLLM Docs — https://docs.vllm.ai/en/latest/api/vllm/model_executor/layers/quantization/turboquant/
  7. DeepGEMM Repository — fpgaminer/deep_gemm — https://github.com/fpgaminer/deep_gemm
  8. Qwen3.6 Architecture — Qwen Collection, Hugging Face — https://huggingface.co/collections/Qwen/qwen36
  9. unsloth NVFP4 Dynamic Guide — Unsloth Documentation (July 14, 2026) — https://unsloth.ai/docs/basics/nvfp4
  10. This post — vLLM 0.25.0 MTP on RTX 5090

This article was written by Pi (nvidia/Qwen3.6-27B-NVFP4 | PC Eyay) with Turboquant KV cache.