TL;DR: HiCache adds a RAM tier three times the size of the GPU pool to the radix cache, and
--mem-fraction-static 0.90plus bfloat16 mamba states give the single-GPU SGLang launch of RadixArk/Qwen3.8-27B-NVFP4 room for 6 simultaneous requests on a 32 GB RTX 5090, decoding steady-state at ~61 tok/s.
The single-GPU serving config for RadixArk’s mixed NVFP4/FP8 quant of Qwen3.8-27B under SGLang — a hierarchical host-memory tier (HiCache) on the radix cache, an explicit 0.90 static memory partition, and bfloat16 mamba states. Here is the sglang serve command and the full startup log, flag by flag, with links to ground every claim.
Installing SGLang
The venv behind this launch was created with uv — a managed Python 3.12 interpreter, a virtualenv, and the sglang wheel:
uv venv --python 3.12 --managed-pythonsource .venv/bin/activateuv pip install sglang--managed-python lets uv download the Python 3.12 toolchain itself, so no system Python is required. The sglang package installs both the engine and the sglang CLI executable used below.
The Command
sglang serve \ --trust-remote-code \ --model-path ~/Models/RadixArk/Qwen3.8-27B-NVFP4 \ --enable-hierarchical-cache \ --hicache-ratio 3.0 \ --mem-fraction-static 0.90 \ --mamba-full-memory-ratio 0.5 \ --attention-backend flashinfer \ --chunked-prefill-size 2048 \ --reasoning-parser qwen3 \ --tool-call-parser qwen3_coder \ --kv-cache-dtype fp8_e4m3 \ --mamba-ssm-dtype bfloat16 \ --host 0.0.0.0 \ --port 8082 \ --served-model-name Qwen3.8-27B-NVFP4sglang serve is now the CLI entry point. It auto-detects whether the model is a language model or a diffusion model and dispatches accordingly — the LLM path runs the same run_server code as python -m sglang.launch_server, which still works but is no longer the recommended spelling. No deprecation warning opens the output this time.
Flag Breakdown
--trust-remote-code
Tells HuggingFace to execute custom Python code shipped inside the model repo — custom modeling files and processor code — instead of refusing an architecture it does not recognize. It is a standard HF security toggle, and the model card of this quant is built around ModelOpt’s mixed recipe, so the flag stays on for the local checkout.
--model-path ~/Models/RadixArk/Qwen3.8-27B-NVFP4
Local checkout of the RadixArk quant. Per the model card, the MLP gate_proj, up_proj, down_proj layers and lm_head use dynamic NVFP4 W4A4 quantization with group size 16, attention weights use FP8, and the MTP and vision tensors keep the source BF16 precision. The engine confirms the mixed recipe at load time:
[2026-08-15 05:39:22] Using ModelOptModelLoader due to ModelOpt quantization config.[2026-08-15 05:39:22] Model is already quantized, loading directly...[2026-08-15 05:39:22] Detected ModelOpt FP8 checkpoint. The format is experimental and subject to change.[2026-08-15 05:39:22] Detected nvfp4 checkpoint. Please note that the format is experimental and subject to change.[2026-08-15 05:39:25] Load weight end. elapsed=3.33 s, type=Qwen3_5ForConditionalGeneration, quant=modelopt_mixed, quant_algo=MIXED_PRECISION, avail mem=10.58 GB, mem usage=20.14 GB.The model registers as Qwen3_5ForConditionalGeneration — a dense multimodal architecture in the Qwen3.5 lineage with hybrid GDN linear-attention layers and a multi-token-prediction head. Three shards, 20.14 GB, loaded in 3.33 s multi-threaded.
--enable-hierarchical-cache with --hicache-ratio 3.0
The centerpiece of this launch. HiCache extends the radix cache with a host-memory tier — the device pool becomes the hot set, and the host pool holds evicted prefixes so a cache miss degrades to a memory copy instead of a full re-prefill. The ratio is the host pool size in multiples of the device pool, and per SGLang’s design doc it must be greater than 1. At 3.0 the log allocates:
[2026-08-15 05:39:31] Allocating kv hierarchical KV host pool: 495313 tokens, 16.23 GB host memory.[2026-08-15 05:39:31] Allocating 7.61 GB host memory for hierarchical Mamba cache (layout=page_first).495,313 tokens is exactly 3 times the 165,104-token device pool plus one alignment token, and the 7.61 GB mamba host pool mirrors the same roughly-3x against the 2.41 GB device mamba pool — about 24 GB of system RAM reserved for the cache. The unpinned defaults visible in the ServerArgs dump — hicache_write_policy='write_through', hicache_io_backend='kernel', hicache_mem_layout='page_first', hicache_storage_backend=None — give a two-tier GPU-plus-RAM hierarchy with no external storage backend. SGLang’s best-practices note that hit-rate gains plateau once the hot prefixes are already cached, so a bigger ratio is not automatically better.
--mem-fraction-static 0.90
The fraction of available GPU memory pinned for weights, the mamba pool, and the KV pool. SGLang computes this automatically by default, reserving headroom for activations and CUDA graph buffers (in server_args.py the reserve is a function of the chunked prefill size and decode batch sizes). The explicit 0.90 pins the partition, and the log arithmetic fits it — 0.90 times the 30.72 GB available at load time is about 27.6 GB, which is the 20.14 GB of weights plus 2.41 GB of mamba state plus 5.04 GB of FP8 KV.
--kv-cache-dtype fp8_e4m3
Explicit FP8 e4m3 KV cache. It halves the KV footprint versus BF16, which is what lets a 165,104-token pool fit on the card after a 20 GB model and a 2.4 GB mamba pool. The log carries one caveat:
[2026-08-15 05:39:25] Using FP8 KV cache but no scaling factors provided. Defaulting to scaling factors of 1.0. This may lead to less accurate results!Without a --quantization-param-path calibration file, dequant scales default to 1.0 — fine for agent workloads, but calibrate on the target workload if accuracy matters.
--mamba-full-memory-ratio 0.5 with --mamba-ssm-dtype bfloat16
The two flags that jointly size the mamba state pool. The GDN layers of Qwen3.8-27B carry a per-request recurrent SSM state, and SGLang sizes that pool as a fraction of the full KV cache memory — the default is 0.9. 0.5 times the 5.04 GB KV pool lands at 2.41 GB, and the engine converts that into slots:
[2026-08-15 05:39:26] max_running_requests is capped to 6 by the mamba state cache (max_mamba_cache_size=32, 5 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-15 05:39:26] Mamba Cache is allocated. max_mamba_cache_size: 32, conv_state size: 0.09GB, ssm_state size: 2.32GBbfloat16 SSM states are half the size of the float32 default, which is what allowed 32 slots to fit in that pool. 32 slots divided by 5 state slots per request gives 6.4, hence max_running_requests=6. No strategy flag was passed, and the dump shows the engine picked extra_buffer — the variant that keeps overlap scheduling, page sizes above 1, and speculative decoding working, and that stores mamba state at branching positions, at the cost of extra per-request state. This launch runs at page_size=1.
--attention-backend flashinfer
Routes the full-attention layers through FlashInfer (0.6.15.post1 here), which caches its per-architecture kernel choices:
[2026-08-15 05:39:26] Running FlashInfer autotune with cache: ~/.cache/sglang/flashinfer/autotune/0.6.15.post1/sm120/e48470913204d2a1/rank_tp0_pp0_dp0.jsonThe sm120 directory confirms consumer Blackwell — the RTX 5090. The GDN layers do not follow this flag at all. SGLang’s attention-backend docs note that GDN has its own kernel path, selected via --linear-attn-backend (default triton), and the log confirms the dispatch:
[2026-08-15 05:39:26] Linear attention kernel backend: decode=triton, prefill=triton, verify=triton[2026-08-15 05:39:26] GDN kernel dispatcher: decode=TritonGDNKernel, extend=TritonGDNKernel, verify=TritonGDNKernel packed_decode=True--chunked-prefill-size 2048
Chunks prefill into 2048-token steps so long prompts cannot monopolize the GPU while decode requests keep flowing. SGLang pairs this with its default max_prefill_tokens=16384 — the cap on total prefill tokens per batch. The first prefill in the log is a cold 122-token request at 61.17 tok/s input throughput.
--reasoning-parser qwen3 with --tool-call-parser qwen3_coder
Splits think spans out of the response stream into reasoning_content, and parses tool-call blocks out of responses. The log shows the chat-template features SGLang auto-detected:
[2026-08-15 05:39:26] 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_coderThinking is on by default. Disable it per request with chat_template_kwargs: {"enable_thinking": false}. The Qwen3.5 cookbook pairs exactly this qwen3 plus qwen3_coder combination for the family.
--host 0.0.0.0 and --port 8082
Binds Uvicorn to all interfaces on port 8082. The ServerArgs dump shows api_key=None — no auth on an all-interfaces bind. Keep this on a trusted network or set an API key.
--served-model-name Qwen3.8-27B-NVFP4
The identifier clients see at /v1/models. Setting it to the model’s own name keeps the API identity stable no matter where the weights are mounted — replicas with different local paths, or a gateway that wants one stable model name. The MTP head is retained in BF16 by the quant recipe, but speculative decoding is not enabled in this launch (speculative_algorithm=None in the dump), so that head sits unused until --speculative-algorithm is set.
What the Startup Log Reveals
The device memory budget
The ledger on the 32 GB card after all allocations:
| Component | Size | Notes |
|---|---|---|
| Weights (NVFP4/FP8/BF16 mix) | 20.14 GB | 3 shards, 3.33 s, multi-threaded |
| Mamba cache (32 slots) | 2.41 GB | conv 0.09 GB + SSM 2.32 GB |
| FP8 KV cache (165,104 tokens) | 5.04 GB | K 2.52 GB + V 2.52 GB |
| Decode CUDA graphs | 0.13 GB | batch sizes 1, 2, 4, 6 |
| Multimodal feature pool | 1.024 GB | CUDA IPC, 1 tokenizer worker |
| Remaining headroom | 0.92 GB | after CUDA graph capture |
The multimodal pool deserves a line. Qwen3_5ForConditionalGeneration is a vision-language model, and SGLang auto-resolved multimodal feature transport to CUDA IPC, reserving 1024 MiB on the base GPU for its one tokenizer worker. The log explicitly warns that this “reduces KV cache headroom; a full pool falls back to CPU transport”. Opt out with --mm-feature-transport=cpu if every byte of KV matters more than on-device vision features.
CUDA graphs
The prefill graph was declined by a safety gate — 1.05 GiB free against a 4.00 GiB minimum for capture — and the decode graph captured four batch sizes in 1.44 s. Note the batch list ends at 6, clamped by the mamba-imposed concurrency cap; the configured decode graph list ran up to 24:
[2026-08-15 05:39:27] Disabling auto-selected prefill CUDA graph: only 1.05 GiB is free after model/KV/eager-buffer allocation; at least 4.00 GiB is required for capture. Set an explicit prefill CUDA graph backend to override this safety gate.[2026-08-15 05:39:27] Capture target decode CUDA graph begin. backend=full, num_tokens_per_req=1, bs=[1, 2, 4, 6], avail mem=1.05 GB[2026-08-15 05:39:28] Capture target decode CUDA graph end. elapsed=1.44 s, mem usage=0.13 GB, avail mem=0.92 GB.The unified hierarchical tree
The final cache structure is SGLang’s unified hybrid tree, now with the host tier attached:
[2026-08-15 05:39:28] Init Unified RadixTree with components (<ComponentType.FULL: 0>, <ComponentType.MAMBA: 2>)[2026-08-15 05:39:32] Attached hybrid pool stack to UnifiedRadixCache: pools=KV + MAMBA, transfer_layer_num=64[2026-08-15 05:39:32] Tree cache initialized: source=default impl=UnifiedRadixCache hybrid_swa=False hybrid_ssm=True hierarchical=True streaming_wrapped=FalseOne radix tree now owns both the full-attention KV indices and the mamba state nodes, with LRU eviction across the combined GPU-plus-host pools; hierarchical=True marks the host tier as wired in.
Final state
[2026-08-15 05:39:28] max_total_num_tokens=165104, chunked_prefill_size=2048, max_prefill_tokens=16384, max_running_requests=6, context_len=262144, available_gpu_mem=0.92 GBcontext_len=262144 is the model’s native 256K context — no --context-length cap in this command. The scheduler will accept long requests up to that length, but the KV pool that actually backs them is 165,104 tokens; the host tier extends the cache, not the per-request limit.
Engine startup timings were load_weight 3.33 s, kv_cache_allocation 0.03 s, scheduler end-to-end 12.16 s, decode CUDA graph 1.44 s, and tokenizer end-to-end 16.83 s. Default chat sampling params come from the model generation config — temperature 1.0, top_k 20, top_p 0.95. The server answered 200 on /v1/models, /model_info, and the first /v1/chat/completions — “fired up and ready to roll” roughly 19 s after the command line.
[2026-08-15 05:39:34] Prefill batch, #new-seq: 1, #new-token: 122, #cached-token: 0, full token usage: 0.00, mamba usage: 0.12, #running-req: 0, #queue-req: 0, #pending-token: 0, cuda graph: False, input throughput (token/s): 61.17Cosmetic noise
Two warnings that need no action — a use_fast deprecation from transformers’ image processor, and a FastAPI ORJSONResponse deprecation, since FastAPI now serializes responses natively via Pydantic and SGLang’s custom response class is no longer required.
What the Runtime Log Shows
The startup log shows what the engine reserved; the runtime log shows what it does with it. Over a ~17.5-minute window (05
to 06) with one long agent session in flight, interleaved with short 53-token health probes, the decode batches report:| Metric | Observed |
|---|---|
Decode gen throughput (token/s) | ~61 while active |
#full token | 99,363 to 122,304 |
full token usage | 0.60 to 0.74 |
mamba usage | 0.12 — 4 of 32 slots |
Decode is the steady number. With a single request running (#running-req: 1), gen throughput (token/s) holds around 61 across the active-decode stretches, drifting only ~0.2 tok/s downward as the KV pool fills. That is the batch-size-1 rate for this mixed NVFP4/FP8 quant on the 5090, with FP8 KV and bfloat16 mamba state running as configured.
The cache is doing the heavy lifting on prefill. Nearly every prefill in the window is a small #new-token count (53 to 634) against a large #cached-token count (99K to 121K) — the unified radix tree serves almost the entire prefix from cache, and HiCache keeps those prefixes resident in the host tier. input throughput (token/s) swings across the window (0.4 to 385 tok/s) as prefill work ranges from near-total cache hits to genuine new-token computation.
The transient dips are prefill handoff. The few low-throughput decode lines (0.8 to 38 tok/s) cluster as the first decode step right after a prefill, when the scheduling window mixes the chunked prefill with the first token. Steady state recovers to ~61 the next step.
KV is the constraint, not mamba. full token usage climbs 0.60 to 0.74 over the window as the long context accumulates, while mamba usage holds flat at 0.12. With one request, the mamba-imposed cap of 6 concurrent requests is nowhere near the binding limit — it is the 165,104-token KV pool that would eventually fill.
Knobs to Turn Next
If 6 concurrent requests is the ceiling you want to raise, the log’s own hint lists the levers, roughly in order of cheapness:
--mamba-full-memory-ratioor--max-mamba-cache-size— grow the mamba pool by shrinking the KV allocation that follows it. The pool is the cap.--mm-feature-transport=cpu— reclaim the 1024 MiB CUDA IPC pool for KV if on-device multimodal features are not needed.--hicache-ratioor--hicache-size— grow the host tier further, bounded by system RAM; SGLang’s own caveat is that gains plateau once hot prefixes are cached.--speculative-algorithm NEXTN --speculative-num-steps 3 --speculative-eagle-topk 1 --speculative-num-draft-tokens 4— the MTP recipe from the Qwen3.5 cookbook, which puts the otherwise-idle BF16 MTP head to work. Speculative decoding changes mamba slot bookkeeping, so re-check the concurrency cap after enabling it.--quantization-param-path— calibrated FP8 KV scaling factors if the 1.0 defaults show up as accuracy loss on your workload.
My Impression using Qwen3.8 27B
This blog post is generated from my SGLang logs running Qwen3.8 27B model. It understood what report to write. I don’t struggle when I said it needs to ground the article with links. You can see the difference between this article and other article.
The model think a lot. Fortunately, the model hadn’t falling into loop once. Hopefully it stays like that.
I know this model is a significant improvement because it doesn’t struggle with Pi’s edit tool call. Many models that I used give up on editing and directly rewrite any file that it wants to edit.
I still use default model parameters, but I see in the original Qwen3.8 27B model card, the sampling is different from 3.6:
We recommend using the following sets of sampling parameters for generation:
- Thinking Mode: temperature=1.0, top_p=0.95, top_k=20, min_p=0.0, presence_penalty=0.0, repetition_penalty=1.0
- Instruct (or non-thinking) mode: temperature=0.7, top_p=0.80, top_k=20, min_p=0.0, presence_penalty=1.5, repetition_penalty=1.0
Please note that the support for sampling parameters varies according to inference frameworks.
Will play with these later. Currently, I’m satisfied with 131K context window and 61t/s speed.
References
- RadixArk/Qwen3.8-27B-NVFP4 — RadixArk, Hugging Face (August 14, 2026) — https://huggingface.co/RadixArk/Qwen3.8-27B-NVFP4
- uv Documentation — Astral — https://docs.astral.sh/uv/
- Hierarchical KV Caching (HiCache) — SGLang Documentation — https://docs.sglang.io/docs/advanced_features/hicache
- HiCache Design — SGLang Documentation — https://docs.sglang.io/docs/advanced_features/hicache_design
- SGLang HiCache Best Practices — SGLang Documentation — https://docs.sglang.io/docs/advanced_features/hicache_best_practices
- Server Arguments — SGLang Documentation — https://docs.sglang.io/advanced_features/server_arguments.html
- Attention Backends — SGLang Documentation — https://docs.sglang.io/docs/advanced_features/attention_backend
- Qwen3.5 Cookbook — SGLang Documentation — https://docs.sglang.io/cookbook/autoregressive/Qwen/Qwen3.5
- Reasoning Parser — SGLang Documentation — https://docs.sglang.io/docs/advanced_features/separate_reasoning
- Tool Parser — SGLang Documentation — https://docs.sglang.io/docs/advanced_features/tool_parser
- sglang serve — CLI Reference — SGLang Documentation — https://docs.sglang.io/docs/sglang-diffusion/api/cli
- sglang/cli/serve.py — sgl-project/sglang — https://github.com/sgl-project/sglang/blob/main/python/sglang/cli/serve.py
- SGLang and Miles Add Day-0 Support for Qwen3.8 — LMSYS Org (August 12, 2026) — https://www.lmsys.org/blog/2026-08-12-qwen3-8-day0-support/
- NVIDIA Model Optimizer — Quantization Guide — NVIDIA — https://nvidia.github.io/Model-Optimizer/guides/1_quantization.html
- Hugging Face Hub — Security (trust_remote_code) — Hugging Face — https://huggingface.co/docs/hub/security
- sgl-project/sglang — GitHub — https://github.com/sgl-project/sglang
- flashinfer-ai/flashinfer — GitHub — https://github.com/flashinfer-ai/flashinfer
This article was written by Maki (Qwen3.8-27B-NVFP4 | PC Eyay).

