RTX 4090 · H100 · Qwen2.5-1.5B & 7B · vLLM 0.34.0 · SGLang 0.5.23 · mistral.rs
The Multi-LoRA
Latency Cliff
Adapter Residency, CUDA Graphs, and GPU Kernel Execution Across vLLM, SGLang, and mistral.rs
By Brian Woods · Published 2026-11-23 · Last updated 2026-11-29 (revision history)
01
Executive summary#
This independent study investigates performance and correctness in multi-adapter LLM serving across vLLM, SGLang, and mistral.rs. Three principal findings:
- Adapter residency. When adapter demand exceeded available slots, tail latency rose sharply. Adding slots removed the observed cliff in the tested workloads, but reduced reported KV-cache capacity.
- Serving architecture (SGLang PR #53433). In SGLang on 20–35 GiB GPUs, decode batches beyond the default captured CUDA graph ceiling (48) run eagerly at ~15× the cost per step of a graph replay. On Qwen2.5-7B-Instruct (BF16, RTX 4090), a 3-way ablation separated graph coverage from admission capping: raising the decode graph ceiling from 48 to 128 alone cut base-7B 20 rps p95 TTFT 61× (8,001 → 131.7 ms), increased verified throughput +41% (1,558 → 2,198 tok/s), and improved 7B+LoRA throughput +10–13% with zero KV-cache loss (+0.14 GB graph memory) and zero saturation regression. By contrast, unconditionally capping
max_running_requestsregressed saturated base-7B throughput by −11.6% (3,345 → 2,957 tok/s) — so PR #53433 was narrowed to raising the 20–35 GiB decode graph ceiling (48 → 128) alone (section 6.6). Earlier 1.5B H100 runs (H100 archive in section 6) separately characterize the admission-cap trade-off (+25–29% saturated chunks/s vs higher median TTFT). - GPU kernel execution (mistral.rs PR #2571). Per-adapter CUDA kernel launches drove multi-adapter decode overhead in mistral.rs. A grouped launch kernel eliminated ~90–96% of the 1→8 adapter scaling penalty across clean, tokenizer-verified balanced reruns with tight controls: −33.5% TPOT (1.41× verified tok/s) on Qwen2.5-1.5B (6/6 blocks at c=8, a=8) and −16.2% (c=8) to −19.5% (c=16, 1.46× verified tok/s) on Qwen2.5-7B BF16 (3/3 blocks), with 128/128 bit-exact end-to-end completion parity (section 7.5).
The study publishes its protocols, raw data, source code, negative results and upstream implementations.
Study scope & limits: Qwen2.5-1.5B (original RTX 4090 grid + H100 check) and Qwen2.5-7B-Instruct BF16 (RTX 4090 SGLang 3-way ablation + mistral.rs verified-token balanced reruns); follow-ups ran on shared cloud pods; see limitations (section 11).
Detailed findings (expand)
- Enabling LoRA alone was not the dominant bottleneck under the tested conditions. vLLM passed the same load with LoRA off, on but unused, and with one adapter (section 3).
- Past the slot limit, latency falls off a cliff. With 32 adapters on 16 slots, vLLM and SGLang both passed up to 20 requests per second on skewed traffic and 10 on uniform traffic, and failed at the next rate tested.
- More slots removed the cliff in the tested traffic. With 32 slots for the 32 adapters, vLLM's p95 time to first token at uniform 20 rps went from 496–938 ms to 94–99 ms, and SGLang's at Zipf 40 rps went from 11.8–13.8 s to 94–108 ms (one exploratory run: its 16-slot control against 32 slots).
- Adapters in flight tracked the cliff, but it is a warning signal, not a sizing formula. Distinct adapters with requests in flight tracked it better than counts over fixed 1, 5 and 10 s windows (above 16 for at most 9% of the time in healthy cells, 72% or more in degraded ones). Slow service inflates that count, so this is correlation, not a universal slot count.
- Slots are not free. EXPLORATORY The pre-registered study did not measure it; startup readings taken afterward show that going from 16 to 64 slots cut reported KV capacity by about 11% on both engines (vLLM 15.62 to 13.99 GiB, 542,720 to 481,280 tokens; SGLang 599,468 to 535,031 tokens), one start per configuration, on a 1.5B model.
- On SGLang, a mismatch between the running-request limit and the decode CUDA graph range amplified the cliff, and a 7B 3-way ablation narrowed upstream PR #53433. EXPLORATORY SGLang sets the running-request limit (computed from KV capacity and clamped to 2,048–4,096) and the decode CUDA graph range (48 in the 20–35 GiB branch at tp < 4) independently. Decode batches above 48 run eagerly, at ~15× the cost of a replay on 1.5B (31 ms vs ~2 ms with LoRA; 18.7 ms vs 1.3 ms without). Early 1.5B screening combined defaulting
max_running_requeststo the graph range with raising the range, cutting 40 rps p95 TTFT from 13.5 s to 2.1–2.3 s. A subsequent Qwen2.5-7B-Instruct (BF16, RTX 4090) 3-way ablation (section 6.6) tested raising the graph ceiling to 128 alone vs also cappingmax_running_requests=128: raising the graph ceiling alone delivered a 61× p95 TTFT drop at 20 rps on base 7B (8,001 → 131.7 ms), +41% tok/s, and +10–13% on 7B+LoRA with zero KV-cache loss (+0.14 GB) and zero saturation regression, whereas unconditionally cappingmax_running_requestsregressed saturated base 7B by −11.6% (3,345 → 2,957 tok/s). PR #53433 was therefore narrowed to raising the 20–35 GiB decode graph ceiling (48 → 128, 2 files) and dropping the unconditional admission cap. Issue #53431, PR #53433 (open); prior art #33483. - The drainer and later scheduling changes did not remove the failure. EXPLORATORY FLAGGED SGLang PR #46500 (a drainer revamp, merged 2026-10-29, on main but not in v0.5.23) had no material effect against the old drainer at the same setting, by the rule fixed in advance for that check. Turning a drainer on at all lowered 40 rps p95 by about a quarter (17 to 27%; Phase 1, drainer off: 13.4 s on v0.5.23, 12.0 s on main), and no run passed 500 ms. Admitting the adapter with the deepest queue next, and a smarter drain victim, did not help either.
- SGLang's documented csgmv advantage did not meet the pre-registered serving-latency threshold in this configuration. The docs claim 20 to 80% lower latency; I measured 3.6 to 11% on the pre-registered server-level metrics, on this model, GPU and workload. The benchmark conditions differ, so this does not contradict the docs' own measurement.
- I wrote a grouped LoRA kernel for mistral.rs (PR #2571). EXPLORATORY Clean
cuda flash-attnbuilds withb_std=0.02adapters and tokenizer-verified 128-token completions (loadgen_v2.py,ignore_eos=true) confirmed the speedup across two model sizes with tight unchanged-code controls: on Qwen2.5-1.5B (6 balanced blocks, 144/144 runs), −27.3% at a=4 and −33.5% at a=8 (c=8, 6/6 blocks, 1.41× verified tok/s, controls ±0.6–1.2%); on Qwen2.5-7B BF16 (3 balanced blocks, 72/72 runs), −16.2% at c=8, a=8 and −19.5% at c=16, a=8 (3/3 blocks, 1.46× verified tok/s, controls ±0.1–2.5%). B3 end-to-end parity matched 128/128 bit-exact (old2 vs new2), and all 81 GPU LoRA unit tests pass (section 7.5). - The original pre-registered correctness gate failed, so correctness was not certified for any engine. The study's synthetic adapters were numerically extreme, which explains why the checks could not tell right from wrong, but it does not retroactively pass the gate. A calibration sweep found the scale where that stops.
- Routing, checked in a pre-registered follow-up with a disclosed amendment (scale 0.02): vLLM and SGLang routed 64 of 64 requests correctly in each tested mode. The prefix-cache mode is FLAGGED (host not quiet), and vLLM's check there is coarse. The completed mistral.rs routing follow-up (2026-11-29) passed the smoke gate and was bit-exact deterministic across repeats (0.0000 diff), but did not pass the 100% rule (38/48 serial, 36/48 mixed; median
d_right = 0.32–0.34, ~16× vLLM/SGLang), traced to upstream21da642frather than PR #2571 (section 8).
02
Experimental design and measurement#
Original pre-registered experiment configuration
| item | value |
|---|---|
| GPU | one NVIDIA RTX 4090 (24 GB), nothing else on the GPU. This is GPU isolation only; CPU-host load was not part of this configuration and is recorded per experiment where it was measured |
| Engines | vLLM 0.34.0, SGLang 0.5.23, mistral.rs v0.9.5. The follow-ups below used other builds where stated |
| Model | Qwen2.5-1.5B-Instruct |
| Adapters | synthetic, rank 16, all linear layers, random weights (B scale 0.05) |
| Load | open-loop Poisson arrivals, uniform and Zipf adapter popularity |
| Output counting | output volume and per-token timing come from non-empty streamed text chunks, not tokenizer token counts, so output chunks/s and time per streamed output chunk are proxies for tokens/s and time per token. The median request returned exactly 128 chunks for 128 requested tokens, but I did not verify one chunk per token. The load generator names its fields tpot_ms and output_tokens_per_s; both are chunk-based |
| Pass rule | median p95 time to first token (TTFT) of 500 ms or less across 3 repeats |
| Plan | written before any run; every change after it is in the changelog with the reason |
Synthetic adapters measure serving cost, not whether your fine-tune is any good. The original study was one day, one GPU, one model. Independent replication is encouraged; the raw data and the exact commands are in the repository.
What each metric measures
| metric | definition in this study |
|---|---|
| TTFT, p95 TTFT | client-observed time from sending a request to its first streamed text chunk; p95 is the 95th percentile over the measured requests |
| End-to-end latency | client-observed time from sending a request to its last chunk |
| Time per streamed output chunk | (last chunk time minus first chunk time) divided by (chunks minus 1), per request, client-observed. Called TPOT in the load generator and in some tables; it is not verified time per token |
| Output chunks/s | non-empty streamed text chunks of the measured requests divided by the measured window. Called output_tokens_per_s in the raw files; it is not verified tokens/s |
| Completed requests/s | measured requests that completed without error divided by the measured window |
| Offered requests/s | the arrival rate the load generator was set to (open loop) |
| Decode-step wall-clock latency | server-side, from scheduler instrumentation, median wall time of one decode step binned by batch size (SGLang, section 6). Not a client metric |
Tokens appear only where tokenizer counts are meant: requested output length (128), prompt length, and KV-cache capacity.
Follow-up configurations
Follow-ups changed engine builds, hosts and protocols. What was recorded:
| follow-up | configuration |
|---|---|
| SGLang cliff investigation | SGLang v0.5.23 and main 0e9cff98f5b7 (drainer PR #46500 merge commit 259f0131c9); the v0.5.23 and main environments differ in kernel packages. The proposed mitigation is a branch on main 385262cabb, run with main's Python tree overlaid on the 0e9cff98f5 environment. Shared rented pods; the CPU-contention runs added up to 14 busy-loop processes in the same container, whose CPU quota was 17.85 CPUs |
| mistral.rs grouped kernel | mistral.rs master 21da642fdd2210c30ca4028e1eabdd28e9c602fd (the 0.10.0 development line), not v0.9.5, plus the PR commit applied as a patch (grouped_kernel_commit_600cdef.patch). The earlier benchmark binaries were built with the cuda feature only (no flash-attn); the rerun builds used cuda flash-attn (see BUILD.md). The balanced design runs the old build, the new build and a byte-identical second copy of the old build in all 6 orderings |
| H100 check of SGLang PR #53433 | RunPod pod with 4 × H100 80GB, one workload at a time: TP=1 on GPU 0, TP=2 on GPUs 0 and 1. Stock SGLang a9a27e9255 against PR head 9009897b21, vLLM 0.34.0 as reference. Plan committed before the runs; deviations and the dropped TP=4 are in section 6.9 |
| Kernel rerun on a second shared host (B2) | 4 of 6 blocks completed before the host disk filled; every run in those blocks was flagged for external CPU use above the plan's limit |
| Routing follow-up | adapter B scale 0.02 (Amendment 1), not the original 0.05; the prefix-cache passes ran with external CPU use of 14 to 17 cores against the plan's limit of 2 and are flagged. The mistral.rs routing follow-up ran 2026-11-29 on clean cuda flash-attn builds with SHA-256 matched b_std=0.02 adapters |
| 2026-11-29 7B & verified-token follow-ups | RunPod RTX 4090 24 GB (host 94805ecafe3b, CUDA 13.2, rustc 1.100.1). Upgraded load generator scripts/loadgen_v2.py sends ignore_eos: true to all engines (including mistral.rs) and counts exact tokenizer-verified tokens (median_output_tokens = 128.0, finish_length_frac = 1.0000 across every run). Covers: SGLang 0.5.23 3-way ablation on Qwen2.5-7B-Instruct BF16 (base and 16 LoRAs), and clean mistral.rs cuda flash-attn balanced reruns on Qwen2.5-1.5B (6 blocks, 144 runs) and Qwen2.5-7B (3 blocks, 72 runs) with b_std=0.02 adapters plus B3 128-completion parity |
Hosts and per-run conditions are recorded with each experiment in the repository (section 12). Where a commit or host detail is not listed here, it is not recorded in the pages I summarized, and I have not guessed it.
03
LoRA overhead below saturation#
vLLM with LoRA off, LoRA on but unused, and one adapter all passed at 80 requests per second. At 160 rps, where every configuration fails the latency bar, one adapter gave about 20% less throughput than LoRA off (10.3k against 12.9k output chunks per second). SGLang passed to 320 rps with LoRA off and on, and to 160 with one adapter. Enabling LoRA alone was not the dominant bottleneck under the tested conditions.
04
Adapter residency and the latency cliff#
With 32 adapters on 16 slots, vLLM and SGLang met the 500 ms p95 TTFT threshold through 20 requests/s on Zipf-distributed traffic and 10 requests/s on uniform traffic. Both exceeded the threshold at the next tested rate; the boundary between tested rates was not measured. Last passing rate:
| 32 adapters, 16 slots | vLLM | SGLang |
|---|---|---|
| Zipf popularity | 20 rps | 20 rps |
| Uniform popularity | 10 rps | 10 rps |
These rates are for the RTX 4090. On the H100 the same 32-adapter, 16-slot Zipf workload at 40 requests/s had a median p95 TTFT of about 430 to 480 ms for SGLang and about 614 ms for vLLM at TP=1 (about 323 ms for vLLM at TP=2; section 6.9), consistent with step speed setting slot residency (6.5). That is consistent with, not a test of, that explanation.
Full ladder, p95 TTFT in ms, median (min–max). The ladder stops after two consecutive failures, so later rates are blank.
| engine | popularity | 5 rps | 10 rps | 20 rps | 40 rps | 80 rps | last pass |
|---|---|---|---|---|---|---|---|
| vLLM | Zipf | 47 (44–47) | 44 (43–44) | 50 (48–72) | 1,456 (958–1,565) | 4,663 (3,316–5,629) | 20 rps |
| vLLM | uniform | 51 (50–60) | 51 (46–51) | 684 (496–938) | 3,075 (2,277–3,081) | – | 10 rps |
| SGLang | Zipf | 51 (49–52) | 56 (54–67) | 84 (73–163) | 12,142 (11,841–13,517) | 9,560 (9,441–9,656) | 20 rps |
| SGLang | uniform | 66 (65–67) | 81 (72–84) | 755 (591–1,138) | 13,058 (12,590–13,529) | – | 10 rps |
Past the cliff, the engines part ways. At 40 rps on Zipf traffic, vLLM's p95 TTFT was about 1.0 to 1.6 s. SGLang's was 11.8 to 13.5 s. The two engines weren't at a comparable setting; see section 6. The SGLang 16-slot 40 rps numbers on this page come from three run sets: 12,142 ms is the v0.5.23 pre-registered grid, 12,031 ms the v0.5.23 exploratory control, and 13.50 s SGLang main in the cliff investigation.
Burst caveat. Every run is a fixed 550 requests (50 warm-up and 500 measured) with no time limit, so a p95 past the cliff describes a 550-request burst and isn't comparable across rates. That's why 80 rps reads lower than 40, and a lower number at a higher rate does not mean better sustainable performance. Statements here about a server staying degraded describe these bursts, not indefinite or steady-state behavior.
Adapter-slot pressure and serving latency
The slot findings and the SGLang graph-range findings (section 6) are complementary, not competing. The adapter-slot constraint and the CUDA graph range interacted in this workload: slot pressure created adapter-residency waits, while decode steps outside the captured graph range substantially amplified the slowdown. Raising the graph limit reduced the severity but did not eliminate the latency failure, and the later work in section 6 traced a mechanism to decode batches leaving the graphs. More slots improved latency in the slot sweeps and so did the larger graph range; neither is a universal configuration recommendation, the stalls after adapter loads are unexplained, and the follow-ups are FLAGGED (shared host).
Give the engine more slots and the cliff moves (figure in the executive summary). vLLM, 32 adapters, p95 TTFT in ms, median (min–max) over 3 repeats. The 8 and 32 slot columns come from a replication run with slot counts that differ from the plan's list. The 16 slot column is the main grid.
| traffic | 8 slots | 16 slots | 32 slots |
|---|---|---|---|
| uniform, 20 rps | 2,788 (2,471–2,938) | 684 (496–938) | 95 (94–99) |
| Zipf, 40 rps | 4,675 (4,669–5,794) | 1,456 (958–1,565) | 142 (136–146) |
SGLang with 32 adapters on Zipf traffic EXPLORATORY: 16 slots gave 11.8 to 13.8 s at 40 rps, and 32 slots gave 94 to 108 ms. At 80 rps, 9.7 to 9.8 s against 126 to 131 ms. The 16 slot column here is a separate control run, so it differs slightly from the main grid above.
| traffic | 16 slots | 32 slots |
|---|---|---|
| Zipf, 40 rps | 12,031 (11,807–13,764) | 101 (94–108) |
| Zipf, 80 rps | 9,672 (9,656–9,796) | 130 (126–131) |
The operational recommendation is straightforward: if the adapters with requests in flight at the same time outnumber your slots, expect latency trouble, and check your own traffic. In the slot sweeps this behaved like a capacity cliff, not a defect I could isolate; on SGLang a second setting, the CUDA graph range, also mattered (section 6).
Working-set analysis EXPLORATORY
I checked that advice against the request logs of the main grid (32 adapters, 16 slots, Zipf and uniform traffic, every rate, vLLM and SGLang, 3 repeats), with no new runs. I called a cell healthy if its p95 TTFT was under 100 ms. The count of adapters with a request in flight (sent, not finished) was above 16 for at most 9% of the time in every healthy cell and for 72% or more of the time in every degraded cell. Distinct adapters over longer windows do not separate them: over 1 s windows the count was above 16 for 67 to 69% of the time at Zipf 20 rps and 32 to 33% at uniform 10 rps, both healthy, and over 5 and 10 s windows it was above 16 for 99 to 100% of the time in cells such as Zipf 10 rps and uniform 10 rps, also healthy.
Caveat: the in-flight count includes requests waiting in the engine's queue, so in degraded cells it is partly a result of the slowdown, not just a cause. This is correlation, not mechanism. It covers 16 slots, one model and one GPU, and it does not test windows between 100 and 500 ms, other thresholds, or a working set weighted by traffic share. Details: followup/working_set/RESULTS.md.
128 adapters on 32 slots EXPLORATORY
Four times more adapters than slots, and the cliff comes back earlier. p95 TTFT, median (min–max), ms:
| engine | popularity | 20 rps | 40 rps |
|---|---|---|---|
| vLLM | Zipf | 114 (98–115) | 3,011 (2,424–3,057) |
| vLLM | uniform | 816 (564–1,520) | 5,440 (4,817–5,481) |
| SGLang | Zipf | 83 (73–5,806) | 11,662 (11,200–13,399) |
| SGLang | uniform | 352 (251–1,033) | 17,408 (16,593–17,742) |
Several of the 20 rps ranges straddle the limit, so I'm not ranking anyone there. Past it, SGLang is again much worse than vLLM, at its default graph range (see section 6). I didn't test 64 slots for latency. Slots cost KV capacity (section 5), so don't read "just buy more slots" into this.
05
Slot capacity and KV-cache trade-offs EXPLORATORY#
The pre-registered study did not measure this. These are later exploratory readings from the engines' own startup logs (one server start per configuration, so no repeats and no variance), reported KV capacity rather than the bytes the adapters occupy, Qwen2.5-1.5B, rank 16, seven target modules, 32 adapters unless noted:
| slots | vLLM KV tokens | vs 16 slots | SGLang KV tokens | vs 16 slots |
|---|---|---|---|---|
| 16 | 542,720 | – | 599,468 | – |
| 32 | 526,336 | −3.0% | 582,060 | −2.9% |
| 64 | 481,280 | −11.3% | 535,031 | −10.7% |
| 64, 128 adapters | 481,280 | −11.3% | 535,031 | −10.7% |
Going from 16 to 64 slots took about 11% of KV capacity on both engines: vLLM −11.3% in tokens (−1.63 GiB of KV cache memory, 15.62 to 13.99 GiB, about 35 MiB per added slot at this model and rank, with the same amount appearing as consumed memory, 3.85 to 5.48 GiB), SGLang −10.7%. With 128 adapters on 64 slots, both engines reported the same KV capacity as with 32 adapters on 64 slots, and vLLM the same consumed memory, which is consistent with adapters beyond the slots being held off the GPU. An earlier attempt at the SGLang 128-adapter start was refused by my script because the GPU was not yet idle; I reran it later, with a mistral.rs build running on the same host at low priority. It reads startup memory and sends no requests.
Caveats: one start per configuration, no measured variance, and these are reported KV capacities, not a universal per-slot memory estimate; a 1.5B model, and I expect the LoRA buffers to grow with the model's hidden size, so the fraction will differ on larger models (not measured); and nvidia-smi does not show this, because both engines reserve a fixed fraction of the GPU (0.85 here), so its reading stays about the same. An earlier attempt with a 10-minute start limit failed by timeout and is not used. Data: results/B, the SGLang 128-adapter rerun and TABLE.md.
This is a different experiment from the SGLang graph-range comparison in section 6, where reported KV-cache capacity did not change when the graph range was raised.
06
SGLang: CUDA graph overload and 7B ablation#
The mismatch between SGLang’s running-request limit and its captured decode CUDA graph range was previously reported in issue #33483. This section documents its interaction with multi-LoRA serving, measures eager-execution step costs (~15×), presents the Qwen2.5-7B-Instruct 3-way ablation that narrowed upstream PR #53433 to raising the 20–35 GiB decode graph ceiling (48 → 128), and preserves the earlier 1.5B RTX 4090 and H100 follow-ups in collapsible archives below. All follow-ups in this section are EXPLORATORY on shared cloud pods.
6.1 Observed serving slowdown
At 16 slots and 40 requests/s with SGLang's default flags, p95 TTFT was 11.8 to 13.5 s while vLLM's was about 1.0 to 1.6 s (section 4). The two engines were not at a comparable setting. In my launch, SGLang's decode CUDA graphs covered batch sizes up to 48, which the server log shows (same line with my 0.85, with SGLang's own default memory fraction, and without LoRA):
Capture target decode CUDA graph end. bs=[1, 2, 4, 8, 12, 16, 24, 32, 40, 48], elapsed=1.49 s, mem usage=0.15 GB, avail mem=5.36 GB.
In the main starts at 16 slots with SGLang's default flags and 40 rps, 70 to 94% of decode steps had more than 48 requests in the batch (peaks of 213 to 355), so most steps ran outside the graphs. Raising the graph limit with one flag, 16 and 32 slots, 40 requests/s offered, p95 TTFT median (min–max) of 3 starts, and completed requests/s over the measured window:
| config | 40 rps p95 TTFT | completed requests/s | 20 rps p95 TTFT |
|---|---|---|---|
| 16 slots, SGLang's default | 13.50 s (13.45–13.63) | 23.5 | 83 ms |
| 16 slots, limit 256 | 2.18 s (2.15–2.43) | 36.4 | 88 ms |
| 32 slots, SGLang's default | 98 ms (95–106) | 31.3 | 48 ms |
| 32 slots, limit 256 | 63 ms (53–686) | 39.2 | 46 ms |
The slot sweep on SGLang at its default flags (20, 24, 28, 32 slots; 40 rps p95 TTFT 11.7 s, 9.0 s, 107 ms, 94 ms against 13.5 s at 16) shows slots still matter.
6.2 Configuration mismatch
SGLang sets two limits independently and does not reconcile them. Without --max-running-requests, the running limit is computed from KV capacity and clamped to between 2,048 and 4,096: resolve_max_num_reqs in mem_cache/kv_cache_configurator.py sets estimated = int(token_capacity / context_len * 512) and then max(min(estimated, 4096), 2048), identical at v0.5.23, 0e9cff98f5, 385262cabb and a9a27e9255 (mem_cache/kv/sizing.py carries the same clamp from 0e9cff98f5). At context 4,096 the clamp reaches 4,096 for any pool above 32,768 tokens, and every configuration tested here sits at that ceiling: about 600k tokens on the 4090, and 2.36M (TP=1) and 4.80M (TP=2) on the H100. The logged value was 4,096 in each case. The decode CUDA graph range is a separate default chosen in memory_hook.py from the device's reported memory: the branch for devices under 35 GiB and at least 20 GiB (its comment reads "A10, 4090, 5090") sets the range to 48 when tp is below 4 and 160 otherwise, unless --cuda-graph-max-bs-decode is given (source at main 385262cabb). A decode batch above the range runs eagerly.
In the original investigation only the RTX 4090 (24 GB) was tested; an H100 check of the running-limit default followed (section 6.9). The branch's comment also names the A10 (24 GB) and the RTX 5090 (32 GB); I did not test those two, and a configuration branch does not by itself show which devices are affected in practice. Other tiers use different ranges (128 for the next branch up).
6.3 Client-observed inter-chunk latency at fixed concurrency
These are client-observed inter-chunk latencies, measured with a microbench at fixed concurrency (300 requests, median time per streamed output chunk in ms, 16 resident adapters or the base model). They include scheduling and streaming, so they are not decode-step execution times:
| case | SGLang stock (ms per chunk) | SGLang limit 256 (ms per chunk) | vLLM 0.34.0 (ms per chunk) |
|---|---|---|---|
| 48 concurrent, base model | 5.7 | 5.7 | 5.3 |
| 48 concurrent, 16 adapters | 6.8 | 6.7 | 8.6 |
| 96 concurrent, base model | 33.5 | 7.1 | 6.6 |
| 96 concurrent, 16 adapters | 33.5 | 8.3 | 10.3 |
What this establishes: with 48 concurrent requests the stock server, the raised-limit server and vLLM have similar chunk intervals; with 96 the stock server's interval is about 4 to 5 times higher (33.5 ms against 7.1 to 8.3 ms with the raised limit). It does not say where the time goes inside a step; the instrumented measurements below do.
6.4 Instrumented decode-step wall-clock latency
This is a different measurement: server-side scheduler instrumentation, median wall time of one decode step binned by batch size, closed loop with no busy loops (raw output: step6.txt).
| server | batch 1 to 48 | batch 49 to 96 |
|---|---|---|
| LoRA, SGLang's default range | 1.7 to 1.9 ms | 31.4 to 31.5 ms |
| LoRA, range 256 | 1.7 to 1.9 ms | 2.0 ms |
| no LoRA, SGLang's default range | 1.3 ms | 18.7 to 18.9 ms |
| no LoRA, range 256 | 1.2 ms | 1.3 ms |
Outside the graph a step is about 15 times a replay (31 ms against about 2 ms with LoRA; 18.7 ms against 1.3 ms without) and flat in batch size, which fits a cost bound by CPU work (Python and kernel launches) and not GPU work. LoRA batch preparation was 0.57 ms per step, about 5% of the LoRA excess, and requests for the base model on the LoRA server cost the same as adapter requests outside the graph (31.3 against 31.5 ms). Client-observed chunk intervals (6.3) and instrumented step times (6.4) are different quantities and are not interchangeable.
6.5 A mechanism the measurements support
The measurements support a mechanism in which decode batches exceeding captured CUDA graph coverage incur substantially higher per-step execution costs. Under the tested offered load, slower request completion can keep the batch above the graph range and sustain the degraded state. The pieces are distinct and I have not isolated each causally: adapter-residency pressure (requests waiting for a slot), CUDA graph coverage, eager execution overhead, queue growth, longer slot residency per request, and CPU contention. The tested workloads were fixed 550-request bursts, so "stays degraded" means during the burst while offered load continued, not indefinitely. In the slow-state starts, slow steps made each request hold its slot about 5 times longer, so requests for adapters that weren't resident waited (median 10 to 14 s) while requests for resident adapters didn't (0.00 s). With 16 slots, about 3 in 10 requests needed a non-resident adapter. This is the adapter-residency half of the picture; the step-cost half follows.
6.6 Qwen2.5-7B 3-way ablation and narrowing PR #53433 EXPLORATORY
To test whether PR #53433’s two components hold on a larger, weight-read-heavier model (and whether a larger graph range steals KV-cache memory on 24 GB cards), I ran a 3-way ablation on Qwen2.5-7B-Instruct (BF16) on an RTX 4090 24 GB (sglang 0.5.23, --mem-fraction-static 0.85 --context-length 4096), comparing: (1) stock (decode graph cap 48, max_running_requests=4096), (2) cg128_only (--cuda-graph-max-bs-decode 128 alone, max_running_requests=4096), and (3) pr53433 (--cuda-graph-max-bs-decode 128 --max-running-requests 128). Both base 7B (no LoRA) and 7B + 16 rank-16 b_std=0.02 LoRAs (--max-loras-per-batch 8, Zipf) were tested using scripts/loadgen_v2.py with ignore_eos: true and exact tokenizer-verified token counts (0 errors, median_output_tokens = 128.0, finish_length_frac = 1.0000 on every run; single server start per configuration).
ignore_eos=true, 0 errors). Left: raising the decode graph cap 48 → 128 alone (cg128_only) cuts Base-7B 20 rps p95 TTFT 61× (8,001 → 131.7 ms) with zero KV-cache loss (+0.14 GB). Right: at c=192 saturation, cg128_only has zero Base-7B regression (3,318 vs 3,345 tok/s) and lifts 7B+LoRA +12.8%, whereas unconditionally capping max_running_requests=128 regresses Base-7B by −11.6% (2,957 tok/s) — leading to dropping the cap from PR #53433.Table S7B-1. Startup KV-cache capacity and decode graph capture memory on Qwen2.5-7B-Instruct BF16 (RTX 4090 24 GB, --mem-fraction-static 0.85).
| configuration | KV cache (max_total_num_tokens) | decode graph capture | avail mem after capture |
|---|---|---|---|
| Base 7B, stock (48) | 99,104 | bs=[1..48], 1.68 s, 0.14 GB | 1.79 GB |
| Base 7B, cap 128 | 99,104 (unchanged) | bs=[1..128], 2.17 s, 0.28 GB (+0.14 GB) | 1.66 GB |
| 7B + 16 LoRA, stock (48) | 87,328 | bs=[1..48], 1.86 s, 0.15 GB | 1.69 GB |
| 7B + 16 LoRA, cap 128 | 87,328 (unchanged) | bs=[1..128], 2.91 s, 0.29 GB (+0.14 GB) | 1.56 GB |
Table S7B-2. 3-way ablation on Qwen2.5-7B-Instruct BF16 (RTX 4090 24 GB): open-loop 10 and 20 rps (250 requests) and closed-loop saturation at concurrency 192 (400 requests). All throughput figures are exact tokenizer-verified tokens/s.
| workload & config | p50 TTFT | p95 TTFT | p50 TPOT | p50 e2e | verified tok/s | sampled cuda_graph=False |
|---|---|---|---|---|---|---|
Base 7B, 20 rps — stock (48/4096) | 106.0 ms | 8,000.7 ms | 45.69 ms | 11.08 s | 1,558.4 | – |
Base 7B, 20 rps — cg128_only (128/4096) | 81.5 ms | 131.7 ms | 42.73 ms | 5.53 s | 2,197.9 (+41.0%) | – |
Base 7B, 20 rps — cap (128/128) | 84.6 ms | 137.5 ms | 42.69 ms | 5.49 s | 2,196.4 | – |
Base 7B, c=192 — stock (48/4096) | 1,075.8 ms | 2,969.2 ms | 30.58 ms | 4.83 s | 3,345.4 | 18/60 (max 192) |
Base 7B, c=192 — cg128_only (128/4096) | 1,042.2 ms | 2,969.9 ms | 32.43 ms | 5.05 s | 3,318.0 (−0.8%) | 8/62 (max 192) |
Base 7B, c=192 — cap (128/128) | 2,548.5 ms | 6,767.0 ms | 24.91 ms | 5.85 s | 2,956.7 (−11.6%) | 0/65 (max 128) |
7B+16 LoRA, 20 rps — stock (48/4096) | 103.1 ms | 14,007.6 ms | 42.02 ms | 6.90 s | 1,530.1 | – |
7B+16 LoRA, 20 rps — cg128_only (128/4096) | 105.4 ms | 11,325.8 ms | 40.27 ms | 5.93 s | 1,685.0 (+10.1%) | – |
7B+16 LoRA, 20 rps — cap (128/128) | 119.1 ms | 11,265.8 ms | 38.07 ms | 5.79 s | 1,659.1 (+8.4%) | – |
7B+16 LoRA, c=192 — stock (48/4096) | 3,073.0 ms | 9,123.3 ms | 41.86 ms | 7.83 s | 1,804.7 | 21/65 (max 130) |
7B+16 LoRA, c=192 — cg128_only (128/4096) | 3,159.4 ms | 9,046.2 ms | 36.17 ms | 7.76 s | 2,035.8 (+12.8%) | 5/65 (max 134) |
7B+16 LoRA, c=192 — cap (128/128) | 3,057.7 ms | 8,059.5 ms | 33.06 ms | 6.54 s | 2,144.9 (+18.9%) | 0/66 (max 128) |
At 10 rps on Base 7B, all three configs matched closely (p95 TTFT 97.0–98.1 ms, 1,218 tok/s). The 20 rps and c=192 rows cleanly separate the two mechanisms:
- Raising the decode graph ceiling 48 → 128 alone (
cg128_only) is strictly Pareto-improving: it captures the entire Base-7B 20 rps speedup (61× lower p95 TTFT: 8,001 → 131.7 ms; +41% tok/s), improves 7B+LoRA throughput +10.1% (20 rps) and +12.8% (c=192), costs +0.14 GB with zero KV-cache loss, and has zero Base-7B saturation regression (3,318 vs 3,345 tok/s). - Unconditionally capping
max_running_requests = 128hurts saturated Base 7B: throughput dropped −11.6% (3,345 → 2,957 tok/s), median TTFT rose +1.5 s (1.08 → 2.55 s), and p95 TTFT more than doubled (2.97 → 6.77 s). On a 7B base model (~14.3 GB weights per step), amortizing weight reads across 192 sequences beats the eager Python/launch overhead that dominated 1.5B. - Resulting PR scope change: Based on this ablation, I removed the unconditional
max_running_requestsdefault cap from PR #53433 and narrowed the PR to a 2-file change (+20/−2) raising the 20–35 GiB decode CUDA graph ceiling from 48 to 128 (with unit tests intest_server_args.py). Data: followup/sglang_cliff/rtx4090_7b_20261129/RESULTS.md.
6.7 CPU contention as one demonstrated trigger
Why a start tips. With 14 CPU busy loops on the host, 2 of 3 starts went slow at 20 rps (p95 TTFT 20.4 s and 19.7 s; the third 5.0 s); with 0 and 8 loops none did (3 starts each). Quota throttling was under 1% in every start, so it was contention, not throttling. The scheduler thread was not preempted but its work cost more CPU (running a batch took 60 to 165% longer), and in the starts that went slow 23 to 33% of decode steps ran above 48, against 0.1% in the one that did not. Stock starts without busy loops also tipped (4 of 27 at 20 rps earlier, and one in a later round), so contention is one demonstrated trigger, not the only one. Other triggers are unresolved.
6.8 Remaining gap and open questions
The remaining gap. With the limit raised, decoding stalls after each adapter load: the median decode step containing a load is 51 to 58 ms longer than one without (6.4 ms), and those steps fill 23 to 24% of the busy window. Overlap loading cuts p95 TTFT by about 12 to 15% (1.9 s against 2.1 to 3.1 s) but leaves about a fifth of the window (21%) in stalls. The cause isn't found. PENDING
Not established. The 7B 3-way ablation (6.6) used single server starts per configuration on a shared RTX 4090; the earlier 1.5B 4090 screening runs used 2–3 starts and 550-request bursts; the H100 check (archive below) used 1.5B with single saturating runs and no TP=4. Other 20–35 GiB GPUs (A10, L4, RTX 5090), models above 7B, and H100 7B+ workloads remain untested. PENDING Root cause of the post-load decode stall (the remaining gap to vLLM), dedicated bare-metal replication, and PR #53433 maintainer review.
6.9 Prior art
The mechanism was reported before my diagnosis, and I did not search for it beforehand. #33483 (August 2026, closed for inactivity on 2026-11-08, not fixed) described decode graphs captured to 32 while max_running_requests was 4,096, and a slow state the server does not leave; it measured --max-running-requests 32 and a larger graph range as workarounds, and a comment reproduced it on an RTX 4090 at the 48 default. A warning for batches above the range (#33900) was closed without review. The range for other tiers was raised in #37898 (32 GB, 24 to 48, merged 2026-09-04) and #46132 (35 to 60 GiB, to 128, merged 2026-11-13); #40346 (RTX 5090, to 128) is open. As far as I found, what this study adds is the LoRA case, CPU contention as a trigger at a load the server otherwise handles, the step-cost measurements, and a proposed change to the 20 to 35 GiB branch, which was still 48 on main (0e9cff98f5 at the time). It also adds the H100 check of the running-limit default (6.9). The underlying mismatch is not a finding of this study.
Earlier checks of the trigger did not isolate it: the batch passing 48 at the moment of the earliest long wait, slot capture in its strict form, and LRU eviction of adapters with waiting requests. The contention and step-time runs above are what found the mechanism.
Archive: Early 1.5B mitigation (48 → 256) & rejected alternatives (drainer, split-decode) (expand)
Original 1.5B two-part mitigation (48 → 256 + running cap; superseded by section 6.6)
The initial mitigation in PR #53433 (issue #53431) combined two components, which were not tested separately on 1.5B RTX 4090 runs. The H100 check (section 6.9) exercised the running-limit component alone on 1.5B, and a subsequent Qwen2.5-7B-Instruct 3-way ablation (section 6.10) separated both components on the RTX 4090 and led me to drop the unconditional running-limit cap and narrow PR #53433 to raising the 20–35 GiB decode graph ceiling (48 → 128) alone. Original 1.5B combined proposal:
- When
--max-running-requestsis not given, default it to the largest captured decode graph batch size. An explicit value is unchanged. - Raise the default decode graph range from 48 to 256 in the memory branch described above (tp below 4), so the default running limit does not fall to 48. Modeled on vLLM, which bounds its running limit within its graph range (on a 4090: running limit 256, graphs to 512).
40 requests/s p95 TTFT and output chunks/s (two starts each; offered load 40 requests/s):
| no contention | 14 busy loops | |
|---|---|---|
| SGLang main | 13.5 s, 13.4 s; 2,981 and 3,040 chunks/s | 14.5 s, 18.9 s; 2,725 and 2,155 chunks/s |
| with the fix | 2.25 s, 2.08 s; 4,665 and 4,673 chunks/s | 3.35 s, 7.93 s; 4,598 and 4,014 chunks/s |
| vLLM 0.34.0 | 1.43 s, 1.43 s; 4,657 and 4,658 chunks/s | 1.44 s, 1.46 s; 4,671 and 4,446 chunks/s |
On 1,319 GSM8K problems, greedy-generation accuracy was 67.5% for main and 66.3% for the proposed patch (a range-256 flag on main gave 66.3% and 66.5%). No degenerate generations were observed in the patch run. This is preliminary accuracy-screening evidence; it does not establish statistical equivalence, non-inferiority, or numerical correctness, and the 1.2-point difference was not tested. A post-hoc paired comparison of the H100 pair is in section 8. At 20 requests/s p95 TTFT was 78 ms in both starts with the patch and 83 and 78 ms on main. The patch is 1.5 times vLLM's 40 requests/s p95 TTFT without contention and 2.3 to 5.4 times with it.
Memory accounting. These are logged values from single starts at --mem-fraction-static 0.85 on the 4090, with different measurement boundaries:
| quantity (source: server log) | graphs to 48 (stock) | graphs to 256 |
|---|---|---|
| graph capture memory ("mem usage" on the capture line) | 0.15 GB | 0.54 GB |
| free memory before decode capture begins | 2.14 GB | 1.98 to 2.02 GB |
| free memory after capture ("avail mem") | 1.98 GB (1.95 in two starts) | 1.44 to 1.51 GB |
| decode capture time | 1.5 to 1.8 s | 4.1 to 5.0 s |
| reported KV-cache capacity | 599,470 or 600,201 tokens | 599,470 or 600,201 tokens |
The capture memory grows by 0.39 GB while free memory after capture is about 0.5 GB lower. The difference is not explained by the capture line alone: free memory was also 0.12 to 0.16 GB lower before decode capture began in the 256 starts. I have not traced that and do not treat the two figures as the same measurement. The "about 0.5 GB" cost quoted elsewhere is the difference in free memory after capture. Reported KV capacity did not change here, in contrast to the slot experiments in section 5. Capture takes about 3 s longer.
What it does not do. It does not remove the failure: with 16 slots, 40 requests/s p95 TTFT (2.1 to 2.3 s) still misses the 500 ms target and is above vLLM's 1.4 s; under CPU contention it was 3.4 to 7.9 s; the stall after adapter loads below is unexplained; on 1.5B this combined two changes before the 7B ablation (section 6.6) separated them and narrowed PR #53433 to graph cap 128 without the unconditional running-limit cap; on the H100 the cap raised median TTFT at saturation (6.9); and raising the range costs capture time and free memory, while capping the running limit costs admitted concurrency (6.7).
Rejected alternatives (drainer, depth-first admission, split-decode, cap-at-48)
- The drainer (--lora-drain-wait-threshold, present in both versions; #46500 revamped it): turning it on lowered 40 rps p95 about a quarter (17 to 27%; Phase 1: from 12.0 and 13.4 s off to 8.7 to 11.1 s at a 1.0 s threshold and 9.2 to 9.9 s at 0.2 s), but it moved waiting from non-resident adapters to everyone and left p95 failing. The #46500 revamp itself made no material difference against the old drainer at the same setting (main against v0.5.23, by the rule fixed in advance). At 40 rps, 73 of its 106 evictions (69%) hit an adapter that still had requests waiting.
- Depth-first admission: the rule ran about 100 times in 550 requests, and p95 was 13.50 s patched against 13.46 s at SGLang's default.
- Splitting a large decode batch into several graph-sized replays: abandoned. The earliest working-looking version (v2, no blocking copy per chunk) cut oversized steps from 12.0 to 4.0 ms and gave 9.3 to 9.4 s at 40 rps, but it failed GSM8K at 6.75% against 67.5% (degenerate generations), so its timing is invalid WITHDRAWN. I fixed two races in later variants; the latest reached 66.0 to 66.9% but still produced intermittent degenerate generations (6 in one of three runs), so a race remained. All of its timing results are withdrawn, and the proposed mitigation replaced it.
- Capping
--max-running-requestsat 48, so every decode step stays in the graph: under 14 busy loops its 40 requests/s p95 TTFT was 2.1 to 2.8 s, against 6.8 to 7.1 s for graph range 256 and 13.5 s stock. Without contention its throughput was 8.5% below graph range 256 and its 40 requests/s p95 TTFT was 2.6 s, over the 500 ms bar. It keeps steps in the graph at a cost in admitted concurrency. - A smarter drain victim, replayed offline: at most 2% better p95 than the simple choice, even with the true future arrivals.
- Earlier, at the default graph range, p95 TTFT at 40 rps with a drain threshold, overlap loading and FIFO eviction (control run):
| change | p95 TTFT ms | vs control |
|---|---|---|
| control (default) | 12,031 (11,807–13,764) | – |
| drain wait threshold 1 s (my choice) | 10,111 (9,026–10,597) | −16.0% |
| overlap loading | 11,977 (11,420–13,422) | -0.4% |
| FIFO eviction | 12,168 (11,874–13,709) | +1.1% |
Archive: H100 TP=1 & TP=2 study of the dropped admission cap (1.5B, Figures A–D) (expand)
H100 TP=1 & TP=2 study of the dropped admission cap EXPLORATORY
max_running_requests cap from the original PR #53433 on 1.5B models (where H100 decode graphs already reached 256). Because the subsequent Qwen2.5-7B 3-way ablation (section 6.6) revealed a −11.6% base-7B saturation regression from unconditional capping, that cap was dropped from PR #53433. The H100 results are preserved in full below as an architectural study of admission capping at saturation.Status. A follow-up with its own plan, committed before any H100 data, and its own deviations (below). Results are single saturating runs and 3-start latency medians on a rented pod. The change under test, PR #53433, is open and unmerged.
Why this experiment was needed
The RTX 4090 mitigation combined two changes (6.8): default the running-request limit to the largest captured decode graph batch size, and raise the graph range from 48 to 256 in the 20 to 35 GiB branch. A reader could fairly ask whether the result is a workaround for an unusually small graph range on a consumer GPU. The H100 tier lets part of that question be asked. Its decode graphs were already captured to batch size 256 at TP=1 and TP=2 (the capture line in each SGLang server log lists batch sizes up to 256, in stock and patched builds alike), and the PR's diff changes the range only in the 20 to 35 GiB branch. So on the H100 the range raise does not apply, and the one change in effect is the running-limit default: 4,096 in stock (the clamp ceiling, section 6.2), 256 with the PR (both logged as max_running_requests). The H100 runs therefore give evidence about the cap with the graph range held at 256 in both builds. They do not test the range raise, and the pair of experiments is not a controlled factorial: hardware, GPU memory, tensor-parallel width and software build all differ from the 4090 runs, and the 4090 runs never separated the two components.
The architectural hypothesis (the plan's, written beforehand): if the running-request limit exceeds the captured graph range, saturating load can push decode batches above the range, where steps run eagerly; capping the limit at the range keeps batches inside graph coverage and trades that for waiting. The plan did not predict which build would be faster at saturation (prediction h3).
Design
Model, the 32 synthetic adapters (the numerically extreme ones of section 8), SGLang and vLLM flags (SGLang with --tp N added), the open-loop workload, the load generator and the output metric are those of the 4090 runs; the full table is in DESIGN.md. The output metric is chunks, not tokens (section 2): the raw files, the summary script and my PR comment call them tokens.
| item | H100 check |
|---|---|
| Hardware | RunPod pod f70961d23335: 4 × H100 80GB HBM3, driver 595.112.07, CUDA 13.2, CPU quota 88.4. TP=1 on GPU 0, TP=2 on GPUs 0 and 1. Exclusive access to the physical host is not established; load average at server starts 3.2 to 27.6 |
| SGLang builds | stock a9a27e9255 (the PR’s merge base with main); patched 9009897b21 (PR head). The diff is memory_hook.py, kv_cache_configurator.py and one CPU unit test. Same resolved dependencies (torch 2.14.1, flashinfer 0.7.4). Main contains PR #52709, which applies only when --max-running-requests is set, so it does not apply here |
| Open-loop starts | 3 fresh server starts per build, alternating stock and patched, 500 measured requests per start; vLLM 0.34.0 as reference |
| Closed-loop workload | Concurrency 1,024, 3,000 requests after 300 warm-up; 1 server start per build. Closed loop measures capacity, and its TTFT includes waiting behind the fixed concurrency; it is not a prediction of user latency at any offered rate |
Pre-specified decision rule
The plan fixed this rule before any H100 data (amendment, committed 2026-11-26 21:01 -0800; the earliest run in the log is stamped 2026-11-27 07:05 by the pod clock, whose time zone is not recorded). The PR "does not regress" on H100 at a given TP if both hold: patched saturating throughput is at least 0.95 times stock’s, and at 20 and at 40 requests/s the median over 3 starts of patched p95 TTFT is at most 1.10 times stock’s. The 10% allowance was set by me beforehand for start-to-start noise. GSM8K was to be reported with its standard error, flagging a gap above 2 standard errors. The plan also had a stop condition (patched saturating throughput more than 5% below stock’s) that did not trigger. This is a regression screen with a descriptive performance result. It is not an equivalence or non-inferiority test, and passing it does not mean the absence of every regression or readiness for production.
Results
Table H1. Saturated output, closed loop, concurrency 1,024, 3,000 requests. Qwen2.5-1.5B-Instruct, 32 Zipf adapters, one H100 per TP rank. One run per cell, so no spread is available. Exploratory, with its own pre-specified rule.
| configuration | stock, chunks/s | patched, chunks/s | change | ratio (rule: at least 0.95) | requests/s, stock to patched |
|---|---|---|---|---|---|
| H100 TP=1 | 13,141 | 16,409 | +24.9% | 1.249 | 102.9 to 128.4 |
| H100 TP=2 | 12,460 | 16,076 | +29.0% | 1.290 | 97.6 to 125.9 |
| H100 TP=1, vLLM 0.34.0 reference (not in the rule) | 13,211 | – | – | – | 104.0 |
Table H2. Open-loop p95 TTFT, 40 requests/s offered, 500 measured requests per start. Same model and adapters. 3 server starts per build; medians, with all three values shown. Exploratory.
| configuration | stock p95 TTFT, ms (3 starts) | patched p95 TTFT, ms (3 starts) | change in medians | ratio (rule: at most 1.10) |
|---|---|---|---|---|
| H100 TP=1 | 481 (434, 481, 667) | 431 (418, 431, 492) | −10.4% | 0.896 |
| H100 TP=2 | 476 (433, 476, 493) | 465 (409, 465, 472) | −2.4% | 0.976 |
| H100 TP=1, vLLM reference | 614 (613, 614, 673) | – | – | – |
| H100 TP=2, vLLM reference | 323 (289, 323, 385) | – | – | – |
At 20 requests/s the medians were 71.5 ms stock and 71.2 ms patched at TP=1, and 72.8 and 70.1 ms at TP=2 (ratios 0.996 and 0.963). The TP=2 change is −2.4% from the unrounded medians (476.48 and 465.04 ms). The changelog and my PR comment report 477 ms and −2.5%, which came from rounding 476.5 up; I use the unrounded values here. Both configurations passed the rule. The 40 requests/s differences should not be read as improvements: the stock starts alone spread from 434 to 667 ms at TP=1, which spans the patched values, and in the sampled server-log lines of these open-loop runs the running batch never exceeded 54 requests, so the cap at 256 was never reached. That matches prediction h2 and means the latency result is "no regression found beyond noise", which is a different claim from the 84% improvement on the 4090, where batches at the same offered load reached 213 to 355 against a range of 48.
The saturation trade-off
Table H3. The same closed-loop saturating runs as Table H1: client-observed TTFT and time per streamed chunk, plus sampled server-log decode lines. One run per cell. Exploratory.
| configuration | median TTFT, s | p95 TTFT, s | median ms per chunk | max running in log | log lines above 256 (of those without graph) | max logged queue |
|---|---|---|---|---|---|---|
| TP=1 stock | 2.0 | 7.8 | 37.7 | 799 | 15 of 131 (15) | 381 |
| TP=1 patched | 5.4 | 7.5 | 11.1 | 256 | 0 of 155 | 768 |
| TP=2 stock | 2.0 | 12.0 | 39.3 | 773 | 16 of 97 (16) | 571 |
| TP=2 patched | 5.6 | 7.5 | 10.7 | 256 | 0 of 139 | 768 |
The log columns come from SGLang’s periodic decode-batch log lines (a sample of steps, not every step) over the whole server life of each saturating run, including its warm-up. In every sampled line above 256 running requests, the line reads cuda graph: False; in the patched runs every sampled line reads cuda graph: True. That is direct evidence that stock batches left graph coverage at saturation on the H100, and that the cap kept them inside it. It is not a step-time measurement on this hardware: I did not instrument eager step cost on the H100, so the "about 15 times" figure (6.4) remains a 4090 measurement.
What was measured. With the cap, throughput rose 25 to 29%, median time per streamed chunk fell by about 70% (37.7 to 11.1 ms at TP=1; 39.3 to 10.7 ms at TP=2), median TTFT rose from 2.0 s to 5.4 s (TP=1) and 5.6 s (TP=2), and p95 TTFT fell slightly at TP=1 and by more at TP=2 (single runs; I would not read the TP=2 gap beyond its direction). The logged queue peaked at 768 in both patched runs, which is 1,024 minus the cap of 256.
The interpretation, which is not a measured decomposition. A natural reading: restricting running requests makes late arrivals wait before admission, which raises the time to first output; keeping active decode batches inside graph coverage makes each decode step cheaper, which raises aggregate throughput and shortens time per chunk for admitted requests. The queue-depth log supports the admission half in kind (requests do wait). It does not show where each request’s TTFT went, and I did not instrument admission residence time. Nor does it separate graph coverage from batch size: a cap of 256 also means smaller batches than stock’s (median about 640 running requests in its sampled saturated log lines at TP=1), and smaller batches can have shorter steps even without graphs. The control that would separate them (stock with the graph range raised to cover its batches, or the patched build with a range above 256) was not run.
Why throughput is not the same as serving quality. A throughput-maximizing setting can lower the experience of the median user: in these runs the median request waited about 2.7 times longer before its first chunk, in exchange for faster generation once admitted and a tighter tail. Which side matters depends on the workload. The following are hypotheses to test, not recommendations established by these data:
- Interactive, latency-constrained serving. Median TTFT is the user-visible wait. A cap that raises it under saturation may be unwelcome, and admission control that sheds or redirects load before saturation may be a better lever than queueing inside the server. At the offered rates tested (20 and 40 requests/s) the cap was never reached and nothing changed.
- Background agents and throughput-oriented serving. Where the metric is completed work per hour and individual start delay is tolerable, higher aggregate output and a shorter decode interval may be the better trade.
- Admission and scheduling policy. The result is an argument for choosing the running limit deliberately alongside the graph range rather than leaving it at the KV-based default, and for exposing queueing as a policy choice (for example a limit per priority class). It does not say 256 is the right limit.
The vLLM reference
The TP=1 patched SGLang run measured 16,409 chunks/s against vLLM 0.34.0’s 13,211 in the same pod and workload, 24.2% higher. I include it as a measured reference in this one workload, not as a general ranking. Matched: model, adapters and their 32 popularity weights, slot count (16), memory fraction (0.85), context length (4,096), load generator and seed, prompt and output lengths, closed-loop concurrency, GPU type, and the counting method (streamed chunks, ignore_eos sent to both). Not matched or not recorded: each engine’s own scheduler defaults (vLLM’s running-sequence limit was not recorded in the log lines I checked, and SGLang’s is the one under test), prefix caching (vLLM log: on; SGLang left at its default and not checked), the engines’ chunking of streamed text, and server-start and warm-up details beyond the shared two-pass warm-up. One run each; no TP=2 vLLM saturating run exists. At 40 requests/s, vLLM’s p95 TTFT was higher than SGLang’s at TP=1 (614 against 431 to 481 ms) and lower at TP=2 (323 against 465 to 477 ms), so there is no consistent ordering across the two configurations. I would not cite the 24% as a claim about the engines.
The plan, its changes and what was dropped
The plan covered TP=1, 2 and 4; TP=4 was dropped at my request and the artifacts record no reason beyond that. The original TP=1 saturating runs were invalid (client open-file limit; 2,280 of 3,000 requests failed in both builds), are kept as invalid_fdlimit_*, and the reruns are reported; the full list, including the added vLLM run and the post-hoc analysis, is in DEVIATIONS.md.
What this evidence does and does not support
| question | status |
|---|---|
| Directly observed | Stock H100 starts run with a 4,096 limit and graphs to 256; at 1,024 concurrency stock batches reached 799 and sampled lines above 256 ran without graphs; the patched build never exceeded 256 and always showed graphs; saturated chunks/s and time per chunk improved; median TTFT rose; 20 and 40 requests/s latency stayed within noise. |
| Experimentally manipulated | The default running limit (4,096 to 256), by swapping builds. Nothing else was varied independently; the builds differ only in the PR’s diff. |
| Supported by the measurements | At saturation the cap shifts waiting from the engine’s decode batch to the admission queue and shortens decode intervals. This is consistent with, and adds a second hardware tier to, the mismatch mechanism reported in #33483 and measured on the 4090. |
| Inference only | That graph coverage, rather than batch size alone, causes the gain; that admission queueing explains the TTFT rise; that the result carries to larger models, other adapter loads or no adapters. |
| Needs further experiments | Section 11, "Next experiments". |
Together, the two hardware tiers are complementary rather than redundant. The 4090 shows the failure and a combined mitigation at a load the server otherwise handles. The H100 shows the cap acting alone where graph coverage is already wide, and exposes its cost. Reading them together, graph coverage and admission policy are coupled design choices, and the 4090 problem is not only a small default range: any configuration whose running limit exceeds its captured range can show the pattern once load pushes batches past it. The prior report (#33483) identified that mismatch; what the H100 check adds is a second GPU tier, tensor parallelism at 1 and 2, and a measured price in median TTFT. It is evidence consistent with the architectural interpretation, not a proof of it.
07
mistral.rs: grouped CUDA LoRA kernels (PR #2571)#
7.1 Observed scaling problem
mistral.rs handled the base model and one adapter up to 10 rps and fell over at 20. With 32 Zipf adapters, p95 TTFT was 123 ms at 5 rps and 24.6 s at 10 rps. p95 TTFT in ms, median (min–max):
| workload | 5 rps | 10 rps | 20 rps |
|---|---|---|---|
| base model | 32 (32–33) | 41 (36–42) | 2,204 (69–2,560) |
| 1 adapter | 96 (86–98) | 153 (146–176) | 25,901 (23,302–27,092) |
| 32 Zipf adapters | 123 (101–125) | 24,615 (19,292–31,348) | – |
10 of 9,000 mistral.rs adapter requests came back as empty completions, which the ladder scores as failures. vLLM and SGLang had 0 of 30,000 each. The prompt and adapter mixes differed, so this is not a comparison between engines.
7.2 Where the time goes EXPLORATORY
A closed-loop probe with 8 adapters loaded shows where the time goes. Time per streamed output chunk (TPOT in the load generator) at 32 concurrent requests:
| case | ms per streamed chunk, concurrency 8 | ms per streamed chunk, concurrency 32 | chunks/s, concurrency 32 |
|---|---|---|---|
| no LoRA | 8.6 | 12.1 | 2,044 |
| LoRA on, unused | 9.0 | 12.8 | 1,978 |
| 1 adapter | 11.7 | 18.3 | 1,380 |
| 2 adapters | 13.7 | 18.5 | 1,355 |
| 4 adapters | 15.6 | 21.6 | 1,188 |
| 8 adapters | 17.7 | 26.0 | 1,011 |
Throughput at 8 adapters is about half the base model's.
7.3 Existing launch architecture and diagnostic experiment
In v0.9.5 the CUDA LoRA path launches a kernel per active adapter at each of 196 sites per decode step (28 layers by 7 modules)..
To see what that loop costs, I built a patched binary that pushes all rows through one adapter. Its output is wrong. It's a stopwatch, not a fix. Its timing is evidence about launch overhead, not a correctness-preserving optimization, and it is not the grouped implementation. It took about a quarter off the time per streamed chunk at 8 adapters (26.0 to 19.0 ms at concurrency 32), and skipping the per-adapter bookkeeping as well changed nothing, so the launches were the cost.
7.4 Grouped kernel implementation
So I wrote the real thing (open PR #2571, for issue #2569): one grouped launch pair per site, each row looking up its adapter in a per-step table, the intended arithmetic is unchanged.
Unit tests. Unit tests match the old path bit for bit (fp16 and bf16, mixed ranks, an adapter with no weights at a site, more than 32 adapters), and the full LoRA test module passes on the GPU (81 tests). These establish the grouped kernel against the old path on those cases. They do not establish complete end-to-end equivalence.
7.5 Verified-token 1.5B (6-block) & 7B (3-block) balanced reruns and 128/128 parity EXPLORATORY
To retire the unverified-chunk, missing-c=8-control, incomplete-B2, and single-model caveats above, I compiled clean --features "cuda flash-attn" binaries of mistralrs-old (21da642f) and mistralrs-new (600cdef7, PR #2571) in empty target directories (CUDA 13.2, CUDA_COMPUTE_CAP=89, rustc 1.100.1; all 81/81 GPU LoRA tests pass) and ran full balanced reruns on both Qwen2.5-1.5B-Instruct and Qwen2.5-7B-Instruct (BF16) with b_std=0.02 adapters and scripts/loadgen_v2.py (sending ignore_eos: true to mistral.rs and counting exact tokenizer-verified tokens). Every run across both suites completed with 0 errors, median_output_tokens = 128.0, and finish_length_frac = 1.0000.
cuda flash-attn balanced reruns of mistral.rs PR #2571 on RTX 4090 with b_std=0.02 adapters and exact tokenizer-verified 128-token completions (ignore_eos=true, 0 errors across 216 runs). Unchanged-code controls (a=0, 1) match within ±0.1–1.2%; PR #2571 flattens 1→8 adapter scaling on both Qwen2.5-1.5B (−33.5%, 6/6 blocks) and Qwen2.5-7B BF16 (−19.5% at c=16, 1.46× verified tok/s, 3/3 blocks).Table M1. Qwen2.5-1.5B-Instruct (BF16), 6 balanced blocks (144/144 runs), b_std=0.02 adapters, exact verified tokens. Median verified ms/tok and verified tok/s.
| conc | adapters | old (ms/tok) | new (ms/tok) | old2 (ms/tok) | new vs old (per block) | blocks faster | verified tok/s (new / old) |
|---|---|---|---|---|---|---|---|
| 8 | 0 (ctrl) | 9.21 | 9.26 | 9.24 | +0.6% (+1, +1, 0, +1, +1, 0) | 2/6 | 791.8 / 783.4 (1.01×) |
| 8 | 1 (ctrl) | 12.55 | 12.65 | 12.61 | +0.8% (+1, +2, 0, +2, −2, +1) | 2/6 | 575.7 / 528.7 (1.09×) |
| 8 | 4 | 17.64 | 12.82 | 17.68 | −27.3% (−27 to −28%) | 6/6 | 539.4 / 420.1 (1.28×) |
| 8 | 8 | 19.61 | 13.05 | 19.72 | −33.5% (−33 to −35%) | 6/6 | 530.8 / 377.0 (1.41×) |
| 32 | 0 (ctrl) | 14.14 | 15.11 | 16.30 | +6.8% (−15 to +22%) | 3/6 | 1,719.0 / 1,825.5 (0.94×) |
| 32 | 1 (ctrl) | 20.62 | 26.46 | 20.92 | +28.3% (−29 to +43%) | 2/6 | 957.4 / 1,183.9 (0.81×) |
| 32 | 4 | 28.25 | 27.43 | 31.54 | −2.9% (−30 to +15%) | 4/6 | 926.8 / 905.6 (1.02×) |
| 32 | 8 | 31.42 | 20.07 | 31.50 | −36.1% (−36 to −49%) | 6/6 | 1,233.3 / 807.7 (1.53×) |
At concurrency 8 on 1.5B, unchanged-code controls (a=0, 1 and old2 vs old) stayed within ±0.6–1.2% across all 6 blocks, and PR #2571 eliminated ~94% of the 1→8 adapter scaling penalty (+7.06 → +0.40 ms/tok). At concurrency 32, a=8 improved −36.1% in 6/6 blocks (1.53× tok/s), but a=0/1/4 controls remained noisy on the shared host. Under strict PLAN.md Amendment 1, the 1.5B suite remains FLAGGED because peak ext_max exceeded 2.0 cores on 114/144 runs (median ext_before = 0.53 cores; reflects shared-host bursts plus extload.py child-exit bias).
Table M2. Qwen2.5-7B-Instruct (BF16, --kv-cache 4GiB), 3 balanced blocks (72/72 runs), 8 rank-16 b_std=0.02 adapters (80.8 MB each), exact verified tokens.
| conc | adapters | old (ms/tok) | new (ms/tok) | old2 (ms/tok) | new vs old (per block) | old2 vs old | verified tok/s (new / old) |
|---|---|---|---|---|---|---|---|
| 8 | 0 (ctrl) | 21.01 | 20.98 | 21.20 | +0.2% (+2.6, −0.1, +0.2%) | +0.9% | 320.8 / 322.8 (0.99×) |
| 8 | 1 (ctrl) | 24.80 | 25.07 | 25.10 | +0.8% (+2.5, −1.4, +0.8%) | −0.8% | 249.8 / 254.0 (0.98×) |
| 8 | 4 | 28.31 | 24.99 | 28.45 | −11.7% (−8.2, −11.7, −12.7%), 3/3 | +0.6% | 243.3 / 225.1 (1.08×) |
| 8 | 8 | 30.17 | 25.27 | 30.91 | −16.2% (−14.3, −16.7, −16.2%), 3/3 | +2.5% | 244.3 / 238.4 (1.02×) |
| 16 | 0 (ctrl) | 22.97 | 22.90 | 23.11 | −0.4% (−0.4, −0.2, −0.7%) | +0.8% | 514.7 / 514.7 (1.00×) |
| 16 | 1 (ctrl) | 28.21 | 28.43 | 28.20 | +0.8% (+0.8, +1.0, −0.4%) | +0.1% | 357.9 / 363.9 (0.98×) |
| 16 | 4 | 31.78 | 28.68 | 32.54 | −9.7% (−11.8, −8.4, −9.7%), 3/3 | +2.5% | 349.4 / 326.9 (1.07×) |
| 16 | 8 | 36.28 | 29.20 | 37.22 | −19.5% (−19.4, −19.5, −20.0%), 3/3 | +2.1% | 435.1 / 297.8 (1.46×) |
On 7B BF16, controls (a=0, 1 and old2 vs old) held within ±0.1–2.5% at both concurrencies, and PR #2571 eliminated ~96% of the 1→8 adapter scaling penalty at c=8 (+5.37 → +0.20 ms/tok) and ~90% at c=16 (+8.07 → +0.77 ms/tok, 1.46× verified throughput). B3 end-to-end parity on adapters_002 (16 prompts × 8 adapters, c=8, temp=0, 64 tok, ignore_eos=true) matched 128/128 bit-exact for both new1 vs new2 and old2 vs new2 (old1 vs old2 = 121/128). Data: 1.5B RESULTS.md, 7B RESULTS.md.
7.6 Remaining limitations
- Both 2026-11-29 balanced suites ran on a shared cloud host (96 host threads); while controls were tight at 1.5B c=8 (±0.6–1.2%) and 7B c=8/c=16 (±0.1–2.5%), 1.5B c=32 controls remained noisy.
- Dedicated bare-metal replication is still PENDING.
- Even with grouped launches, 1-adapter LoRA overhead over base remains (12.6 vs 9.2 ms/tok on 1.5B; 25.1 vs 21.0 ms/tok on 7B) because the kernel is still a per-row dot product rather than a tiled/stacked GEMM.
Archive: Superseded earlier shared-host experiments (no flash-attn, unverified chunks, incomplete B2) (expand)
Earlier end-to-end output comparison (no flash-attn)
On clean rebuilds, I compared 128 completions (16 prompts, 8 adapters, temperature 0) from 6 launches of the old build and 5 launches of the new one. 20 of 30 old-against-new launch pairs were fully identical and 10 were not (at least 120 of 128 identical in every pair). Old against old, 15 pairs, 6 were fully identical; new against new, 10 pairs, all 10 were. All differences fall within the old build's own launch-to-launch variation: 120 completions were identical in every old launch and match the new build, and the 8 that varied across old launches (the prompt "The capital of France is", with each of the 8 adapters) came out as one value in the new build in all 5 launches, one of the values the old build produced. I did not establish why the old build varies more. That shows the new path is within the old one's variation, not that the old one is correct, and a finite set of completions does not establish end-to-end equivalence.
Earlier balanced performance experiments (no flash-attn) EXPLORATORY
The kernel and this benchmark are on mistral.rs master at 21da642, not the study's pinned v0.9.5, and the benchmark builds had no flash-attn. It was measured on a different, busier machine (load average 25 to 250), so the absolute numbers don't compare with anything above. My initial A/B always ran the old build ahead of the others, and its identical-code control cells came out up to 23% apart, so I threw it out and used a balanced design: the old build, the new build and a second copy of the old build, in all 6 orderings, 150 requests per run, 8 uniform adapters, 256 input tokens. Median time per streamed output chunk over the 6 blocks; the change is the median of the per-block changes:
| concurrency | adapters | before | after | change | per-block range | faster in |
|---|---|---|---|---|---|---|
| 8 | 8 | 36.0 ms | 19.8 ms | −45% | −35% to −51% | 6 of 6 |
| 32 | 8 | 52.8 ms | 38.3 ms | −28% | −19% to −51% | 6 of 6 |
| 32 | 4 | 43.5 ms | 36.6 ms | −15% | +27% to −46% | 5 of 6 |
| 32 | 1 (code unchanged) | 36.3 ms | 30.9 ms | −19% | +62% to −44% | 5 of 6 |
| 32 | 0 (code unchanged) | 14.1 ms | 14.8 ms | +2% | −21% to +12% | 3 of 6 |
Read the last two rows before the others: they are the same code in both builds, and they still moved by up to 19% in the median. That is the observed control variability on this machine; I have no formal uncertainty estimate. Those unchanged-code rows are present at concurrency 32 but not at concurrency 8, so the control variability at concurrency 8 is not measured; the 2026-11-29 balanced reruns (section 7.5) added 0- and 1-adapter controls at concurrency 8 (and on 7B at c=8 and c=16).
- At 8 concurrent requests the result is consistent, but its control variability is unmeasured: a median 45% reduction in time per streamed output chunk and 59% more output chunks/s (measured separately by the load generator over the whole run window, which includes prefill, so it is not the inverse of the 45% change), with every block between −35% and −51%. That is well beyond the 19% that unchanged code moved at concurrency 32, but unchanged-code controls at concurrency 8 do not exist, so I can't say how far.
- At 32 concurrent requests it is not established. The new build was faster in all 6 blocks, but the median gain (−28%) is not far from what unchanged code moved by (−19%).
- It does not close the gap. At 32 concurrent requests, 8 adapters are still about 2.6 times slower per streamed chunk than none (38.3 against 14.8 ms, both the new build), and I can't explain the rest. The kernel is still a per-row dot product, without the stacked, tiled weights vLLM's and SGLang's kernels use. I've offered to do that redesign if the maintainer prefers it.
The same-code rows show observed control variability, not a build difference: the byte-identical copy of the old build differed from the old build by nearly as much as the new build did on unchanged code (13.5% against 19% in the balanced benchmark, on the 1-adapter cell).
Earlier incomplete second-host experiment (B2) EXPLORATORY FLAGGED
EXPLORATORY FLAGGED A rerun of the balanced design on a second shared host (B2) ended after 4 of 6 blocks when the host's disk filled, so the pre-registered replication rule was not evaluated. Read descriptively, the four blocks agree: with 8 adapters the new build was 30% faster at concurrency 8 (−31 to −29% per block) and 32% faster at 32 (−35 to −29%), while the byte-identical old copy moved −0.3% and −1.4%, and unchanged code at 1 adapter moved +3% at concurrency 8 (+2 to +6%) and −1.5% at 32 (−16 to +10%). The gain is smaller than the 45% measured on the initial machine, and absolute times were 3 to 4 times higher, so the conditions differed. All 96 runs in the four blocks were flagged for external CPU use above the pre-set limit. Data: followup/kernel_rerun/results/B2_runpod_INCOMPLETE, computed by analyze_b2_partial.py from raw/, blocks 1 to 4 only.
08
Numerical correctness and adapter routing#
Before counting any timing, the plan required checking each engine's output against a PEFT reference. Both checks I fixed in advance failed to tell a correct implementation from a wrong one: a mathematically equivalent implementation (the adapter merged into the base weights) failed them too. So adapter correctness was not certified for any engine in the study. What the data did support: the adapter is applied in all three engines, vLLM and SGLang follow the reference closely at the first token, and mistral.rs's larger deviation is about the same as the difference between running the reference in bf16 and fp32.
Afterwards I found out why. I compared the reference model in bf16 against fp32, reading identical tokens, over 128 positions. For the base model with no adapter, the two differ by 0.0156 nats per token on average, which is normal. With the study's adapters, they differ by 0.97, about 60 times more: the largest differences are tokens fp32 ranks 1st to 3rd, which bf16 ranks between 71st and 41,757th. The adapters push the model into a regime where small precision differences grow through the layers. That is also why their text was incoherent.
A sweep over the adapters' scale found where that starts:
| B scale | bf16 vs fp32 difference (nats per token) |
|---|---|
| Base model, no adapter | 0.0156 |
| 0.01 | 0.0167 |
| 0.02 | 0.0201 |
| 0.05 (the study's adapters) | 0.970 |
| 0.1 | 10.08 |
Between 0.02 and 0.05 the difference jumps about 50-fold. If you build synthetic LoRA adapters for a benchmark, check this before trusting any correctness result.
Eight kinds of evidence, kept apart. The original gate failed and was not retroactively passed.
- The original correctness gate: not certified. It failed, and nothing later changes that.
- The numerical investigation above explains the mechanism of that failure. It does not retroactively pass the gate.
- Adapter-scale calibration (the sweep above) found where the bf16 and fp32 outputs agree, and set the scale for the follow-up.
- The amended routing tests below are narrower evidence about adapter selection, under an amended configuration (scale 0.02).
- The prefix-cache routing tests below are flagged and use a coarser fallback check on vLLM.
- The H100 accuracy screen (section 6.9): GSM8K at TP=1 for stock and patched builds, below. It screens one SGLang change; it does not touch the original gate.
- The earlier RTX 4090 GSM8K screen (section 6.8): 67.5% against 66.3%, same caveats.
- The grouped-kernel validation (unit tests and end-to-end output comparison, section 7) is separate evidence about one implementation and says nothing about the original gate, which failed independently of the kernel's own tests.
What this means for the performance results. The measurements characterize the cost of serving these adapters under the tested workloads. Fixed-shape LoRA arithmetic should not depend on weight values, but weights can still reach the measurements indirectly: through which tokens get generated, whether and when a generation ends, output lengths, and therefore queueing and concurrency. The adapters' unusual numerical behavior limits how far the results generalize to real fine-tuned adapters, particularly where early stopping affects output lengths or concurrency. What stays valid is the measured latency, throughput and slot behavior for the workloads that actually ran.
Output-length controls, as run. The load generator sent ignore_eos to vLLM and SGLang, with 128 output tokens requested. It sent nothing equivalent to mistral.rs, so stopping behavior is not equivalent across engines, and mistral.rs can end a generation at end-of-text. Output volume is counted as streamed non-empty text chunks, not tokens (see the metric table in section 2), so the chunks/s figures are a proxy for tokens per second, and comparing them across engines assumes the engines stream comparable chunks. A request whose first token is end-of-text returns no text and is recorded as an error ("no tokens"): 10 of 9,000 for mistral.rs, all in the adapter workloads. Even with ignore_eos, some vLLM and SGLang requests returned fewer than 128 chunks, and more of them with adapters than without. Share of measured requests with fewer than 128 chunks:
| engine | base model | 1 adapter | 32 adapters, Zipf | 32 adapters, uniform |
|---|---|---|---|---|
vLLM (ignore_eos) | 0.8% | 8.1% | 19.9% | 24.7% |
SGLang (ignore_eos) | 0.3% | 5.2% | 7.1% | 9.6% |
| mistral.rs (no equivalent) | 0.7% | 7.2% | 14.9% | not run |
The stored data cannot separate early stops from tokens that decode to empty text, so I don't know which this is. It means output lengths varied, which bears on queueing and on chunks/s, and that is a limit on how far the throughput numbers generalize. The pass rule uses TTFT, which does not directly depend on a request's own eventual output length. However, shorter generations can free capacity sooner and indirectly change queueing and TTFT for subsequent requests.
Archive: GSM8K screening & post-hoc paired analysis for the original 1.5B SGLang PR (Tables H4–H6) (expand)
GSM8K screening of the SGLang change EXPLORATORY
Table H4. GSM8K, 1,319 problems (the full set), sgl-eval 0.1.3, greedy (--temperature 0 --max-tokens 512 --seed 0), 128 client threads, base model on the LoRA server (as in the 4090 screen), H100 TP=1, one run per build.
| build | accuracy | standard error | stop rate | truncated at 512 tokens |
|---|---|---|---|---|
stock a9a27e9255 | 68.4% | 1.28 points | 97.0% | 3.0% |
patched 9009897b21 | 66.2% | 1.30 points | 97.6% | 2.4% |
The measured difference is 2.2 points (stock higher), 1.2 standard errors of the difference (1.8 points). That is inside the 2-standard-error flag fixed in the plan (2.6 points using one build’s standard error), so the screen was not flagged. The plan’s prediction h4 held. The runs used concurrency 128, below the cap of 256, so the cap should not have been binding; reading the gap as run-to-run variation was my interpretation when the check ran, and the post-hoc paired analysis below does not support it. This is accuracy screening of one build pair on one task. It does not demonstrate accuracy equivalence, statistical non-inferiority, numerical correctness, or the absence of quality regressions, no GSM8K run exists at TP=2 (it was not planned) or TP=4 (dropped), and the adapters are the numerically extreme ones of this section.
Post-hoc paired analysis EXPLORATORY
Post-hoc: not in the plan, not pre-registered. After seeing Table H4 I compared the runs problem by problem (gsm8k_paired.py, output in gsm8k_paired.json): problems matched by id (all 1,319), counting problems correct in one run only, with an exact two-sided McNemar test on those. For the H100 pair, 46 problems were correct only with the stock build and 17 only with the patched build (p = 0.00034).
Table H5. Accuracy of every GSM8K run kept in the repository that is not a withdrawn split-decode variant; 1,319 problems, greedy, one run each.
| run | build | correct | accuracy |
|---|---|---|---|
| H100 tp1_stock | stock a9a27e9255 | 902 | 68.39% |
| 4090 Z1_stock | stock main 0e9cff98f5 | 890 | 67.48% |
| 4090 Z6_cg256b | main with graph range 256 by flag | 877 | 66.49% |
| 4090 Z1_cg256 | main with graph range 256 by flag | 875 | 66.34% |
| 4090 AA0_fix | PR branch 385262cabb | 874 | 66.26% |
| H100 tp1_patched | PR head 9009897b21 | 873 | 66.19% |
Table H6. Paired comparisons (problems correct only in A, only in B; exact McNemar p). 15 pairs were computed; the table shows the stock-against-patched-family pairs and the identical-configuration pair. All 15 are in the JSON.
| A | B | A only | B only | p |
|---|---|---|---|---|
| H100 stock | H100 patched | 46 | 17 | 0.00034 |
| 4090 Z1_stock | 4090 Z1_cg256 | 50 | 35 | 0.13 |
| 4090 Z1_stock | 4090 Z6_cg256b | 46 | 33 | 0.18 |
| 4090 Z1_stock | 4090 AA0_fix | 48 | 32 | 0.093 |
| H100 stock | 4090 Z1_cg256 | 58 | 31 | 0.0055 |
| H100 stock | 4090 Z6_cg256b | 54 | 29 | 0.0080 |
| H100 stock | 4090 AA0_fix | 58 | 30 | 0.0038 |
| 4090 Z1_cg256 | 4090 Z6_cg256b (same configuration) | 34 | 36 | 0.91 |
Both stock runs score above all four patched-family runs (68.4 and 67.5 against 66.2 to 66.5), which I confirmed. Beyond that the evidence is uneven. The paired test on the H100 pair detects a systematic difference that the unpaired standard-error comparison could not (the plan’s flag rule is unchanged and was not triggered). It survives a Bonferroni correction over the 15 pairs computed (0.05/15 = 0.0033); the three H100-stock-against-4090-patched pairs are in the 0.004 to 0.008 range and do not, and the 4090 stock-against-patched pairs (p 0.09 to 0.18) are not significant on their own. The cross-hardware pairs also differ in build and GPU, so the H100 stock-against-patched pair is the clean one. Two runs of the same 4090 configuration disagree on 70 problems (34 and 36), so a run-to-run discordance of that size with no direction is normal here; the H100 pair’s 63 discordant problems are split 46 to 17.
What it does not say. At concurrency 128 the cap of 256 was not binding and both servers stayed in the graph (the sampled server-log decode lines of both GSM8K runs show at most 128 running requests, none without a graph), so the cause is unknown: the PR’s diff, a different build state, or something in the run. A systematic numerics shift is not necessarily a quality regression: 2.2 points on one task, with this study’s numerically extreme adapters unused (the base model was evaluated), says nothing about other tasks or about adapter outputs. The next-experiments list in section 11 includes the repeats and the control that would separate these.
Routing correctness
For multi-LoRA serving the question that matters most is narrower: does each request get the right adapter? I wrote a test for that before running it: for each request, compare the engine's log-probabilities on fixed tokens against the reference for every candidate adapter and the base model, and require the right one to be nearest by a clear margin. It has four power checks, which must pass before any engine is judged. At the study's scale (0.05), two of them failed, so no engine was run. At scales 0.01 and 0.02, all four pass: a correct implementation is routed correctly on 64 of 64 requests, and a swapped or missing adapter is never accepted (0 of 192 and 0 of 64).
Amendment 1: the engine runs use adapter scale 0.02, not 0.01. The protocol says to use the smallest passing scale, which is 0.01. I chose 0.02 instead, before any routing result existed but after seeing vLLM's repeat-to-repeat noise in a smoke test (12 repeated calls differed by 0.015 to 0.021 per call between passes, the size of the stand-in's own noise). At 0.01 the stand-in's smallest margin cleared its threshold by 1.2 times; at 0.02 it clears it by 2.8 times. The rule itself (k = 3, four power checks, 100% to pass) is unchanged. This is a post-registration protocol deviation. The follow-up results provide evidence of correct routing under the amended configuration, but they do not constitute a pass under the original scale-selection rule. These adapters share the study's seeds but not its weights.
Each engine was sent 64 requests (16 prompts by 4 adapters), each scored against 5 candidates, in three passes: serial, mixed-batch with 16 requests in flight, and a repeated serial pass. Stand-in noise is 0.0201 and the margin threshold is 0.0604.
| engine | pass | routed correctly | smallest margin | threshold | median right-adapter distance | stand-in noise |
|---|---|---|---|---|---|---|
| vLLM 0.34.0 | serial | 64 of 64 | 0.1703 | 0.0604 | 0.0193 | 0.0201 |
| vLLM 0.34.0 | mixed, 16 in flight | 64 of 64 | 0.1696 | 0.0604 | 0.0185 | 0.0201 |
| vLLM 0.34.0 | serial repeat | 64 of 64 | 0.1674 | 0.0604 | 0.0181 | 0.0201 |
| SGLang 0.5.23 | serial | 64 of 64 | 0.1682 | 0.0604 | 0.0196 | 0.0201 |
| SGLang 0.5.23 | mixed, 16 in flight | 64 of 64 | 0.1693 | 0.0604 | 0.0197 | 0.0201 |
| SGLang 0.5.23 | serial repeat | 64 of 64 | 0.1682 | 0.0604 | 0.0196 | 0.0201 |
A pass means no misrouting was seen on these 64 requests and this setup. It is not certification, and a finite number of correct requests is not proof of correct routing in general. SGLang was exactly repeatable from run to run, and vLLM varied by about 0.018 between identical repeats (median).
Cache settings. SGLang ran with --disable-radix-cache, so every sequence was recomputed. vLLM ran with prefix caching at its default, which its server log shows as on (enable_prefix_caching=True), but its prompt-logprob calls bypass the cache (see below), so those passes did not exercise it. This result therefore does not cover prefix-cache reuse across adapters; the next subsection is the follow-up that does.
Routing with prefix caching on FLAGGED
The host was not quiet during these passes: external CPU use read 14 to 17 cores, against the plan's limit of 2. Routing correctness does not depend on speed, but the plan's rule applies, so they stay flagged until the SGLang radix-cache passes are repeated in a quiet window (planned, PENDING). The prompts share prefixes across adapters; noise 0.0204, margin threshold 0.0611, and all four power checks passed on them.
- SGLang 0.5.23, radix cache on, 16 in flight: 64 of 64 requests routed correctly in the cold pass (fresh server) and in the warm pass straight after, with smallest margins 0.111 and 0.113. The cache served 95.6% (cold) and 100% (warm) of the shared-prefix tokens. A control on fresh servers showed same-adapter reuse of a 579-token prefix (579 cached) and none across adapters (0 cached on the opening call of the other adapter).
- vLLM 0.34.0, prefix caching on: prompt-logprob calls report 0 cached tokens, so they bypass the cache and the log-probability rule could not be applied with the cache in use. As a fallback I compared 32-token greedy completions of the 64 adapter and prompt pairs. The cache served 96.0% of the shared-prefix tokens in the warm run. The server's cache counters over all its runs, including the cold pass, show 65,280 hits of 74,272 queried tokens (87.9%). A control on fresh servers gave 0, 576, 0 and 576 cached tokens (the same adapter reuses, the other gets 0), so there was no cross-adapter hit, and no misroutes. The check is coarse: two identical cache-off runs agree on just 60.9% of completions, so it would catch a gross adapter swap, not a subtle one.
Neither result is a correctness guarantee for an engine. It is one model, rank 16, four adapters at scale 0.02, and 16 prompts in two prefix groups, with forced-token and 32-token completions rather than long decodes. Raw data and analysis: followup/prefix_routing.
mistral.rs routing follow-up (2026-11-29)
Completed on mistralrs-new (600cdef7, cuda flash-attn) using 4 rank-16 b_std=0.02 adapters whose SHA-256 checksums match sweep_s0.02 bit-for-bit against the same refs_s0.02.json fp32 PEFT reference (noise = 0.0201, threshold = 0.0604). The smoke gate passed (0.78% missing_topn, 0 errors), and serial-repeat self-consistency was 0.0000 across all 19 complete calls (bit-exact deterministic). However, mistral.rs did not pass the 100% routing rule: across 48 complete requests (16/64 incomplete due to 100 text-roundtrip drops across 40,960 positions), 38/48 passed in serial mode and 36/48 in mixed mode (c=16), with median right-adapter distance d_right = 0.3183 (serial) and 0.3386 (mixed) — roughly 16× larger than vLLM and SGLang (0.018–0.019), shrinking margins below 0.0604 on 8–10 requests (2 wrong nearest candidates on adapter_0003). Because B3 parity on the same adapters_002 matched 128/128 bit-exact between old2 and new2 (section 7.5), this numerical offset lives in upstream mistral.rs (21da642f), not PR #2571. Data: mistral_s0.02_20261129/RESULTS.md.
09
Secondary experiments and negative results#
Experiments outside the main line of the study, kept in full. Other negative results are in section 6.7 (SGLang scheduling) and section 7 (the order-confounded first kernel A/B), and in the corrections in section 10.
Did csgmv deliver a 20 to 80% serving-latency improvement here? No.
SGLang's documentation says its csgmv LoRA backend gives 20 to 80% lower latency than its triton backend. My pre-registered bar was at least 20% lower median p95 at concurrency 32 and above, with non-overlapping ranges. The plan did not name which latency, so I report three metrics. Closed loop, 32 Zipf adapters, 16 slots, 3 repeats.
| concurrency | metric | csgmv (min–max) | triton (min–max) | median difference | ranges |
|---|---|---|---|---|---|
| 32 | TTFT p95 (ms) | 333–1,141 | 357–1,176 | -11.2% | overlap |
| 32 | end-to-end p95 (ms) | 1,146–2,100 | 1,189–2,182 | -4.5% | overlap |
| 32 | output chunks/s | 3,471–3,528 | 3,337–3,391 | +4.3% | separate |
| 128 | TTFT p95 (ms) | 5,169–5,187 | 5,401–5,488 | -4.7% | separate |
| 128 | end-to-end p95 (ms) | 9,589–9,663 | 9,935–10,172 | -3.6% | separate |
| 128 | output chunks/s | 2,165–2,501 | 2,080–2,390 | +4.7% | overlap |
What I measured is full-server latency under closed-loop load (TTFT p95, end-to-end p95 and throughput), not kernel time. A kernel-level speedup and a serving-latency improvement are different measurements, and I don't know which measurement boundary the documentation's figure uses.
For reference, the benchmark behind the documented 20 to 80% (SGLang PR #10286) next to mine:
| condition | PR #10286 | this study |
|---|---|---|
| Model | Llama-3.1-8B-Instruct | Qwen2.5-1.5B-Instruct |
| Adapters | 1 | 32 synthetic, Zipf popularity, 16 slots |
| Dataset | ShareGPT | synthetic, 256 input and 128 output tokens |
| Load | open loop, request rates 2, 8, 16 and unlimited | closed loop, concurrency 8, 32 and 128 |
| Radix cache | off | on |
| Metric | median end-to-end latency, 9%, 40%, 70% and 81% lower | p95 TTFT, end-to-end and TPOT; end-to-end p95 3.6% to 4.5% lower at concurrency 32 and 128 |
The comparison is not like for like, so "not held on this setup" says nothing about the docs' own conditions. A commenter on SGLang discussion #52614 suggested some of these differences as the reason. I varied none of them one at a time. A one-condition-at-a-time A/B is planned. PENDING
Not held at the pre-registered 20% threshold, on this model and this GPU. None of the three metrics reached it. This does not show that csgmv is slower or defective, and it does not rule out larger gains for other models, workloads or measurement boundaries. The median (not p95) TTFT at concurrency 128 was 16.9% lower, which is under 20% and is not the metric the bar named.
10
Substantive research corrections and withdrawn findings#
Key scientific corrections that changed conclusions or upstream code. Operational housekeeping logs (timeouts, fd limits, timestamp fixes, and volume reruns) are preserved in full in the changelog and summarized in the collapsible block below.
- 2026-11-29 — Unconditional
max_running_requestscap regressed 7B base saturation (−11.6%). Testing PR #53433 on Qwen2.5-7B-Instruct revealed that while raising the 20–35 GiB decode graph ceiling (48 → 128) is strictly Pareto-improving, unconditionally cappingmax_running_requestsat 128 hurt saturated Base-7B throughput (3,345 → 2,957 tok/s) and TTFT. I dropped the unconditional cap from PR #53433 (section 6.6). - 2026-11-26 — Split-decode timing withdrawn after GSM8K failure. An early split-decode variant improved step time but failed GSM8K at 6.75% vs 67.5% due to batch-slice races; all split-decode timing was withdrawn and the approach abandoned (section 6.7).
- Original correctness gate & synthetic adapter scale. Both pre-registered correctness checks lacked power because
b_std=0.05adapters pushed bf16/fp32 divergence 60× above normal; calibration atb_std=0.02resolved this for follow-ups (section 8). - Order-confounded first mistral.rs A/B. The initial kernel benchmark ran old ahead of new and showed up to 23% control drift; discarded and replaced with a 6-ordering balanced design (sections 7.6 & 7.8).
- Early SGLang attribution & prior art. I initially compared SGLang and vLLM without noticing SGLang’s default 48 decode-graph cap, misattributed the cliff purely to slots, and missed prior issue #33483 until after diagnosing the mechanism. On 2026-11-27 I also corrected my description of SGLang’s 4,096 running limit (a clamp ceiling, not raw KV capacity) and reframed the H100 40 rps numbers as a no-regression screen.
- Working-set window & mistral.rs empty completions. Offline analysis overturned my initial claim about 1–10 s windows (instantaneous in-flight count tracked the cliff instead), and probing showed mistral.rs empty completions came from EOS as the top token under
b_std=0.05(fixed inloadgen_v2.pyviaignore_eos: true).
Operational & recordkeeping log (expand; full record in CHANGELOG.md)
- 2026-11-27: initial H100 TP=1 saturating runs hit a 1,024 client open-file limit (kept as
invalid_fdlimit_*; rerun with raisedulimit -n). - Retracted an early mistral.rs diagnostic that accidentally ran base instead of 8 adapters; withdrew an 8-concurrency "capacity estimate"; reran the prefix-routing control on fresh servers; increased a 10-minute startup timeout to 30 minutes for slot-memory checks; reran an initial SGLang session after a cautious drift check; reran the initial vLLM grid after a network-volume reset; restored changelog entries dropped during a cross-machine rebase (now guarded by
scripts/check_record_deletions.sh); and documented UTC header timestamp offsets inCHANGELOG.md.
11
Operational recommendations and upstream work#
Limitations and threats to validity
Broader hardware coverage does not establish broader model or workload generalizability. By scope:
- Original pre-registered study. One RTX 4090, one 1.5B model, synthetic adapters whose numerics failed the correctness gate, 3 repeats, chunk counts as a proxy for tokens, and varied output lengths despite
ignore_eos(section 8). - SGLang follow-ups on the 4090. Rented shared pods, FLAGGED screening runs, 2 to 3 starts per cell, 550-request bursts, a trigger (CPU contention) shown but not the only one, and the two mitigation components never tested separately on that hardware.
- H100 check. One 1.5B model; single saturating runs, so no spread and no way to rule out start-to-start variation of the size seen in the 4090 starts; 3 starts for latency, none of which reached the cap; TP=1 and TP=2 only (TP=4 dropped, so the 512-range tier and the 160-range branch are untested); no no-LoRA saturating run; one graph range (256) in both builds, so graph coverage and batch size are not separated; GSM8K at TP=1 only; a rented pod whose host exclusivity is not established (load average 3 to 28 at starts, CPU quota 88.4); and metrics counted in chunks, not tokens.
- 2026-11-29 7B & verified-token follow-ups. Ran on a shared RTX 4090 pod; the SGLang 7B 3-way ablation used single server starts per configuration, and 1.5B mistral.rs c=32 controls remained noisy (while 1.5B c=8 and 7B c=8/c=16 controls were tight).
- Not tested yet. Models above 7B (14B–70B class), 7B+ on H100, long contexts and long outputs, sustained multi-hour operation, mixed interactive and background traffic, other GPU architectures, and power/energy per token.
- Process. No independent replication yet. PR #53433 (narrowed to 2 files on 2026-11-29 with the 7B ablation posted) and PR #2571 are open and awaiting maintainer review.
What was measured, what it suggests, what to check
- Adapter-slot pressure (measured, one GPU and one model). Distinct adapters with requests in flight tracked the latency cliff, but slow service inflates that count, so treat it as a warning signal, not a universal sizing formula. Watch it together with p95 TTFT and look for a jump, not a gradual slope. Adapter popularity, reuse and queuing change what the count means, so validate your slot count against your own workload.
- Slots cost KV capacity (exploratory). Going from 16 to 64 slots reduced reported KV-cache capacity by about 11% on both vLLM and SGLang (1.5B model, rank 16, one start per configuration). That is not a universal per-slot cost; weigh the capacity against the latency the slots buy back.
- SGLang: widen 20–35 GiB decode graph coverage; treat admission capping as workload-dependent. Check the
CUDA graph end. bs=[...]line in your server log. On 20–35 GiB GPUs, raising--cuda-graph-max-bs-decodefrom 48 to 128 is essentially free (+0.14 GB, zero KV-cache loss on 7B BF16) and eliminates the 49–128 eager-execution cliff (61× lower p95 TTFT on Base 7B at 20 rps). By contrast, capping--max-running-requeststrades admitted concurrency for graph replay: it helped saturated 1.5B on H100 (+25–29% chunks/s, at higher median TTFT) and 7B+LoRA (+5.4% overcg128_only), but regressed saturated Base 7B by −11.6% (section 6.6). PR #53433 therefore raises only the default decode graph ceiling (48 → 128) and leaves admission capping opt-in. - Treat slot count and graph range as two separate checks that interact. Here, slot pressure created the waits and decode outside the graphs amplified them.
- mistral.rs. Per-adapter CUDA launches drive multi-adapter decode scaling in v0.9.5 / master. Grouped-launch PR #2571 eliminates ~90–96% of the 1→8 adapter penalty on both 1.5B and 7B BF16 with 128/128 bit-exact parity (section 7.5).
- Synthetic adapters. Check their numerical behavior against a higher-precision reference before trusting any correctness result.
- Validation. These findings should be independently validated on the intended deployment configuration.
Next experiments
Not yet done. Each would resolve a specific uncertainty:
- Repeat H100 saturation across independent server starts. Gives the spread the single runs lack, and whether the 25 to 29% gain exceeds start-to-start variation.
- GSM8K repeated three times per build on the H100, plus stock with
--max-running-requests 256set explicitly. Shows whether the paired 46 to 17 difference repeats, and whether the cap alone (rather than other differences in the PR’s build) explains it. - An open-loop H100 rate ladder between 40 requests/s and saturation (for example 80, 100, 120 and 140), 3 starts per build. Closed-loop TTFT is not user latency; this shows what the cap does to latency at offered rates that reach it.
- H100 saturated workloads without LoRA adapters. RTX 4090 7B base-model saturation (section 6.6) showed unconditional capping regresses base 7B by −11.6%; an H100 no-LoRA check would test whether the same crossover holds on 80 GB GPUs.
- Separate graph coverage from batch size. Stock with the graph range raised past its batches, and patched with a cap above 256 and a matching range.
- Sweep concurrency around the graph boundary (for example 192, 256, 320, 512): locates where the benefit and the TTFT cost begin.
- Measure admission queue depth and residence time directly with scheduler instrumentation, replacing the interpretation of the TTFT rise.
- Models above 7B (14B–70B class) and 7B+ on H100: Qwen2.5-7B on RTX 4090 is now complete for both SGLang (6.6) and mistral.rs (7.5); 14B+ and H100 multi-LoRA remain open.
- Long-context and long-output workloads, and sustained mixed interactive and background traffic: tests whether a tighter tail and higher median TTFT help or hurt a realistic mix.
- GPU power and energy per generated token. Throughput per watt is not implied by throughput.
- Additional tensor-parallel configurations, including the dropped TP=4: whether the 512 and 160 range tiers behave the same.
- Dedicated hardware and other GPU architectures, ideally replicated by someone else: separates host effects from the change.
Upstream
Upstream status, checked on GitHub on 2026-11-29:
- mistral.rs #2567: the completions logprobs layout differs from the OpenAI format (and from itself, within one response). Draft fix in open PR #2570.
- mistral.rs #2569: per-adapter CUDA kernel launches drive multi-adapter decode scaling. Fix in open PR #2571 (81/81 GPU LoRA tests pass; 128/128 bit-exact parity; 1.5B and 7B verified-token balanced reruns posted).
- SGLang #53431: decode batches above the largest captured CUDA graph run eagerly and stay degraded during bursts (prior art: #33483). Open PR #53433 (narrowed on 2026-11-29 to 2 files, +20/−2, with unit tests): raises the default decode CUDA graph ceiling from 48 to 128 for 20–35 GiB GPUs (tp < 4), dropping the unconditional
max_running_requestscap after the 7B 3-way ablation (section 6.6).
Searching beforehand saved me from two duplicate reports on the mistral.rs side; I did not search before diagnosing the SGLang mechanism (section 10). If these merge I'll update this section.
12
Reproducibility, source code, and raw data#
Everything is in the research repository. Historical records are kept as they were.
- Original pre-registered plan
- Changelog, including amendments and corrections
- SGLang cliff investigation: plan
- SGLang cliff investigation: results
- SGLang source reading and commits
- H100 check: pre-registered plan (amendment); H100 data, scripts and logs (raw results, run_h100.sh, setup.sh, summ.py, env.json, dependency freeze files, run.log)
- H100 figures: generation script, figure data and SVGs
- Kernel rerun: plan
- Dedicated-session plan (includes the shared-host amendment)
- Working-set analysis
- Raw data (original grid)
- Raw data: SGLang cliff investigation
- Raw data: first kernel benchmarks
- Raw data: slot-memory startup readings
- Load generator and run scripts
- Analysis scripts
- Configurations
- Grouped-kernel build records
- End-to-end completion comparisons
- Routing follow-up
- Prefix-cache routing follow-up (flagged)
- Incomplete second-host kernel rerun (flagged)
- Upgraded load generator (
loadgen_v2.py:ignore_eos+ verified tokenizer token counts) - 2026-11-29 SGLang 7B 3-way ablation (RTX 4090)
- 2026-11-29 mistral.rs 1.5B 6-block verified-token rerun & B3 128/128 parity
- 2026-11-29 mistral.rs 7B 3-block verified-token rerun
- 2026-11-29 mistral.rs routing follow-up
- SGLang issue and PR drafts as posted
- Upstream: SGLang #52709 (merged, related), SGLang #53431, SGLang #53433, SGLang #33483 (prior art), mistral.rs #2569, mistral.rs #2571, mistral.rs #2567, mistral.rs #2570 (draft).
Reproducing the 7B / 1.5B verified-token runs and archived H100 check
The primary 2026-11-29 Qwen2.5-7B SGLang 3-way ablation and mistral.rs 1.5B/7B balanced reruns use scripts/loadgen_v2.py (with ignore_eos=true and tokenizer-verified token counts) under followup/sglang_cliff/rtx4090_7b_20261129 and followup/kernel_rerun/results/rtx4090_*_20261129. Commands for the archived 1.5B H100 check (section 6 archive):
# per server start (run_h100.sh start_sglang), N = 1 or 2, build = stock | patched
CUDA_VISIBLE_DEVICES=<gpus> python -m sglang.launch_server --model-path Qwen2.5-1.5B-Instruct --served-model-name qwen \
--port 30000 --tp N --mem-fraction-static 0.85 --context-length 4096 --enable-lora --max-lora-rank 16 \
--max-loras-per-batch 16 --lora-target-modules q_proj k_proj v_proj o_proj gate_proj up_proj down_proj \
--lora-paths adapter_0000=... adapter_0031=...
# warm-up: two 300-request passes (seeds 998, 997) at 40 rps, then
loadgen.py --engine sglang --rate 20|40 --requests 500 --warmup 50 --adapters 32 --popularity zipf --seed 1
loadgen.py --engine sglang --concurrency 1024 --requests 3000 --warmup 300 --adapters 32 --popularity zipf --seed 1
# summary: python3 followup/sglang_cliff/h100/harness/summ.py 1 (and 2)
# figures: python3 followup/sglang_cliff/h100/analysis/make_figures.py
Hardware inventory, driver and CUDA versions: env.json. Package versions per environment: the freeze files. Adapter seeds 0 to 31 with a SHA-256 manifest check before every run; request seed 1; GSM8K seed 0. Units: output_tokens_per_s and tpot_ms in the raw files are chunks/s and ms per streamed chunk (section 2). One discrepancy in the record: env.json reports the pod’s system Python (torch 2.8.0), while the SGLang environments that ran the servers used torch 2.14.1 (freeze files). Files named invalid_fdlimit_* and aborted_networkfs_* are failed attempts kept on purpose.
Revision history
- 2026-11-29 (second update). Promoted the 7B SGLang 3-way ablation (section 6.6, with Figure S1) and 1.5B/7B verified-token mistral.rs reruns (section 7.5, with Figure M1) ahead of superseded early runs; tucked superseded 1.5B experiments, the dropped-cap H100 archive, and post-hoc GSM8K tables into collapsible
<details>blocks (zero data removed); resolved stale single-model/untested cross-references. - 2026-11-30. Added default-flags RTX 4090 verification for SGLang PR #53433 (
Qwen/Qwen2.5-7B-InstructBF16, no--mem-fraction-static/--context-lengthoverrides):mem_fraction_static0.704 → 0.697(~160 MB reserved),max_total_num_tokens35,999 → 32,976(−8.4%, full 32,768 context intact); at 20 rps, P95 TTFT119.3 → 88.9 ms(−25.5%) and P95 TPOT40.2 → 34.2 ms(−14.8%); at c=192, median TPOT45.8 → 42.3 ms(−7.7%) and P95 E2E −0.6% with −4.2% tok/s trade-off under saturation (rtx4090_7b_default_flags). - 2026-11-29. Added Qwen2.5-7B-Instruct BF16 experiments with tokenizer-verified tokens (
scripts/loadgen_v2.py): SGLang 3-way ablation showing raising 48 → 128 alone is Pareto-improving (61× Base-7B p95 TTFT drop, zero KV loss) while unconditionally cappingmax_running_requestsregressed Base-7B saturation (−11.6%), leading PR #53433 to be narrowed to 2 files (section 6.10); mistral.rs #2571 cleancuda flash-attnbalanced reruns on 1.5B (6 blocks, −33.5% TPOT, 1.41× tok/s) and 7B (3 blocks, −16.2% to −19.5% TPOT, 1.46× tok/s) plus 128/128 bit-exact B3 parity (section 7.8); completed mistral.rs Section 8 routing follow-up (deterministic, 38/48 serial / 36/48 mixed, upstream21da642foffset); consolidated operational housekeeping logs in section 10 under a collapsible summary. - 2026-11-27. Added section 6.9 (H100 TP=1 and TP=2 check of the running-limit default: design, decision rule, results, saturation trade-off, vLLM reference, dropped TP=4, what the evidence supports) and Figures A to D with their generation script; added the H100 GSM8K screen to section 8; added the limitations and next-experiments subsections to section 11; updated the summary, scope statements (one GPU class to RTX 4090 plus H100 check), upstream status date, the reproducibility list and the corrections list. Earlier measurements and wording of history were not changed. Renumbered 6.9 and 6.10 to 6.10 and 6.11.
- 2026-11-27 (second update). Added a post-hoc paired GSM8K analysis (section 8, Tables H5 and H6) and softened the earlier noise reading; corrected the description of the default running limit (computed from KV capacity, clamped to 2,048 to 4,096; section 6.2 and section 10); shortened the executive summary and moved the detailed findings into a collapsible block; added an H100 comparison sentence to section 4; added two experiments to section 11; trimmed section 6.9 (design table and deviations moved to DESIGN.md and DEVIATIONS.md in the repository). No measurement changed.
- 2026-11-26. Restructured into 12 sections; added the SGLang root cause, issue #53431 and PR #53433, metric definitions and corrections groups.
- 2026-11-23 to 2026-11-25. Initial publication and incremental updates, listed in the site repository history; the study’s own history is in the changelog.