Qwen3.8-27B NVFP4, 258K Context on RTX 5090 — Measured SGLang Serving Speeds

·5 min readlocal-aiself-hosting

Last updated on

TL;DR: One RTX 5090 serves a 258,043-token FP8 KV cache of Qwen3.8-27B NVFP4 under SGLang — an 18-slot mamba state pool caps concurrency at 4 requests, a 3.0x HiCache tier parks about 29.7 GB of host RAM behind the radix cache, and the server reaches ready-to-roll in 54 s. A 10-minute Prometheus window of cache-heavy live traffic later measured ~1.0 s average TTFT, ~10.2K tok/s prefill, ~109 tok/s decode.

The gittensor-model-hub NVFP4 recipe of Qwen3.8-27B pushed to a 258K-token pool — one step beyond the 160K context recipe and the sibling HiCache + mamba-radix SGLang launch. This is the complete docker run + sglang serve command and the full startup log, knob by knob, with links to ground every claim.

The Command

Terminal window
docker run --gpus all --ipc=host --cap-add=SYS_PTRACE --shm-size 32g -p 8082:8082 \
-e PYTORCH_CUDA_ALLOC_CONF="expandable_segments:True,max_split_size_mb:512" \
-e CUDA_VISIBLE_DEVICES=0 \
-e NCCL_P2P_DISABLE=1 \
-e FLASHINFER_MAX_NUM_SEQS=16 \
-e CUTE_DSL_ARCH=sm_120 \
-v ~/.cache/huggingface:/root/.cache/huggingface \
-v ~/Models:/models \
-v ~/.cache/sglang:/root/.cache/sglang \
lmsysorg/sglang:qwen38-27b \
sglang serve \
--trust-remote-code \
--model-path /models/gittensor-model-hub/Qwen3.8-27B-NVFP4-RTX5090-LMHead4 \
--chat-template /models/chat_template-fixes/peculiar-ragdoll/chat_template.jinja \
--mm-feature-transport=cpu \
--enable-hierarchical-cache \
--hicache-ratio 3.0 \
--mem-fraction-static 0.85 \
--max-mamba-cache-size 18 \
--mamba-ssm-dtype bfloat16 \
--mamba-radix-cache-strategy extra_buffer_lazy \
--attention-backend flashinfer \
--chunked-prefill-size 2048 \
--reasoning-parser qwen3 \
--tool-call-parser qwen3_coder \
--kv-cache-dtype fp8_e4m3 \
--context-length 258043 \
--host 0.0.0.0 \
--port 8082 \
--enable-metrics \
--served-model-name "gittensor-model-hub/Qwen3.8-27B-NVFP4-RTX5090-LMHead4"

The container layer is a thin GPU and IPC wrapper. The interesting surface is the sglang serve flag stack, grouped below by what each cluster controls.

The Three Artifacts

lmsysorg/sglang:qwen38-27b

LMSYS org on Docker Hub release a special image of SGLang for Qwen-3.8-27B. It is used for in official install docs. It also includes pinned dependencies and runtime tweaks for Gated DeltaNet (GDN) Mamba memory ratios to run Qwen3.8 efficiently on GPU clusters.

The image has 5M+ pulls and took ~200K pulls in the last week alone. It baked in a CUDA 13.0.3 toolkit, FlashInfer 0.6.18 with a sm120 autotune cache, and the GDN hybrid-attention + mamba-pool stack.

One tidbit: the triplicated SGLANG_FLASHINFER_PR4266_SOURCE deprecation notices say the image’s SGLang snapshot still aliases an env var that current main has dropped, so this is a moving main-branch build rather than a pinned release.

This image can be used later to add more features like DFlash2.

gittensor-model-hub/Qwen3.8-27B-NVFP4-RTX5090-LMHead4

This model is the quantized head of recipe page. The model is an RTX 5090-specific NVFP4 quantization of Qwen/Qwen3.8-27B. It was built with NVIDIA Model Optimizer (W4A4 weights, group size 16, FP8 KV cache). The base BF16 model is ~53 GB; this export lands at ~17 GB in VRAM and still holds the native 262,144-token context.

The LMHead4 version, which we are using, further sqeeze the size by quantizing lm_head to NVFP4, shaving 1.8 GB off the per-token read path and lifting bandwidth-bound decode from 81.6 to 88.5 tok/s at ~92% of the 5090’s 1.79 TB/s. The recipe also ships a matching 1.41 GB DSpark drafter that pushes decode to 180.3 tok/s (2.04x, +31.7% over the built-in MTP head at a quarter of its memory).

However, we target our launch with no MTP enabled.

peculiar-ragdoll/Qwen-Sharp-Chat-Templates

The repo is a drop-in chat template for Qwen 3.5 / 3.6 / 3.8. It is froggeric’s Qwen-Fixed-Chat-Templates with terseness prompt appended after the caller’s own system prompt.

The template also leaves thinking retention on, so the model remembers what it thought last turn and follow-up turns hit the prompt cache. It try to resolve issues where “Fast Mode” (thinking-off) injected conflicting system instructions that broke tool calling or generated loop artifacts.

The repo reports fewer thinking tokens at equal accuracy, and one 3.6 build scored +7.4 answer points on Claw-Eval while cutting answer tokens by 59%. That retention is one reason the measured window above shows a sub-second median TTFT.

The repo ships a small tool, check_applied.py, to check if the fresh .jinja file sitting next to a stale embedded template copy silently does nothing.

Flag Breakdown

--model-path with --trust-remote-code and --chat-template

The LMHead4 suffix marks the build whose language-model head is quantized to 4 bits alongside the NVFP4 body, which is what keeps the weight footprint at 16.77 GB instead of the ~20 GB of the mixed-precision checkpoint.

--trust-remote-code lets the model’s own loader code run, and --chat-template points at a hand-fixed Jinja template — the startup log later shows SGLang auto-detecting the reasoning and tool parsers from that file, so the template is the source of truth for conversation format.

--mm-feature-transport=cpu moves multimodal feature tensors over the CPU instead of the GPU. Our job mostly about text so we don’t need the multimodal weights in the GPU. the flag just keeps the dormant multimodal pipeline off the device.

--context-length with --kv-cache-dtype and --mem-fraction-static

The memory budget cluster. --context-length 258043 sizes the pool at exactly 258,043 tokens — not a round 262,144 (256K), a computed ceiling that fits the card. The number is from the reported size of GPU total KV cache. That’s why I run sglang twice, I need first run to get the reported size of GPU total KV cache, and then the second run to use that number as --context-length.

--kv-cache-dtype fp8_e4m3 halves the per-token KV cost relative to bfloat16 (about 30.5 KB per token for K+V here), which is the lever that puts 258K on a 32 GB card in the first place.

--mem-fraction-static 0.85 gives SGLang 85% of GPU memory as the static budget — weights, mamba states, CUDA graphs — and sizes the dynamic KV pool out of the rest. This is the right number where the prefill and decode can use compiled CUDA graphs.

--max-mamba-cache-size with --mamba-ssm-dtype and --mamba-radix-cache-strategy

Qwen3.8-27B is a hybrid model — mostly Gated DeltaNet (GDN) linear-attention layers, a few full-attention layers — so inference state is not just KV cache. Each linear-attention layer keeps a small recurrent state (conv state + SSM state), and SGLang pools that state in a mamba cache, with all three flags documented in SGLang’s server-arguments reference.

--max-mamba-cache-size 18 is the slot count; the model needs 4 state slots per request, so this is also the concurrency cap (the startup log says so explicitly). I set this because I never see more than 3/4 concurrent requests happening at the same time. So, making the MAMBA cache bigger is wasteful.

From my experiment, one request uses 3 slots. This configuration should be enough for running 6 concurrent requests (if ever can).

--mamba-ssm-dtype bfloat16 keeps the SSM state at bf16 instead of fp32, halving the state footprint — already the cheap setting here.

--mamba-radix-cache-strategy extra_buffer_lazy selects how mamba state is retained and evicted in the radix tree, with the extra buffer materialized lazily instead of up front.

--enable-hierarchical-cache with --hicache-ratio 3.0

HiCache extends the radix cache with a host-RAM tier, per SGLang’s HiCache docs — evicted device prefixes land in RAM, so a later cache miss degrades to a copy instead of a full re-prefill.

The ratio is the host pool size in multiples of the device pool, and per the same docs it must be greater than 1. At 3.0 the host pool is three times the 258,043-token device pool — 774,130 tokens, about 25.4 GB of system RAM, confirmed by the allocation lines in the log below.

--attention-backend with --chunked-prefill-size

--attention-backend flashinfer picks FlashInfer for the full-attention layers’ prefill and decode kernels — the backend that carries sm_120 (consumer Blackwell) support, per SGLang’s attention-backend reference, matching the CUTE_DSL_ARCH=sm_120 pin in the environment section.

--chunked-prefill-size 2048 caps prefill chunks at 2048 tokens, keeping decode latency responsive while a long prompt is being chunked through the prefill pipeline. The startup log shows the prefill CUDA-graph capture sizes (4 up to 2048) mirroring this cap, and max_prefill_tokens=16384 as the combined budget.

I tried 4096 as the chunk size, but it makes more requests stalled. By using 2048 as the chunk size, The batch manager can pick the job. However, we can still have stalled requests when one big request decoding big tokens. I haven’t found a way to avoid this yet.

--reasoning-parser with --tool-call-parser

The Qwen3 thinking split — --reasoning-parser qwen3 marks where thinking ends and the answer begins in the stream, per SGLang’s reasoning-model docs — and --tool-call-parser qwen3_coder parses qwen3-coder-style function calls out of the streamed output, per the tool-parser docs. The log confirms both were also auto-detected from the chat template’s feature declarations, so the flags here just assert what the template already says.

--host with --port and --enable-metrics

--host 0.0.0.0 binds all container interfaces so the published -p 8082:8082 actually reaches it; --port 8082 is the OpenAI-compatible endpoint. --enable-metrics turns on the Prometheus /metrics endpoint (the sglang:* counters and time_to_first_token_seconds histogram), per SGLang’s production-metrics docs — the same --enable-metrics surface the 160K recipe post reads through Prometheus for its measured-speeds section.

Environment Variables

PYTORCH_CUDA_ALLOC_CONF="expandable_segments:True,max_split_size_mb:512"

The standard anti-fragmentation pair from PyTorch’s CUDA notes — the same two knobs as the vLLM twin launch. Expandable segments stop the caching allocator from stranding unusable gaps, and the 512 MB cap on max_split_size_mb keeps the big long-lived allocations (the 16.8 GB weight block, two KV pools, the mamba pool) from being shredded by churning activation tensors.

CUDA_VISIBLE_DEVICES=0

The --gpus all wrapper exposes every card on the host; this narrows the launch to a single RTX 5090, making it a TP=1 run — no NCCL across devices, and the mamba pool + KV pool sized above is what one 32 GB card holds.

NCCL_P2P_DISABLE=1

Disables NCCL’s peer-to-peer GPU-to-GPU direct transport. With a single visible GPU there is nothing to P2P between, so this is inert here — a carry-over from the multi-GPU recipes this one was derived from. Per the NCCL environment variables reference.

FLASHINFER_MAX_NUM_SEQS=16

Caps the sequence batch that FlashInfer’s prefill kernels are compiled for — one of the FLASHINFER_* variables in the FlashInfer docs, which also document the JIT kernel cache this launch’s autotune reuses. FlashInfer templates its batched prefill kernels over a fixed max-sequence count, so this bounds the template search (faster first boot, less compile VRAM) at the cost of capping how many sequences can prefill in one batched pass — fine for a 4-concurrency server, would be the first knob to raise for heavier multi-stream prefill.

CUTE_DSL_ARCH=sm_120

The RTX 5090 is consumer Blackwell — compute capability sm_120, not the sm_10x of the datacenter parts the image’s CUTLASS-based kernels target by default. Pinning the arch for the CuTe-DSL (CUTLASS DSL) kernel path tells the compiler to build for the actual silicon instead of falling back to a generic or datacenter-targeted codegen — a knob the CUTLASS project tracks for consumer-Blackwell targeting, and FlashInfer ships sm120 kernels for exactly this part.

Honestly, I don’t think this knob is needed. I don’t see any CuteDSL kernels being used in the log.

What the Startup Log Reveals

The full boot, from the container’s first line to the first ready request — 54 s. Phases in log order.

Boot noise

==========
== CUDA ==
==========
CUDA Version 13.0.3
Container image Copyright (c) 2016-2023, NVIDIA CORPORATION & AFFILIATES. All rights reserved.

The entrypoint prints the CUDA version under a banner; the “Copyright 2016-2023” line is NGC’s carried-over boilerplate, cosmetic next to a CUDA 13.0.3 toolkit. The rest of the boot is warnings, none fatal:

MessageWhat it means
SGLANG_FLASHINFER_PR4266_SOURCE has been deprecated (×3)This image’s SGLang build still references an internal env var that is now renamed — the notice comes from SGLang’s own env-var aliasing machinery in srt/environ.py; the variable is gone from current main.
KernelPreference / ScaleCalculationMode register_constant deprecationstorch.compile now treats Enum subclasses as opaque constants natively; the warnings come out of the autotune compile pass and need no action.
Unable to import 'torchao' Tensor objectsThe optional torchao deserializer is not installed in the image. Safe here — this checkpoint is ModelOpt NVFP4, not torchao-serialized.
No module named 'helion', sarashina2_vision ... MultimodalDataItemTwo optional multimodal processors that this image does not bundle; SGLang skips them at import time.
The 'use_fast' parameter is deprecatedA transformers processor warning, unrelated to this launch.
Compiled-kernel caches now live under SGLANG_CACHE_DIRSGLang moved compiled-kernel and autotune caches to ~/.cache/sglang — exactly the directory the -v ~/.cache/sglang mount persists.

Arguments, multimodal scaffolding, and chat template

The server_args=ServerArgs(...) dump (14,571 chars, truncated in the capture) confirms every flag from the command made it through. SGLang still spins up its multimodal scaffolding for the text-only model — 16 auto-sized data-loading threads and 2 isolated processor threads — because the model class ships multimodal capability even when nobody uses it.

The chat-template block is where the parser flags land:

[2026-08-21 16:51:02] Loading chat template from argument: /models/chat_template-fixes/peculiar-ragdoll/chat_template.jinja
[2026-08-21 16:51:02] Detected user specified Jinja chat template with content format: openai
[2026-08-21 16:51:02] Auto-detected template features: reasoning_config=ReasoningToggleConfig(toggle_param='enable_thinking', default_enabled=True, special_case=None, effort_kwarg=None), reasoning_parser=qwen3, tool_call_parser=qwen3_coder

The template declares enable_thinking as a toggle (on by default), and SGLang auto-detects the qwen3 / qwen3_coder parsers from it — the same pair the command passes explicitly, so the flags are consistent with the template rather than overriding it.

Model load — NVFP4 through the ModelOpt loader

[2026-08-21 16:51:05] Load weight begin. avail mem=30.71 GB
[2026-08-21 16:51:05] Using ModelOptModelLoader due to ModelOpt quantization config.
[2026-08-21 16:51:05] ModelOptModelLoader: Loading base model...
[2026-08-21 16:51:05] Model is already quantized, loading directly...
[2026-08-21 16:51:05] Detected nvfp4 checkpoint. Please note that the format is experimental and subject to change.
Multi-thread loading shards: 100% Completed | 3/3 [00:01<00:00, 2.73it/s]
[2026-08-21 16:51:09] Load weight end. elapsed=3.80 s, type=Qwen3_5ForConditionalGeneration, quant=modelopt_fp4, quant_algo=NVFP4, avail mem=13.94 GB, mem usage=16.77 GB.

The checkpoint ships pre-quantized — a ModelOpt NVFP4 quantization config plus scales — so the loader skips any runtime quantization pass and maps the 4-bit weights straight into VRAM, in 3.80 s across three shards. SGLang’s own caveat — “the format is experimental and subject to change” — applies to this NVFP4 path, per the NVFP4 recipe in the Model Optimizer docs and SGLang’s quantization reference.

Between the shards, 48 identical lines of Enabled fused SiLU+mul+FP4-quant for dense MLP down_proj input — one per dense MLP layer: SGLang fuses the SiLU-gate multiply and the FP4 requantization of the down-proj input into a single kernel, so the NVFP4 MLPs never round-trip through bfloat16. One using attn output gate! line confirms the hybrid model’s gated attention output is honored in the kernels.

One warning in this block deserves the attention:

[2026-08-21 16:51:09] Using FP8 KV cache but no scaling factors provided. Defaulting to scaling factors of 1.0. This may lead to less accurate results!

The checkpoint does not ship per-tensor FP8 scales for its KV cache, so SGLang quantizes K and V with a scale of 1.0 — the honest trade that fits 258K tokens on 32 GB, flagged as a precision risk rather than hidden (the default and its warning are tracked in sglang issue #31224).

The mamba pool and the concurrency cap

[2026-08-21 16:51:10] max_running_requests is capped to 4 by the mamba state cache (max_mamba_cache_size=18, 4 state slots per request). To raise it: increase --mamba-full-memory-ratio or --max-mamba-cache-size, or halve the state size with --mamba-ssm-dtype bfloat16.
[2026-08-21 16:51:10] Mamba Cache is allocated. max_mamba_cache_size: 18, conv_state size: 0.05GB, ssm_state size: 1.34GB

18 slots ÷ 4 slots per request = 4 live requests, hard-capped by the state pool, not by VRAM — the cap is computed in SGLang’s KV-cache configurator. The 1.34 GB of SSM state works out to about 74.4 MB per slot, and the dtype lever the message offers is already min’d out — --mamba-ssm-dtype bfloat16 is what was passed, so the real levers are --max-mamba-cache-size or --mamba-full-memory-ratio.

The KV cache pool and the memory budget

[2026-08-21 16:51:10] KV Cache is allocated. dtype: torch.float8_e4m3fn, #tokens: 258043, K size: 3.94 GB, V size: 3.94 GB
[2026-08-21 16:51:10] Memory pool end. avail mem=4.64 GB

The full device-side ledger against the 0.85 static budget (27.2 GB of the card’s 32 GB) is:

ComponentSize
Weights, NVFP4 + scales (LMHead4 variant)16.77 GB
KV cache, 258,043 tokens FP8 (K + V)7.88 GB
Mamba state, 18 slots bf161.39 GB
CUDA graphs, prefill + decode1.26 GB
Total static~27.3 GB
Left over for runtime2.84 GB

Per-token KV cost is 7.88 GB ÷ 258,043 ≈ 30.5 KB for K+V together — the FP8 price of a 258K context on a consumer card. The host side is the HiCache tier:

ComponentSize
HiCache KV host pool, 774,130 tokens25.37 GB
HiCache Mamba host pool, page_first4.31 GB
Total host RAM reserved~29.7 GB

The ratio check lands where --hicache-ratio 3.0 says it should — 774,130 tokens is exactly 3 × 258,043 plus one alignment token, matching the HiCache launch’s own arithmetic. In bytes the host pools run slightly wider than a strict 3.0x (25.37 ÷ 7.88 ≈ 3.22, 4.31 ÷ 1.39 ≈ 3.10) — page alignment and layout bookkeeping on top of the token math.

Attention kernels, autotune, and CUDA graphs

[2026-08-21 16:51:10] Linear attention kernel backend: decode=triton, prefill=triton, verify=triton
[2026-08-21 16:51:10] Using hybrid linear attention backend for hybrid GDN models.
[2026-08-21 16:51:10] GDN kernel dispatcher: decode=TritonGDNKernel, extend=TritonGDNKernel, verify=TritonGDNKernel packed_decode=True
[2026-08-21 16:51:10] Running FlashInfer autotune with cache: /root/.cache/sglang/flashinfer/autotune/0.6.18/sm120/9f9afea22e6210b3/rank_tp0_pp0_dp0.json
[2026-08-21 16:51:10] Using fused GDN decode QKVZ/BA unpack + indexed Conv1D.
[2026-08-21 16:51:17] FlashInfer autotune completed.

The hybrid GDN layers run on Triton kernels in all three phases (decode, prefill, verify), with packed_decode=True and a fused QKVZ/BA unpack plus indexed Conv1D as the decode specialization — the dispatch itself lives in SGLang’s GDN backend and its hybrid linear-attention dispatcher. FlashInfer 0.6.18 autotunes for sm120 in 7 s, and the cache path — under ~/.cache/sglang/flashinfer/autotune/..., the mounted SGLANG_CACHE_DIR — means a second boot of this image skips the tuning entirely.

[2026-08-21 16:51:17] Capture target prefill CUDA graph begin. backend=breakable, num_tokens=[4, 8, ..., 2048], avail mem=4.10 GB
[2026-08-21 16:51:25] Capture target prefill CUDA graph end. elapsed=8.56 s, mem usage=1.18 GB, avail mem=2.92 GB.
[2026-08-21 16:51:25] Capture target decode CUDA graph begin. backend=full, num_tokens_per_req=1, bs=[1, 2, 4], avail mem=2.92 GB
[2026-08-21 16:51:27] Capture target decode CUDA graph end. elapsed=1.17 s, mem usage=0.08 GB, avail mem=2.84 GB.
[2026-08-21 16:51:27] max_total_num_tokens=258043, chunked_prefill_size=2048, max_prefill_tokens=16384, max_running_requests=4, context_len=258043, available_gpu_mem=2.84 GB

42 prefill graph sizes, 4 up to 2048 — the chunked-prefill cap again, captured with the breakable graph backend (SGLang’s SGLANG_USE_BREAKABLE_CUDA_GRAPH mode, one of the switches in srt/environ.py) in 8.56 s (+1.18 GB). Three decode graphs, batch sizes 1, 2 and 4 — the running-requests cap made concrete — in 1.17 s (+0.08 GB). Zero time on every draft-graph bucket (target_verify=0.00, draft_* all zero): no speculative-decode machinery was captured, consistent with a plain target-only launch.

The HiCache host tier

[2026-08-21 16:51:27] Init Unified Radix Cache. Components: (<ComponentType.FULL: 0>, <ComponentType.MAMBA: 2>). Tree Core: UnifiedTreeCore
[2026-08-21 16:51:38] Allocating kv hierarchical KV host pool: 774130 tokens, 25.37 GB host memory.
[2026-08-21 16:51:38] Allocating 4.31 GB host memory for hierarchical Mamba cache (layout=page_first).
[2026-08-21 16:51:38] Attached hybrid pool stack to UnifiedRadixCache: pools=KV + MAMBA, transfer_layer_num=64
[2026-08-21 16:51:38] Tree cache initialized: source=default impl=UnifiedRadixCache hybrid_swa=False hybrid_ssm=True hierarchical=True streaming_wrapped=False

Reserving 29.7 GB of host pool takes ~11 s of wall time between the tree init and the pool attach — the single biggest chunk of the boot. The unified radix cache now owns one LRU tree across the KV and mamba components (FULL: 0 means full-attention KV is accounted by the pool stack rather than as separate tree nodes; MAMBA: 2 is the conv-state plus ssm-state pair), with hybrid_ssm=True hierarchical=True confirming both the mamba tier and the host tier are wired in. transfer_layer_num=64 is how many layers the device↔host transfer engine walks per round. The host-pool messages come from SGLang’s host memory pool; the hybrid-pool attach line from the hybrid pool assembler.

Engine timings and the boot timeline

[2026-08-21 16:51:39] Engine startup timings (s): load_weight=3.80, kv_cache_allocation=0.01, scheduler_e2e=34.44, cuda_graph={prefill=8.56, decode=1.17, target_verify=0.00, draft_prefill=0.00, draft_decode=0.00, draft_extend=0.00}, tokenizer_e2e=40.26
PhaseDuration
Process start to distributed init13 s
Weight load3.80 s
Device KV pool allocation0.01 s
FlashInfer autotune (cached sm120 kernels)7 s
Prefill CUDA-graph capture (42 sizes)8.56 s
Decode CUDA-graph capture (3 sizes)1.17 s
HiCache host-pool reservation (~29.7 GB)~11 s
Boot to ready54 s

The HiCache host-pool reservation does not get its own item in the Engine startup timings line — that line is printed from the engine entrypoint — so it hides inside scheduler_e2e=34.44 s, which is where the ~11 s of host allocation lives alongside the graph captures. tokenizer_e2e=40.26 s runs longer than the scheduler because the tokenizer/detokenizer process spawns earlier in the boot.

First request and the fire-up line

[2026-08-21 16:51:39] Using default chat sampling params from model generation config: {'temperature': 1.0, 'top_k': 20, 'top_p': 0.95}
[2026-08-21 16:51:39] INFO: Uvicorn running on http://0.0.0.0:8082 (Press CTRL+C to quit)
[2026-08-21 16:51:40] INFO: 127.0.0.1:54808 - "GET /model_info HTTP/1.1" 200 OK
[2026-08-21 16:51:46] Prefill batch, #new-seq: 1, #new-token: 235, #cached-token: 0, full token usage: 0.00, mamba usage: 0.17, #running-req: 0, #queue-req: 0, #pending-token: 0, cuda graph: True, input throughput (token/s): 30.48
[2026-08-21 16:51:46] The server is fired up and ready to roll!

Sampling defaults come from the checkpoint’s generation config (temperature 1.0, top_k 20, top_p 0.95), not from anything passed on the command line. The GET /model_info 200 is a readiness probe, and the first real traffic is a 235-token chat completion served on a captured CUDA graph (cuda graph: True). full token usage: 0.00 is 235 ÷ 258,043 rounded to display; mamba usage: 0.17 is about 3 of the 18 state slots — one request’s reservation minus a lazily-materialized extra buffer. The 30.48 tok/s on that first batch is a warm-up number with no steady state behind it; the sustained numbers, measured over a 10-minute Prometheus window of live traffic, come in the measured-performance section below. The fire-up marker itself is the engine’s final stdout line, from the HTTP server entrypoint.

Measured Performance

All numbers come from the server’s --enable-metrics endpoint scraped by Prometheus, over a 10-minute window of light, cache-heavy live traffic — the instance was warm and mostly idle, so the queueing that dominates loaded windows is absent and the TTFT distribution is dominated by cache-hit prefills. (An earlier window’s 16.56 s average reflected parameter-search runs and is superseded.) Every figure below uses reset-safe windows (rate windows for counters, histogram quantiles for latencies).

Time to first token

MetricValue
Average TTFT1.00 s (10m window)
TTFT p500.57 s
TTFT p901.86 s
TTFT p953.67 s
Average queue time0.01 s

Prefill

MetricValue
Average prefill rate10,234 tok/s (10m window)
Average prompt size~87K tokens/request
Chunked prefill step2,048 tokens

Decoding

MetricValue
Average decode rate108.7 tok/s (10m rate of generated tokens)
Instantaneous decode gauge96.5 tok/s
Average inter-token latency15.6 ms/token
Average output size924 tokens/request

Load and cache

MetricValue
Running requestscap 4 (18 mamba entries ÷ 4 slots); idle in this window
KV tokens used95,934 of 258,043 (37%)
HiCache host used769,831 of 774,130 (99%)
Tokens loaded back from host (10m)2,065
Tokens backed up to host (10m)229,363
Cache hit rate gauge0.0

Methodology — the three headline numbers in plain PromQL, in case you want to reproduce them: average TTFT is sum(rate(sglang:time_to_first_token_seconds_sum[10m])) / sum(rate(sglang:time_to_first_token_seconds_count[10m])), prefill is sum(rate(sglang:prompt_tokens_total[10m])), decode is sum(rate(sglang:generation_tokens_total[10m])) with sglang:gen_throughput as the live gauge. p50/p90/p95 come from histogram_quantile over the time_to_first_token_seconds_bucket series.

Knobs to Turn Next

  1. Concurrency — raise --max-mamba-cache-size (or --mamba-full-memory-ratio) to lift the 4-request cap. The log’s own cap message names these as the levers; the dtype lever is already at bfloat16.
  2. KV precision — --kv-cache-dtype fp8_e4m3 is running on a 1.0 scaling default. If long-context accuracy matters more than the last tokens of pool, provide per-tensor FP8 scales and re-check the pool size that fits.
  3. Prefill parallelism — FLASHINFER_MAX_NUM_SEQS=16 caps the batched prefill kernel template. Raise it if long prefills queue behind each other; it trades compile time and VRAM for batch headroom.
  4. HiCache size — 3.0x reserves ~29.7 GB of RAM, and the measured window above has the host pool at 99% (769,831 of 774,130, ~229K tokens backed up in the last 10 minutes). SGLang’s HiCache docs note hit-rate gains plateau once hot prefixes are cached, so a 4x or 5x tier is worth the RAM here — the working set is already at the ceiling.
  5. Served name — Qwopus3.6-27B-v2-MTP-NVFP4-GGUF.gguf advertises MTP and GGUF in a stack that is neither. Rename it to match reality so /v1 consumers are not misled about what they are calling.

References

  1. SGLang Server Arguments — SGLang Documentation — https://docs.sglang.ai/advanced_features/server_arguments.html
  2. Hierarchical KV Caching (HiCache) — SGLang Documentation — https://docs.sglang.ai/advanced_features/hicache.html
  3. Attention Backends — SGLang Documentation — https://docs.sglang.ai/advanced_features/attention_backend.html
  4. SGLang Quantization (NVFP4, ModelOpt) — SGLang Documentation — https://docs.sglang.ai/advanced_features/quantization.html
  5. Separate Reasoning Output (reasoning parsers) — SGLang Documentation — https://docs.sglang.ai/advanced_features/separate_reasoning.html
  6. Tool Call Parsers — SGLang Documentation — https://docs.sglang.ai/advanced_features/tool_parser.html
  7. Production Metrics (Prometheus) — SGLang Documentation — https://docs.sglang.ai/references/production_metrics.html
  8. sgl-project/sglang — GitHub — https://github.com/sgl-project/sglang
  9. SGLang issue #31224 (FP8 KV cache scaling default) — GitHub — https://github.com/sgl-project/sglang/issues/31224
  10. PyTorch CUDA Notes (environment variables) — PyTorch Documentation — https://docs.pytorch.org/docs/stable/notes/cuda.html
  11. torchao Inference Workflows (NVFP4) — PyTorch Documentation — https://docs.pytorch.org/ao/stable/workflows/inference.html
  12. NCCL Environment Variables — NVIDIA NCCL User Guide — https://docs.nvidia.com/deeplearning/nccl/user-guide/docs/env.html
  13. docker container run — Docker Documentation — https://docs.docker.com/reference/cli/docker/container/run/
  14. Model Optimizer (NVFP4) — NVIDIA — https://nvidia.github.io/Model-Optimizer/
  15. CUDA Toolkit Release Notes (13.x) — NVIDIA — https://docs.nvidia.com/cuda/cuda-toolkit-release-notes/index.html
  16. FlashInfer Documentation (env vars, JIT cache, sm120 kernels) — FlashInfer — https://docs.flashinfer.ai/
  17. NVIDIA/cutlass (CuTe DSL, sm_120 targeting) — GitHub — https://github.com/NVIDIA/cutlass
  18. lmsysorg/sglang — Docker Hub — https://hub.docker.com/r/lmsysorg/sglang
  19. Install SGLang (Docker image) — SGLang Documentation — https://docs.sglang.ai/start/install.html
  20. gittensor-model-hub/Qwen3.8-27B-NVFP4-RTX5090 — Hugging Face — https://huggingface.co/gittensor-model-hub/Qwen3.8-27B-NVFP4-RTX5090
  21. peculiar-ragdoll/Qwen-Sharp-Chat-Templates — Hugging Face — https://huggingface.co/peculiar-ragdoll/Qwen-Sharp-Chat-Templates

This article was written by Pi (gittensor-model-hub/Qwen3.8-27B-NVFP4-RTX5090-LMHead4 | PC Eyay).