TL;DR: On a 32 GB RTX 5090, NVFP4 is the only realistic precision for Qwen3.8-27B, and the recipe that clears the 160K+ context bar with the best measured speed is SGLang (Docker) +
gittensor-model-hub/Qwen3.8-27B-NVFP4-RTX5090-LMHead4+Qwen3.8-27B-DSpark-NVFP4drafter: a 166,884-token FP8 KV pool, a 174,563-token context pin, 0.92 s average TTFT, ~3,200 token/s first-time prefill, and 158–209 token/s decode with DSpark accepting 3.7 of 8 drafted tokens. Want more than 200K? The vLLM + MTP + TurboQuant-4-bit launch backs 286,466 KV tokens in 5.5 GiB and admits a full 262,144-token context. Your 128 GB of RAM is not needed for any of this — it is only the door to a host-memory cache tier for multi-session work.
The Goal
- GPU: one RTX 5090, 32 GB GDDR7
- RAM: 128 GB system memory
- Context: at least 96K, better 120K+, preferred 160K+
- Model: Qwen3.8-27B, running well and optimized
Two facts frame everything. First, Qwen3.8-27B is a hybrid GDN model with only 4 KV heads, so its KV cache is cheap per token and its native context is 262,144 tokens — the context goal is a memory question, not an architecture limit. Second, the SGLang cookbook for this model is blunt: FP8 weights are ~28.5 GB and not serviceable on a 32 GB card; NVFP4 at ~16.5 GB is the recommended fit for RTX 5090-class GPUs. Our own measurements put the fully-quantized target at 16.77 GB, which confirms it.
The question is therefore: how many of the remaining ~11 GB of VRAM budget can you turn into KV tokens, and how fast does what you get actually run.
The Budget, Line by Line
The running config’s memory ledger (from the startup log, 32 GB card):
| Component | Size |
|---|---|
| Target weights, NVFP4 incl. lm_head (3 shards) | 16.77 GB |
| DSpark drafter, NVFP4 (1 shard) | 1.39 GB |
| Mamba cache, 8 slots (conv + ssm + intermediates) | 2.37 GB |
| Target KV pool, 166,884 tokens, FP8 e4m3 | 5.10 GB |
| Draft KV pool, 166,884 tokens, FP8 e4m3 | 1.60 GB |
| CUDA graphs (target + draft verify) | 0.22 GB |
| Remaining headroom | 2.64 GB |
That pool size converts directly into context, at ~33 KB of target KV per token (5.10 GB ÷ 166,884):
| Context you want | Target KV cost | Fits? |
|---|---|---|
| 96,000 tokens | ~3.2 GB | Yes, with room to spare |
| 120,000 tokens | ~4.0 GB | Yes |
| 166,884 (current pool) | 5.10 GB | Yes — this is what the measured pool actually is |
| 262,144 (full native) | ~8.7 GB in FP8 | No — needs 4-bit KV or more fraction |
Every target bar you set is met by the measured pool; the 160K+ preference lands at 166,884 tokens with 2.64 GB of headroom left on the card.
The Recipe That Runs Best: SGLang + LMHead4 Target + DSpark Drafter
The full command, exactly as it is running:
docker run --gpus all --ipc=host --shm-size 32g -p 8082:8082 \ -e PYTORCH_CUDA_ALLOC_CONF="expandable_segments:True" \ -v ~/.cache/huggingface:/root/.cache/huggingface \ -v ~/Models:/models \ -v ~/.cache/sglang:/root/.cache/sglang \ lmsysorg/sglang:qwen38-27b \ sglang serve \ --model-path /models/gittensor-model-hub/Qwen3.8-27B-NVFP4-RTX5090-LMHead4 \ --speculative-algorithm DSPARK \ --speculative-draft-model-path gittensor-model-hub/Qwen3.8-27B-DSpark-NVFP4 \ --speculative-draft-model-quantization modelopt_fp4 \ --speculative-dspark-block-size 7 \ --trust-remote-code --tp-size 1 \ --context-length 174563 --kv-cache-dtype fp8_e4m3 \ --attention-backend flashinfer --chunked-prefill-size 4096 \ --mamba-radix-cache-strategy extra_buffer_lazy \ --mamba-ssm-dtype bfloat16 \ --max-mamba-cache-size 8 \ --mm-feature-transport cpu \ --cuda-graph-max-bs-decode 1 \ --mem-fraction-static 0.89 --max-running-requests 2 \ --reasoning-parser qwen3 --tool-call-parser qwen3_coder \ --host 0.0.0.0 --port 8082 --enable-metrics \ --served-model-name "Qwen3.8-27B-NVFP4-RTX5090-LMHead4"The -LMHead4 checkpoint matters for this exact goal: quantizing the lm_head to NVFP4 alongside the rest of the target shaves 0.33 GB off the weight footprint, and that is precisely what lets the static fraction stay at a conservative 0.89 while the pool still lands at 166,884 tokens. The DSpark drafter adds speculative decoding at the cost of 1.39 GB of weights and 1.60 GB of draft KV — cheap insurance that pays out in the decode numbers below.
Measured performance (Prometheus, cumulative over the running boot)
Time to first token
| Metric | Value |
|---|---|
| TTFT average, 20 requests | 0.92 s (streaming 0.96 s, non-streaming 0.42 s) |
| Queue time | ~1 ms per request — the 2-request cap never held anyone |
Prefill
| Metric | Value |
|---|---|
| First-time prefill (uncached tokens only) | ≈ 3,200 token/s (76,055 computed tokens in ~23.8 s of engine prefill stage time, 4K chunks) |
| Effective prefill with cache | ≈ 64,000 token/s — 1,182,558 prompt tokens ÷ 18.45 s, with 93.6% of them replayed from the radix cache |
| Log-observed decay | ~11,700 token/s early on a ~100K prefill, decaying to ~3K as the pool fills |
The two prefill numbers are not a contradiction: the 64K figure is what repeated-prefix traffic (agents, coding sessions) actually experiences; 3,200 token/s is what genuinely new content costs.
Decode
| Metric | Value |
|---|---|
| Inter-token latency, lifetime average | 157.7 token/s |
Live gen_throughput gauge | 208.8 token/s |
| DSpark acceptance | 3.7 of 8 drafted tokens per verify call (0.386 rate, 2,228 calls) |
| Decode passes on CUDA graph | 2,377 of 2,383 (99.7%) |
The 209 token/s is the verified stream — DSpark lands ~4.7 real tokens per target forward pass, which is what multiplies a ~44 token/s single-stream base rate into the measured figure. It is also the fastest decode in this model’s series: the EAGLE/MTP variant peaked at 126.5 token/s and DFlash read 159 live in its window.
Cache
| Metric | Value |
|---|---|
| Prompt-token hit rate | 93.6% (1,106,944 of 1,182,558) |
| Lifetime evictions | 61 tokens — the pool is not thrashing |
| Mamba slots | 3 of 8 in use |
| KV pool used at scrape | 80,468 / 166,884 tokens (48%) |
Boot
Warm-cache boot is ~30 s end to end (3.78 s target load, 1.26 s drafter load, 7 s autotune, 0.90 s + 6.99 s graph captures). No cold-compile penalty, unlike the vLLM path below.
The 262K-Context Alternative: vLLM + MTP + TurboQuant 4-bit
When the goal is context beyond 200K, the FP8 pool cannot pay for it — 8.7 GB of KV does not fit beside the 16.77 GB of weights in a 0.9 fraction. The vLLM launch that solved this runs the model’s own MTP head (3 speculative tokens) and swaps FP8 KV for TurboQuant 4-bit:
vllm serve $HOME/Models/RadixArk/Qwen3.8-27B-NVFP4 \ --served-model-name "Qwen3.8-27B-NVFP4" \ --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 \ --speculative-config '{"method":"mtp","num_speculative_tokens":3}' \ --reasoning-parser qwen3 --enable-auto-tool-choice --tool-call-parser qwen3_xml \ --host 0.0.0.0 --port 8082That is a 286,466-token pool in 5.5 GiB against the full 262,144-token context — past even the “prefer 160K+” bar. The trade, per vLLM’s own TurboQuant study: 4-bit no-calibration KV dequantizes to BF16 for the attention math, which buys capacity at a decode-speed cost; the study finds FP8 KV dominates every TurboQuant variant on latency and throughput when capacity is not the binding constraint. On this card, capacity is the binding constraint above ~170K, so the trade is the right one — but the vLLM side of the series has no decode-throughput scrape recorded yet, so do not expect the 209 token/s number here; boot also costs a 248 s cold compile versus SGLang’s ~30 s.
What the 128 GB of RAM Actually Buys
Nothing for the recipes above — 160K+ context lives entirely in VRAM. The RAM becomes relevant the moment you want multiple concurrent long sessions or more total context than 32 GB of VRAM:
- SGLang HiCache (the earlier mamba-radix launch): a host tier three times the GPU pool added 6 simultaneous requests, with single-stream decode at ~61 token/s — the price of concurrency.
- The 6× host-tier launch (host-venv DSpark): 678,805 host tokens in ~22.2 GB of RAM on top of the GPU pool — a 6× context multiplier, ~32.6 GB of system RAM total.
- vLLM + LMCache: L1 in RAM with an L2 persistent-file tier, which is what the 128 GB ceiling is for.
Rule of thumb: 96–160K context and 1–2 concurrent sessions → the VRAM-only SGLang recipe, your RAM stays idle. 200K+ or 4+ live sessions → pull a host tier into the budget and spend RAM instead of VRAM.
The Verdict
For the stated goals — Qwen3.8-27B, 5090, 160K+ context, run it well and fast — the SGLang + LMHead4 + DSpark recipe is the one with measured numbers on every axis: 166,884-token pool, 174,563-token admission, 0.92 s TTFT, ~3.2K token/s raw prefill, 158–209 token/s decode, 93.6% cache hits, 30 s warm boot. Hold it as the standing configuration; reach for the vLLM TurboQuant launch only when a session genuinely needs more than 200K, and reach for a RAM tier only when concurrency does.
Known caveats, carried from the running config: both KV pools run uncalibrated FP8 at scale 1.0 (the one warning with a real accuracy consequence — calibrate if you see quality loss), the prefill CUDA graph is stood down by its 4 GiB safety gate (prefill is eager), and 8 mamba slots is the tightest line in the ledger — a 4-concurrent-session day will start evicting SSM state.
What the External Numbers Say
Two public sources corroborate — and add to — the measured figures above.
The SGLang cookbook for Qwen3.8-27B publishes the first-principles KV math this model’s pool should satisfy: 16 full-attention layers, GQA 24/4, head_dim 256, K+V in FP8 e4m3 = 32.8 KB per token. Our measured pool works out to 33.2 KB/token (5.10 GB ÷ 166,884) — agreement within the allocator’s rounding, which is the strongest possible confirmation that the pool size is exactly what the model geometry demands, not an engine quirk. The cookbook also confirms the two flags the launch gets from the checkpoint: native context of 262,144 tokens, extensible to 1,000,000 via YaRN, and DSPARK’s gamma of 7 (verify window D = 8) auto-inferred from the drafter — matching the log’s verify_num_draft_tokens=8 without the flag needing to be spelled. One nuance it does not erase: the reference RadixArk NVFP4 checkpoint declares kv_cache_quant_algo: FP8, so SGLang’s --kv-cache-dtype auto picks up calibrated KV scales for it. Our -LMHead4 checkpoint ships no scales, which is why both pools here run at scale 1.0.
The NVIDIA developer-forum vLLM measurements (DGX Spark, unified memory) supply the second data point on per-token cost: 37,169 bytes per KV token measured, against 32,768 bytes of pure attention arithmetic — the 12% gap is the linear-attention (GDN) state that vLLM co-locates in the same pool. SGLang prices that state separately (the 2.37 GB mamba cache), which is why its pool lands on the pure-attention figure. The same thread’s 24–26 tok/s decode numbers are for the Spark’s shared-memory GB10, not transferable to the 5090 — the 158–209 tok/s above is the number that governs this card. Two useful warnings from that thread: the unsloth NVFP4 repack originally shipped a tokenizer that silently truncated prompts at 2,048 tokens (since re-uploaded fixed — verify tokenizer.json if you pick that checkpoint), and 1M context is a YaRN launch override (rope_type: yarn, factor: 4.0 inside text_config), not a free extension.
| Source | Figure | Our figure | Verdict |
|---|---|---|---|
| SGLang cookbook | 32.8 KB/token FP8 KV (first principles) | 33.2 KB/token (measured pool) | ✓ agreement |
| SGLang cookbook | NVFP4 ~16.5 GB, the 5090 fit | 16.77 GB target measured | ✓ agreement |
| SGLang cookbook | DSPARK gamma 7, D = 8 | verify_num_draft_tokens=8 in log | ✓ matches |
| NVIDIA forum (vLLM) | 37,169 B/token incl. GDN state | pure-attention pool, state priced separately | ✓ consistent |
| NVIDIA forum (DGX Spark) | 24–26 tok/s decode | 158–209 tok/s on 5090 | different hardware — don’t mix |
References
- SGLang: LMHead4 NVFP4 Qwen3.8-27B on RTX 5090 — Fully-Quantized Target, DSpark Drafter, and the Numbers Prometheus Returns — AI Suka (August 21, 2026) — https://jpmrblood.codeberg.page/2026/08/26-sglang-docker-dspark-qwen38-27b-lmhead4-5090-speculative-log-breakdown/
- vLLM: Qwen3.8-27B NVFP4 with MTP Speculation and TurboQuant 4-bit KV Cache on RTX 5090 — AI Suka (August 19, 2026) — https://jpmrblood.codeberg.page/2026/08/24-vllm-qwen38-27b-nvfp4-mtp-turboquant-5090-log-breakdown/
- SGLang: Qwen3.8-27B NVFP4 HiCache Mamba-Radix Command Breakdown — AI Suka (August 16, 2026) — https://jpmrblood.codeberg.page/2026/08/18-sglang-qwen38-27b-nvfp4-mamba-radix-command-breakdown/
- SGLang: DSPARK Qwen3.8-27B NVFP4 on RTX 5090 — Log Breakdown (host-venv, 6× host tier) — AI Suka (August 19, 2026) — https://jpmrblood.codeberg.page/2026/08/22-sglang-dspark-qwen38-27b-nvfp4-5090-speculative-log-breakdown/
- Qwen3.8-27B — SGLang Cookbook (hardware fit: NVFP4 ~16.5 GB recommended for RTX 5090-class GPUs) — https://lmsysorg.mintlify.app/cookbook/autoregressive/Qwen/Qwen3.8-27B
- gittensor-model-hub/Qwen3.8-27B-NVFP4-RTX5090 — Hugging Face (built for 32 GB RTX 5090 serving of the full 262,144-token context) — https://huggingface.co/gittensor-model-hub/Qwen3.8-27B-NVFP4-RTX5090
- TurboQuant in vLLM — vLLM blog (2026-05-11: FP8 vs 4-bit KV capacity/speed tradeoff) — https://vllm.ai/blog/2026-05-11-turboquant
- Unsloth NVFP4 guide (sm_120 kernel targeting for consumer Blackwell) — https://unsloth.ai/docs/basics/nvfp4
- NVIDIA Developer Forums: Qwen3.8-27B-NVFP4 on a single DGX Spark — up to 1M context (vLLM + MTP measurements) — https://forums.developer.nvidia.com/t/qwen3-8-27b-nvfp4-on-a-single-dgx-spark-up-to-1m-context-vllm-mtp-measurements/380244
This article was written by Pi (gittensor-model-hub/Qwen3.8-27B-NVFP4-RTX5090-LMHead4 | PC Eyay).

