Начало работыТаблица лидеровDecode calculatorМоделиReportsОборудованиеБенчмаркиМаркетплейсАрендаProДокументация API
Язык
Actual Computer — Every computer, one endpoint
Back to Qwen3.8-27B-GPTQ-4bit
Community field report

vLLM vs SGLang: Qwen3.8-27B Q4 DFlash2 on dual RTX 3090s

Apples-to-apples DFlash2 comparison across concurrency 1, 2, 4, 8, and 16. SGLang wins at concurrency 4; vLLM reaches 430.67 tok/s at concurrency 16 and avoids SGLang's five-request Mamba cache cap.

vLLM vs SGLang: Qwen3.8-27B GPTQ-4bit with DFlash2 on dual RTX 3090s

Executive summary

This report compares vLLM and SGLang under the same external workload: the same Qwen3.8-27B GPTQ-4bit target, official Z-Lab DFlash2 draft, two RTX 3090 GPUs, tensor parallelism 2, four speculative draft tokens, 1,044 prompt tokens, and 512 generated tokens per request.

vLLM wins the single-request decode result and scales substantially better beyond four concurrent requests. SGLang wins at concurrency four and delivers lower TTFT through concurrency four.

  • Single request: vLLM reached 109.36 tok/s, 12.12% faster than SGLang's 97.54 tok/s.
  • Best SGLang point: 294.13 tok/s at concurrency 4, 10.36% faster than vLLM at the same concurrency.
  • Best aggregate result: vLLM reached 430.67 tok/s at concurrency 16, 66.49% faster than SGLang.
  • SGLang was capped to five live requests by its Mamba state cache. At offered concurrency 8 and 16, queued requests increased mean TTFT to 3.40 s and 10.01 s.

Test setup

FieldValue
Target modelbtbtyler09/Qwen3.8-27B-GPTQ-4bit
Local target pathQwen3.8-27B-GPTQ-4bit
QuantizationGPTQ, 4-bit
Draft modelz-lab/Qwen3.8-27B-DFlash2
Speculative methodDFlash
Speculative draft tokens4
GPUs2 × NVIDIA GeForce RTX 3090, 24 GiB each
Tensor parallelism2
CPUAMD Ryzen 9 9950X, 32 threads reported
Host interconnectPCIe/PHB; no NVLink path
Context limit8,192 tokens
Prompt tokens1,044
Output tokens512 per request
StreamingEnabled
GPU memory fraction0.90
Maximum requested concurrency16
vLLM build0.26.1rc1.dev1045+g3406ec1da, isolated DFlash PR environment
SGLang build0.5.6.post3.dev9387+gc8e1ddc70
Measurement clientlocalmaxxing-cli remote endpoint mode
Decode metricClient-observed inter-token throughput; concurrent runs use the complete request window
TTFT metricClient-observed first streamed token

Single-request measurements use two warmups and five measured iterations. Concurrency 2, 4, 8, and 16 use one warmup and three measured iterations. Every measured request used the same prompt and output-token limit.

Runtime configuration parity and necessary differences

Both engines used the same target, draft checkpoint, draft count, tensor parallelism, context limit, offered concurrency, request body, hardware, and client measurement path.

Runtime detailvLLMSGLang
DFlash methoddflashDFLASH
Draft tokens44
Decode CUDA graphsEnabledEnabled
Prefill CUDA graphsDefault enabledDisabled after the default prefill graph capture exhausted GPU memory
Configured active requests1616
Effective active requests16 observedCapped to 5 by Mamba state-cache allocation
Custom all-reduceRuntime defaultDisabled for the PCIe/PHB topology
DFlash checkpoint block sizeCheckpoint block 8, runtime draft count 4Warning emitted for checkpoint block 8 vs runtime count 4; runtime initialized block 4

This is apples-to-apples at the model, hardware, request, and offered-load levels. It is not identical internally: each engine owns its cache allocator, graph implementation, scheduler, and kernels. Those differences are the subject of the comparison.

Primary results

All values below are arithmetic means across measured iterations or measured requests.

ConcurrencyvLLM decode tok/sSGLang decode tok/svLLM advantagevLLM mean TTFTSGLang mean TTFTLower-TTFT engine
1109.3697.54+12.12%90.51 ms67.40 msSGLang
2176.27164.80+6.96%152.99 ms100.19 msSGLang
4266.53294.13-9.38%265.78 ms104.27 msSGLang
8360.67268.83+34.16%473.80 ms3,401.67 msvLLM
16430.67258.67+66.49%902.61 ms10,011.75 msvLLM

SGLang's throughput peaks at concurrency four. Its concurrency-eight and concurrency-sixteen runs offered the requested load, but the runtime admitted only five requests at once and queued the remainder. vLLM continued scaling through concurrency sixteen.

Decode-throughput distributions

tok/s is aggregate output throughput for the full concurrent request window.

EngineConcurrencySamplesMinP50MeanMaxStddev
vLLM15109.30109.40109.36109.400.05
SGLang1597.4097.5097.5497.800.15
vLLM23172.60172.60176.27183.606.35
SGLang23164.50164.60164.80165.300.44
vLLM43262.20263.00266.53274.406.82
SGLang43293.30293.90294.13295.200.97
vLLM83357.80361.50360.67362.702.55
SGLang83268.40268.90268.83269.200.40
vLLM163429.50430.70430.67431.801.15
SGLang163258.20258.90258.67258.900.40

Time-to-first-token distributions

TTFT counts individual requests, not iteration windows. This table exposes queueing that a throughput-only comparison would hide.

EngineConcurrencyRequestsMinP50MeanMaxStddev
vLLM1589.99 ms90.61 ms90.51 ms90.75 ms0.31 ms
SGLang1567.18 ms67.26 ms67.40 ms68.02 ms0.35 ms
vLLM2689.71 ms161.08 ms152.99 ms183.88 ms32.31 ms
SGLang2671.81 ms73.51 ms100.19 ms155.38 ms42.66 ms
vLLM41290.79 ms296.13 ms265.78 ms315.86 ms82.82 ms
SGLang41285.62 ms86.27 ms104.27 ms140.97 ms27.02 ms
vLLM82491.89 ms525.36 ms473.80 ms537.74 ms136.57 ms
SGLang82494.41 ms121.10 ms3,401.67 ms8,919.02 ms4,349.15 ms
vLLM1648899.99 ms902.80 ms902.61 ms904.25 ms1.34 ms
SGLang164889.71 ms8,913.39 ms10,011.75 ms26,575.25 ms8,255.40 ms

At concurrency eight, SGLang's p50 remains low because five requests start immediately while three wait for the next scheduler wave. The mean and maximum expose the queued tail. At concurrency sixteen, requests complete across four admission waves of 5 + 5 + 5 + 1.

Total-throughput distributions

tokSTotal combines prompt and output tokens over elapsed request time as reported by localmaxxing-cli. It is included for completeness; decode throughput and TTFT remain the more actionable interactive-serving metrics.

EngineConcurrencySamplesMinP50MeanMaxStddev
vLLM15326.50326.70326.64326.700.09
SGLang15292.70293.10293.20294.000.48
vLLM23510.60510.80523.57549.3022.29
SGLang23490.20494.30492.97494.402.40
vLLM43787.80789.90793.70803.408.47
SGLang43879.10880.50880.63882.301.60
vLLM831,054.301,078.401,074.171,089.8018.12
SGLang83810.60810.60811.47813.201.50
vLLM1631,246.201,249.601,249.531,252.803.30
SGLang163782.50784.50783.83784.501.15

DFlash acceptance and runtime behavior

EngineObserved acceptance lengthObserved acceptance rateNotes
vLLM2.66–2.93 in high-concurrency metric windows41.4–48.1% average draft acceptanceFour-position acceptance samples reached approximately 75%, 53%, 36%, and 27%
SGLangApproximately 1.98–3.25 in sampled decode log windowsApproximately 33–75% in sampled windowsActive five-request windows commonly measured around 2.12–2.95 acceptance length and 38–65% acceptance

The logging windows and rate definitions differ between engines, so these values validate that DFlash was active but should not be treated as a precise cross-engine acceptance benchmark.

SGLang startup explicitly reported:

  • DFlash2DraftModel initialized and ready.
  • Fused DFlash KV materialization enabled.
  • Decode CUDA graphs active.
  • max_running_requests capped from 16 to 5 because the Mamba state cache allocated 29 slots and required five slots per request.

vLLM reported SpeculativeConfig(method='dflash', ...), DFlash speculative metrics, and sixteen simultaneously active requests during the matched high-concurrency run.

Why four draft tokens were used

A preliminary vLLM single-request sweep selected four drafts before the engine comparison.

Draft tokensMean decode tok/sMean TTFTResult
398.28105.91 msSlower
4109.3690.51 msBest
5105.40114.11 msSecond
799.58117.67 msLower acceptance and throughput

A matched non-speculative vLLM run reached 65.28 tok/s, so four-token DFlash improved vLLM single-request decode throughput by 67.52%. A previously observed 96.6 tok/s endpoint was excluded as an autoregressive baseline after its recovered command showed MTP with two speculative tokens.

Reproduction commands

The common localmaxxing-cli workload was:

bash
lmx speed-test run <vllm|sglang> \
  --mode remote \
  --base-url <endpoint> \
  --hf-id btbtyler09/Qwen3.8-27B-GPTQ-4bit \
  --served-model <served-alias> \
  --quantization GPTQ-4bit \
  --hardware hardware.json \
  --spec-method dflash \
  --spec-draft-model z-lab/Qwen3.8-27B-DFlash2 \
  --spec-num-tokens 4 \
  --prompt-tokens 1044 \
  --max-tokens 512 \
  --concurrency <1|2|4|8|16> \
  --out <payload.json>

The vLLM server used:

bash
vllm serve /models/Qwen3.8-27B-GPTQ-4bit \
  --tensor-parallel-size 2 \
  --max-model-len 8192 \
  --max-num-seqs 16 \
  --gpu-memory-utilization 0.90 \
  --speculative-config \
  '{"method":"dflash","model":"/models/Qwen3.8-27B-DFlash2","num_speculative_tokens":4}'

The SGLang server used equivalent model and workload settings:

bash
python -m sglang.launch_server \
  --model-path /models/Qwen3.8-27B-GPTQ-4bit \
  --tp-size 2 \
  --context-length 8192 \
  --mem-fraction-static 0.90 \
  --max-running-requests 16 \
  --disable-custom-all-reduce \
  --cuda-graph-backend-prefill disabled \
  --speculative-algorithm DFLASH \
  --speculative-draft-model-path /models/Qwen3.8-27B-DFlash2 \
  --speculative-num-draft-tokens 4

Conclusion

For this dual-RTX-3090 Qwen3.8-27B GPTQ-4bit deployment, vLLM is the stronger general serving choice. It wins single-request decode, remains competitive at concurrency two, and continues scaling to 430.67 tok/s at concurrency sixteen without the severe queueing seen in SGLang.

SGLang is compelling at low concurrency. It has lower TTFT at concurrency one through four and posts the best concurrency-four result: 294.13 tok/s with 104.27 ms mean TTFT. For a controlled deployment guaranteed to stay at four or fewer simultaneous requests, SGLang is a valid performance winner.

The crossover is operational, not cosmetic. SGLang's Mamba state-cache allocator capped this configuration to five active requests, while vLLM admitted sixteen. Once offered load exceeded that cap, SGLang's aggregate throughput fell and tail latency expanded to 8.9–26.6 seconds. On this hardware and software revision, choose SGLang for tightly bounded low-concurrency latency and vLLM for single-stream decode speed, load tolerance, and aggregate throughput.

Discussion

0 comments

Questions, reproduction notes, and follow-up results.

No comments yet. Start the technical discussion.