Inside SGLang-Omni (6): Running Qwen3-ASR on a 12 GB RTX 5070
Series:
- Architecture, traced through one transcription request
- Streaming: SSE token deltas vs. realtime re-decoding
- Keeping audio off the LLM’s critical path
- The data plane: ZMQ, CUDA IPC, and KV page transfer
- Making it fast: radix cache, CUDA graphs, torch.compile, speculative decoding
- Running Qwen3-ASR on a 12 GB RTX 5070 (this post)
Parts 1–5 explained the mechanisms by reading code, then showed each one working. This part measures them properly, on a card people actually own: an RTX 5070 with 12 GB (consumer Blackwell, SM120). It’s the smallest memory budget that SGLang-Omni has a Qwen3-ASR profile for, so memory trade-offs show up quickly.
Setup
| GPU | NVIDIA GeForce RTX 5070, 12 GB, SM120, driver 595.99 |
| Host | AMD Ryzen 7 7800X3D (8 cores / 16 threads), 30 GB RAM |
| Software | CUDA 13.0, PyTorch 2.14.1, SGLang 0.5.23, the project’s CI container image |
| SGLang-Omni | the pinned commit 8f07378, plus the profile file below |
| Model | Qwen/Qwen3-ASR-1.7B, BF16 |
| Data | SeedTTS EN (1,088 requests, 666 unique clips) and ZH (2,020 requests), pinned revision; LongLibriHeavy 60 s |
The profile
config_cls: Qwen3ASRPipelineConfig
name: qwen3-asr-rtx5070
model_path: Qwen/Qwen3-ASR-1.7B
stages:
asr:
factory:
dtype: bfloat16
engine:
max_running_requests: 8
cuda_graph_max_bs: 8
mem_fraction_static: 0.75
enable_torch_compile: false
max_running_requests: 8 caps how many requests decode at once; the rest wait in the build pipeline and SGLang’s waiting queue (part 3). cuda_graph_max_bs: 8 matches it, with one decode graph for every batch size from 1 to 8 (part 5). mem_fraction_static: 0.75 gives SGLang 75% of VRAM for weights and the KV pool. enable_torch_compile: false keeps the decode CUDA graphs but skips Inductor fusion, a choice section 2 checks.
Download it as qwen3_asr_rtx5070.yaml. It isn’t part of an SGLang-Omni release yet, so save it next to your checkout and point --config at it:
sgl-omni serve --config qwen3_asr_rtx5070.yaml --port 8000
Method
I followed the project’s ASR benchmark runbook: its container, pinned dataset and model revisions, HF_HUB_OFFLINE=1, and one server per configuration with nothing else on the GPU.
One caveat applies to every SeedTTS number below. The benchmark runs a warmup pass and then three timed passes over the same audio. By the timed passes, almost every clip has been seen before. On the baseline server, the encoder cache hit rate was 94.5%, and the radix cache matches repeated audio too (part 5). So SeedTTS throughput is warm-cache throughput: mostly decode, with little encoding or prefill. It’s a fair comparison between configurations, but it’s optimistic for traffic where every clip is new. Where that matters, I also measured cold runs: never-seen audio on a freshly started server.
SeedTTS figures are means of the 3 timed passes. The latency percentiles come from the benchmark, which reports p50 and p95.
1. Accuracy and throughput
| Concurrency | EN req/s | EN p50 | EN p95 | ZH req/s | ZH p50 | ZH p95 |
|---|---|---|---|---|---|---|
| 1 | 9.5 | 106 ms | 134 ms | 10.7 | 90 ms | 126 ms |
| 2 | 16.5 | 119 ms | 163 ms | 19.2 | 101 ms | 138 ms |
| 4 | 27.4 | 140 ms | 199 ms | 31.7 | 122 ms | 178 ms |
| 8 | 46.1 | 172 ms | 223 ms | 50.9 | 155 ms | 210 ms |
| 16 | 52.0 | 306 ms | 362 ms | 58.7 | 272 ms | 332 ms |
| 32 | 52.2 | 607 ms | 684 ms | 58.5 | 548 ms | 622 ms |
Accuracy was 1.20–1.22% corpus WER (EN) and 0.60–0.61% CER (ZH) at every concurrency level. Every request was scored, all 3,264 EN and 6,060 ZH. Peak VRAM under load was 10.6 GiB of the card’s 11.9 GiB (10,882 of 12,227 MiB in nvidia-smi).
Throughput stops growing at 16. Up to 8, throughput rises almost linearly, because that’s the decode cap. From 8 to 16 it gains only 13% (EN), while the extra requests wait their turn. From 16 to 32 it gains nothing, and latency simply doubles. Past concurrency 8 on this card, extra clients only add waiting time.
The cold numbers are much lower. With 10-second clips the server has never seen, on a freshly started server, I measured 4.3 req/s at concurrency 1 and 23–24 req/s at concurrency 8 and 16. Those clips are also longer than SeedTTS’s, which average a few seconds. Size capacity from your own audio; the table above is a best case.
2. torch.compile: on vs. off
| compile off | compile on | |
|---|---|---|
| startup, cold Inductor cache | 27 s | 48–51 s |
| startup, warm Inductor cache | 27 s | 39 s |
| EN req/s at c=1 (warm) | 9.50 | 9.89 (+4%) |
| EN req/s at c=2 (warm) | 16.5 | 16.7 (+1%) |
| EN req/s at c=8 (warm) | 46.1 | 46.2 (0%) |
| p50 latency at c=1, cold clips | 227 ms | 217 ms (−4%) |
| peak VRAM | 10.6 GiB | 10.5 GiB |
| WER (EN) | 1.20–1.22% | 1.20–1.22% |
Compile helps only at batch sizes 1 and 2, the only ones it compiles (torch_compile_max_bs: 2), and only by about 4%. In exchange, every startup takes 12–24 seconds longer. Turning it off is the right default for this profile. If a deployment runs mostly at concurrency 1 and rarely restarts, turning it on is a reasonable 4%.
3. Streaming: time to first visible text
From part 2. For each request I measured the time to the first SSE delta, using a different never-seen clip every time. Five runs per mode:
| runs (ms) | typical | |
|---|---|---|
| automatic language detection | 34, 37, 36, 36, 37 | ~36 ms |
language=English | 19, 19, 18, 18, 18 | ~18 ms |
| automatic again | 35, 38, 36, 36, 36 | ~36 ms |
Forcing the language halves the time to first text. With automatic detection, the model first decodes three tokens (language, English, <asr_text>) that the stream builder hides. Total transcription time barely changes. Only the wait before the first text changes. For a UI that shows text as it arrives, it’s worth passing language whenever you know it.
4. The pre-LM encoder service
Part 3 described moving the audio tower out of prefill onto its own thread and stream. This experiment turns it off with --asr.factory.enable_pre_lm_encoder false, so the tower runs inside batched prefill again.
This one needed two attempts. My first test used 200 clips that were millisecond-shifted copies of one recording, so all were identical in length. There, turning the service off was 38% faster at concurrency 16 (33.1 vs. 23.9 req/s). That was surprising enough to repeat with realistic audio. Here’s one cold pass of SeedTTS EN, a fresh server for every run, two trials each:
| encoder service on | encoder service off | |
|---|---|---|
| c=8 req/s (trial 1 / 2) | 39.3 / 39.3 | 42.7 / 42.9 |
| c=8 p95 | 0.256 / 0.258 s | 0.240 / 0.239 s |
| c=16 req/s | 47.0 / 46.6 | 45.1 / 44.9 |
| c=16 p95 | 0.401 / 0.407 s | 0.422 / 0.423 s |
| WER | 1.20–1.22% | 1.20–1.21% |
With varied audio, it’s close to a wash: off is about 9% better at concurrency 8, on is about 4% better at concurrency 16, and both results repeat. The encoder’s stats explain why the service isn’t a clear win on this card:
avg 1.04–1.07 items/batch queue_wait_avg_s ≈ 0.005 merged: 165–227 hits: 179–221
It barely batches. Encodes are fast (~14 ms for 10 s of audio), so the queue is nearly always empty when the worker looks, and it ends up running about one clip per encode. With the service off, prefill can encode several clips in one batch. Deduplication does pull its weight, though: SeedTTS repeats some clips, and 165–227 requests per pass joined an encode already in flight.
The identical-length test exaggerated the gap. When every clip has the same length, prefill with the service off batches them perfectly. Real audio batches less neatly, and most of the gap goes away.
So on a single 12 GB card with a fast encoder, the service mostly provides isolation and caching, not throughput. Its design target (keeping encoder work out of other requests’ decode steps) matters more when encodes are heavy: longer audio, a larger encoder, or a GPU where the encoder is slow. That’s where I’d look next, and it’s a caveat for part 3.
5. Realtime: how many live speakers fit?
Part 2 showed that each realtime session sends a full re-decode every ~2 seconds. Here’s the repo’s realtime benchmark: SeedTTS clips streamed at real-time pace in 200 ms packets, with server VAD, plus an HTTP baseline for the WER comparison.
python -m benchmarks.eval.benchmark_asr_realtime --port 8000 --max-samples 50 \
--concurrencies 1,2,4,8,12,16 --http-baseline
| Speakers | first partial p50 / p95 | partial interval p50 / p95 | final latency p50 / p95 | WER (realtime / HTTP) |
|---|---|---|---|---|
| 1 | 63 / 81 ms | 2.04 / 2.06 s | 51 / 91 ms | 0.73% / 0.73% |
| 4 | 67 / 120 ms | 2.04 / 2.08 s | 46 / 98 ms | 0.73% / 0.73% |
| 8 | 74 / 123 ms | 2.04 / 2.09 s | 49 / 117 ms | 0.73% / 0.73% |
| 16 | 93 / 134 ms | 2.04 / 2.11 s | 52 / 121 ms | 0.73% / 0.73% |
| 24 | 99 / 152 ms | 2.05 / 2.12 s | 90 / 150 ms | 0.54% / 0.62% |
| 32 | 95 / 134 ms | 2.05 / 2.13 s | 91 / 149 ms | 0.54% / 0.62% |
| 48 | 102 / 143 ms | 2.07 / 2.17 s | 93 / 170 ms | 0.54% / 0.62% |
The 24–48 rows use 96 clips instead of 50, so their WER is on a different sample.
There was no breaking point up to 48 concurrent speakers. Partials stayed on their 2-second schedule, finals stayed under 0.2 s at p95, there were zero protocol violations, and realtime WER matched HTTP. With decode_interval_ms=1000 at 16 speakers, partials held their 1.0-second schedule too (p95 1.07 s), with three times as many partials.
The catch is the dataset. SeedTTS clips are a few seconds long, so each session produces only one or two partials before its turn ends. Long continuous speech would make every partial re-decode up to 30 seconds of audio (part 2), and the slowdown point would come much sooner. This table is an upper bound for short turns.
6. Long audio and the 503 policy
At 8 running requests, the profile admits one request longer than max_audio_clip_s (30 s) at a time, and concurrent long requests get HTTP 503 (part 1). Here’s LongLibriHeavy’s 60-second set, 40 files, 3 passes:
python -m benchmarks.eval.benchmark_asr_longform --dataset longlibriheavy-60 --max-samples 40 \
--port 8000 --concurrencies 1,2,4 --repeats 3 --warmup
| Concurrency | transcribed per pass | rejected (503) | p50 latency |
|---|---|---|---|
| 1 | 40 / 40 | 0 | 0.69 s (≈90× real time) |
| 2 | 1 / 40 | 39 | — |
| 4 | 1 / 40 | 39 | — |
At concurrency 1, long audio is fast: one minute of speech in under 0.7 seconds, chunked into 30-second pieces. At concurrency 2, 39 of 40 requests fail. The benchmark client doesn’t retry, and a 503 comes back in milliseconds, so the client cycles through the rest of its files while the one admitted request is still running. For this profile, clients sending long audio in parallel must retry with backoff (or serialize their long uploads), or they’ll lose almost everything. Raising audio_chunking.max_concurrent_long_audio_requests trades that for short requests queueing behind long ones.
(Corpus WER at concurrency 1 was 11.1% on this set. I didn’t look into how much of that comes from text normalization, so don’t compare it to the SeedTTS figures.)
7. Speculative decoding: DFlash fits, and doubles throughput
The DFlash draft is validated on an H100 upstream. I added it to the 5070 profile:
engine:
speculative_algorithm: DFLASH
speculative_draft_model_path: wilsonzheng0327/Qwen3-ASR-1.7B-dflash
speculative_draft_model_revision: d62bd4051e68282e02f93de774036a35f22f1373
speculative_num_draft_tokens: 8
It started at the same mem_fraction_static: 0.75. SGLang made room by shrinking the target’s KV pool from 40,324 to 28,164 tokens and giving the draft its own small pool.
| baseline | DFlash | speedup | |
|---|---|---|---|
| EN req/s, c=1 (warm) | 9.5 | 22.8 | 2.4× |
| EN p50, c=1 (warm) | 106 ms | 39 ms | |
| EN req/s, c=4 | 27.4 | 63.3 | 2.3× |
| EN req/s, c=8 | 46.1 | 90.5 | 2.0× |
| EN req/s, c=16 | 52.0 | 107.9 | 2.1× |
| ZH req/s, c=8 | 50.9 | 92.0 | 1.8× |
| cold 10 s clips, c=1 p50 | 227 ms | 76 ms | 3.0× |
| cold 10 s clips, c=16 req/s | 23.9 | 53.6 | 2.2× |
| WER (EN) / CER (ZH) | 1.20% / 0.61% | 1.20% / 0.61% | unchanged |
| peak VRAM | 10.6 GiB | 11.3 GiB |
This is the single biggest win on this card. It roughly doubles throughput at every concurrency level, warm or cold, with no change in accuracy across all 3,264 EN and 6,060 ZH scored requests. Acceptance explains it: a typical 10-second clip took 5–7 verify rounds instead of ~35–40 decode steps, with 5.6–6.6 tokens accepted per round. ASR transcripts are tightly determined by the audio, so the draft guesses right most of the time.
The cost is memory. Peak VRAM went from 10.6 to 11.3 GiB, leaving about 0.65 GiB free, and the smaller KV pool means fewer tokens of long audio fit at once. I’d want a longer soak test at sustained load before calling it production-ready on 12 GB, but nothing failed in these runs.
Where the 12 GB goes
From the startup memory checkpoints, SGLang’s KV allocation log line, and nvidia-smi under load (baseline profile):
| Component | GiB | Source |
|---|---|---|
| CUDA context, before the model loads | 0.16 | pre_model_load checkpoint |
| Weights (BF16, LLM + audio tower) | ≈4.5 | post_static_allocation minus the KV pool and context |
| KV pool: 40,324 tokens | 4.30 | KV Cache is allocated … K 2.15 GB, V 2.15 GB |
| Decode CUDA graphs (bs 1–8) | 0.57 | post_cuda_graph_capture − post_static_allocation |
| Encoder graph buckets (6) | 0.49 | post_encoder_graph_capture − post_cuda_graph_capture |
| After startup | 10.00 | post_encoder_graph_capture |
| Activations and allocator slack at peak | ≈0.6 | nvidia-smi peak (10.63 GiB) minus the startup figure |
| Free at peak | ≈1.3 | 11.94 GiB usable on the card |
With DFlash, the KV pool shrinks to 3.0 GiB (28,164 tokens), the draft adds 0.54 GiB of its own KV plus its weights and graphs, and peak use reaches 11.3 GiB.
Where this leaves the profile
The profile holds up. max_running_requests: 8 really is the limit on this card: throughput climbs almost linearly to 8, adds 13% from 8 to 16, and nothing after that, with 1.3 GiB still free at peak. Leaving compile off is still right on SM120, since it buys about 4% at concurrency 1–2 and costs 12–24 seconds on every startup. Realtime handled at least 48 speakers with short turns; long monologues are the test I haven’t run yet.
The one thing I’d change is to add DFlash. It fits with about 0.65 GiB to spare and roughly doubles throughput at every concurrency level with identical accuracy.
Two results surprised me. The pre-LM encoder service is roughly neutral here, because a fast encoder leaves it almost nothing to batch. And the long-audio policy throws away 39 of 40 parallel requests from a client that doesn’t retry.