SGLang on RTX 5090: Qwen3.8-27B configs and vLLM benchmarks
On my 32 GB RTX 5090, SGLang with the DFlash 2 drafter generated Qwen3.8-27B output at 139.7 tokens per second, the fastest of the four profiles in my 1K-generation test. DSpark used the least GPU memory. I tested all four with one active request and a 32,768-token context cap. August 22 benchmark results · Workstation test record.

Short answer
For a 27B on 32 GB, the work divides between four profiles. Under matched 32K conditions with an FP8 KV cache, SGLang with a DFlash 2 drafter decoded at 139.7 tok/s (fast chat). SGLang with a DSpark drafter reached 110.2 with 2,656 MiB (about 2.6 GiB) less VRAM held after the suite than DFlash 2 (the route to 112K agent work). vLLM native MTP reached 100.8 (speculation without a second model), and the vLLM baseline 84.5 (control and rollback). The effective context limit is the smaller of the declared length and the physical KV pool that loads, and that pool can sit far below the advertised number.
Check if a model fits →Mac guide →SGLang vs vLLM test →
Everything has to share the same 32 GB
The model was a dense Qwen3.8-27B checkpoint prepared in ModelOpt NVFP4 for the RTX 5090. Making the weights fit was only the first gate. The same 32 GB also has to hold runtime workspaces, CUDA graphs, recurrent state and, when one is used, a speculative drafter. It must hold the KV cache too, which grows with every token of conversation. So the question I ask of every recipe is how much room remains for context and acceleration after the whole recipe loads.
The launchers also carried the model-specific reasoning and tool-call parsers. A generic template can return fluent text while it breaks structured tool calls or multi-turn agent work. Every candidate profile therefore had to pass text generation, recall, tool calls, vision and repeated stability checks before its speed number counted.
A much larger model breaks this budget outright. The 180B Qwen3.8-Flash-Next runs on a 32 GB card only when system RAM holds most of it. Its system requirements list what works.
Choosing an SGLang or vLLM serving profile for the RTX 5090
vLLM and SGLang solved different parts of the problem, so I keep four named profiles instead of forcing every workload through one set of flags:
| Profile | Engine | Acceleration | Configured context | Role |
|---|---|---|---|---|
| DFlash 2 | SGLang | External DFlash drafter | 32K | Fast daily chat |
| DSpark v2 | SGLang | Target-matched NVFP4 drafter | 32K · 64K · 112K | Longer agent and Deep work |
| Native MTP | vLLM | Model-native draft tokens | 32K | Simple speculative fallback |
| Baseline / Long | vLLM | No speculation · prefix cache | 32K · 64K · 128K · 262K | Control, rollback, maximum context |
Configured length is the server setting, not proof of a completed request at every depth. The longest reported actual prompt was 178,014 tokens on the baseline/long profile; the DSpark long-context run used 77,187. Reserve output tokens and check the physical KV pool for the chosen profile.
I keep the vLLM baseline for two jobs. If a fast profile fails, the baseline is the rollback path. If a new flag improves the headline number, the baseline is the fidelity reference. I do not count a speed result that has no such control beside it.
For the engine-level comparison, with generation, prompt speed, memory and stability side by side, see SGLang vs vLLM, measured on one RTX 5090.
RTX 5090 decode benchmarks under matched conditions
The cross-runtime comparison used the same local benchmark suite at 32,768 context, concurrency one, an FP8 KV cache and a warm loaded server. Each profile returned a real completion before the suite started:
| Profile | Decode, 1K-generation test | VRAM after suite | Mean accepted draft length |
|---|---|---|---|
| SGLang · DFlash 2 | 139.7 tok/s | 29,150 MiB | 2.95 |
| SGLang · DSpark v2 | 110.2 tok/s | 26,494 MiB | 2.05 |
| vLLM · native MTP | 100.8 tok/s | 30,293 MiB | 2.29 |
| vLLM · baseline | 84.5 tok/s | 30,503 MiB | none |
Two results from the source dive stay out of this table. An older 203.1 tok/s DFlash run used a different 512-token test, so it is real but unmatched. A later, isolated vLLM tuning pass moved native MTP from three draft tokens to four and improved decode from 112.8 to 120.5 tok/s (+6.8%) with unchanged outputs. That figure came from a later A/B, so I keep it apart from the original cross-profile suite.
The current launch scripts for these four profiles, and the raw runs behind this table, are on GitHub.
How much context fits alongside a 27B model?
The dashboard tracks three context figures separately. The requested context is what the launcher asks for, and the declared model length is what the API reports. The physical KV pool is what the loaded runtime can hold on this GPU. The effective limit is the smaller of the last two. An endpoint can advertise a large number while the loaded configuration has less space.
On this card, speed and window size traded against each other. DFlash 2 stayed the validated 32K speed profile, DSpark's lower footprint allowed 112K, and only the drafter-free vLLM profile could reserve the largest windows. Progressive three-needle recall tests recorded the real prompt length as well as the configured ceiling:
| Runtime | Configured context | Actual prompt | Time to first token | Facts recalled |
|---|---|---|---|---|
| vLLM Long | 64K | 44,031 tokens | 5.402 s | 3/3 |
| vLLM Long | 128K | 88,203 tokens | 16.264 s | 3/3 |
| vLLM Long | 262K | 178,014 tokens | 53.434 s | 3/3 |
| SGLang DSpark | 64K | 44,031 tokens | 6.280 s | 3/3 |
| SGLang DSpark | 112K | 77,187 tokens | 14.758 s | 3/3 |
The 262K configuration's largest measured prompt was 178,014 tokens, and the source dive does not call that a full 262K recall proof. The TTFT column shows the cost curve: context that fits can still carry a large first-token penalty.
The two tuning traps
Trap one: the sensible flag that destroys decode. Raising DSpark's prefill chunk to 8,192 tokens should have meant fewer chunks and faster prompts. It disabled the draft model's CUDA graph without any warning. Decode collapsed from roughly 109 to 19 tok/s while speculative acceptance still looked healthy. The repair (more static memory) restored the graph but shrank the intended 114,688-token KV pool to 89,528. Both configurations were rejected, and the winner was a 2,048-token chunk. In a later matched pass it cut median TTFT from 0.722 to 0.645 s on 8K prompts and from 4.286 to 3.837 s on 35K prompts. It also lifted prefill 11.7% to 9,081 tok/s and left decode flat.
Trap two: a high token rate can still mean a slow answer. In chat tuning, some reasoning-heavy runs reported 240–285 decode tok/s, yet a non-thinking configuration at roughly 115 tok/s finished the answer sooner. Measure prompt prefill, first visible token, decode, total time to a finished answer, acceptance and correctness separately. Prefix caching produced a larger practical gain than most flag changes. A warm ~16K shared prefix cut TTFT from 2.891 s to 0.283 s, a 90.2% reduction. That is why I keep system prompts stable: a timestamp in the prefix can invalidate the cache.
The KV-precision default
These recipes used FP8 KV and passed the reported checks. They did not include a matched BF16 comparison, so they do not establish zero relative quality or speed cost. The KV precision note gives the model- and backend-specific results.
Keep the server running after you log off
The next failures were operational. Processes died with their launch session, WSL terminated the runtime at idle boundaries, and a GUI layer crashed in the background. The final setup used allowlisted named profiles, persistent startup, automatic tunnel reconnection and a WSL configuration that keeps the compute instance alive.
Readiness stayed stricter than liveness. The system distinguishes configured, starting, ready, degraded, failed and stopped, and a listening port is never enough: the gate requires model identity plus a bounded real completion. Access follows the same rule. Every inference listener stays on loopback and is reached through an SSH tunnel over Tailscale. That path was proven from an outside network at ~30 ms, and no router port was ever opened. The full remote-operations story is in the workstation build dive.
The questions people ask about error code
Can one RTX 5090 serve a 27B model?
Yes. A 27B in NVFP4 with an FP8 KV cache served four validated profiles on one 32 GB card. Decode ran from 84.5 tok/s without speculation to 139.7 with a DFlash 2 drafter under a configured 32K cap. Every profile passed recall, tool-call, vision and stability gates.
SGLang or vLLM?
There was no single winner in these profiles. SGLang + DFlash 2 was the fastest generation profile with a configured 32K cap. SGLang + DSpark used less VRAM and was configured up to 112K. vLLM native MTP adds speculation without a second model; the baseline is the control and rollback. The vLLM Long profile used configured limits from 64K to 262K. Check the actual tested prompt depths and an output reserve before choosing a limit.
How much context fits on 32 GB?
The effective limit is the smaller of the declared model length and the physical KV pool that loads. The tested profiles were configured with a 32K cap for drafted speed, 112K for the lower-VRAM drafter, and up to 262K for the target-only profile. Those settings are not tested prompt depths. The largest reported actual prompt was 178,014 tokens on the baseline/long profile, at about a 53-second TTFT; the DSpark long-context prompt was 77,187 tokens.
What decode speed should I expect?
With the same configured 32K cap, the generation probes recorded 84.5 → 100.8 → 110.2 → 139.7 tok/s across baseline, native MTP, DSpark and DFlash 2. This does not mean each probe used a 32K-token prompt. On the DSpark profile a later chunk-tuning pass lifted prefill to ~9,081 tok/s, and a warm ~16K shared prefix cut TTFT by 90.2%.
Does a drafter change the model's answers?
Every profile passed the same recall, tool, vision and repeated-stability gates before its speed counted, and the isolated MTP A/B reported unchanged outputs. Judge configurations by time to a finished, correct answer, which raw token rate does not measure.
Use this
Check if a model fits →
← Previous: Remote RTX 5090 setup: Codex, Qwen3.8-27B and Tailscale
Want this inside your team’s workflow? The Verified AI Operations Sprint tests one workflow in ten working days. See the sprint →