Upstream contributions to vLLM: running log #1
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Running log of everything we send back to vllm-project/vllm from the Turing work (research and plan in
~/repos/vLLM:turing-research.md,plan.md,contributing.md,drafts/). One entry per item; move items between sections as they progress. Nothing is posted or pushed without the owner's say-so.Posted
2026-11-03: validation comment on PR #55380 (FlashInfer on SM75)
PR #55380, "[Turing] Restore flashinfer support for SM75" (ir1ka). Our comment, as posted:
Status: waiting on a maintainer to trigger CI. We are not asking on Slack. Production keeps the one-line sed until it merges.
Deferred (owner to verify, then post)
Comment on PR #54146 (fp16 GDN readout overflow)
PR #54146 (JackDanger; 15-line kernel change + a test;
needs-rebasesince September).~/repos/vLLM/vllm(branchturing/gdn-fp16-readout= main + the PR's commit): every caller offused_sigmoid_gating_delta_rule_updateinvllm/model_executor/layers/mamba/gdn/qwen_gdn_linear_attn.pycopies the fp32 readout intocore_attn_out, which is allocated withdtype=hidden_states.dtype(fp16) at lines ~1266, 1333, 1371, 1434, 1495; the copy-back is around lines 2095-2110.~/repos/vLLM/drafts/pr-54146-comment.md). Cut the "happy to carry the rebase" sentence unless that work is wanted.Evidence (2026-11-03): cherry-pick onto main
81f1baa731is clean, pre-commit passes; in the v0.33.0 image on Turing the PR's test gives 1 failed / 18 passed with the stock kernel and 19 passed with the patch. The kernel change is right; it never reaches the output on current main.Draft comment
Draft comment for vllm-project/vllm PR #54146 (not posted)
Rebased this onto today's main (
81f1baa731) to test it on Turing, the oneplatform that has to run fp16. The cherry-pick applies cleanly and pre-commit
passes, but on current main the change no longer reaches the model output:
fused_sigmoid_gating_delta_rule_updatenow materialisesoin fp32 whenthe SSM state is fp32 (this PR), but every caller in
vllm/model_executor/layers/mamba/gdn/qwen_gdn_linear_attn.pycopies theresult into a pre-allocated
core_attn_outbuffer:core_attn_out[:num_actual_tokens] = core_attn_out_decode.squeeze(0)and theindex_copy_variants around lines 2095-2110.dtype=hidden_states.dtype(lines 1266, 1333,1371, 1434, 1495), so the fp32 readout is cast to fp16 one line later and
overflows there instead.
So the fix needs to follow the readout one step further. Two options:
core_attn_outin the state dtype when the SSM state is fp32 andcast after
self.norm(core_attn_out, z)(RMSNormGated already computes infp32 and returns
orig_dtype, so it only needs the output cast to theactivation dtype before
out_proj). The prefill chunk kernels and theFlashInfer/CuteDSL GDN backends also write into this buffer, so they must
accept an fp32 output.
RMSNorm is scale-invariant apart from epsilon, so dividing
oby aconstant before the cast would preserve the result, but it changes the
epsilon behaviour and hides the problem rather than fixing it.
The test file applies as-is and behaves as intended on Turing: in the
v0.33.0 image on 4x Quadro RTX 5000,
test_fused_sigmoid_gating_delta_rule.pygives 1 failed / 18 passed with the stock kernel
(
test_fused_sigmoid_gating_readout_finite_under_large_fp32_stateis thefailure) and 19 passed with this PR's kernel. So the kernel change is right;
it just needs to be carried through the caller.
I can test either option on this hardware (SM75, fp16 only); happy to carry
the rebase if it helps.
Candidates (need data first)
Parked
turing/marlin-sm75-fp32-accum, CMake option, 36 lines, signed). Measured 2026-11-03: ~8% slower prefill, KLD drift ~0.009 at depth in no proven direction. Not proposed until a bf16 or CPU reference shows a fidelity gain.Upstream: comment on vLLM PR #54146 (fp16 GDN readout overflow) once verifiedto Upstream contributions to vLLM: running log2026-11-03 phase 2, E1 (evidence for the two candidate issues). Temperature-0 6x5 multimodal soak (six interleaved sessions, five turns, screenshot in turn 1, tools), run twice per arm (cache miss, then cache hit), base vs MTP k=4 on vLLM v0.33.0, FULL_AND_PIECEWISE graphs, prefix caching on, Qwen3.8-27B W8A16, 4x Quadro RTX 5000 TP4.
A "cannot reproduce on SM75 with this config" comment on #61233 is now supportable; owner decides.
2026-11-03 phase 2, E2 (Marlin fp32 accumulation, closes the parked item for now). MTP k=4 on the fp32-accumulate Marlin build vs plain k=4, same flags: 76.1 vs 75.2 t/s at 20k, 195 vs 202 on six streams, code 130 vs 130, cold prefill 10.9 vs 10.1 s (the ~8 % cost again), acceptance unchanged. Greedy outputs: code and tool calls identical; prose differs from plain k=4 by as much as k=4 differs from the base. fp32 accumulation does not reduce near-tie flips, which are fp16 inference's own run-to-run variance (the base engine shows the same rate against itself under concurrency). No PR; branch
turing/marlin-sm75-fp32-accumstays local. Would need a bf16 or CPU reference showing a fidelity gain to revive.2026-11-04 round-two research: new upstream evidence candidates (report:
~/repos/vLLM/reports/Turing vLLM round two experiments.md).max_cudagraph_capture_sizeis set explicitly, vLLM 0.33 keeps the grid[1,2,4,8,16,24,32,...]and rounds each size to a multiple of (k+1) query tokens, which silently leaves some request counts without a FULL decode graph. On trogdor (--max-num-seqs 6, k=4): FULL graphs for 1/2/4/5 requests, none for 6 (boot log: "Capturing CUDA graphs (FULL): 4"), so six-stream decode ran PIECEWISE. A ~20-line fix (append n x (k+1) sizes up to the explicit max) or a startup warning, with the boot log as reproducer. Measure first (plan.md A1), then file.--prefix-match-unit 16on 0.33.0 (which already has #61589); numbers for those threads after A3 runs with--enable-mamba-shared-prefix-checkpoint.--linear-backend hummingvs Marlin on W8A16 once B3 runs.Production deployment record: cmoriarty/qwen38-vllm-flashinfer commits
829b052,7448da6,0fc7eef(vLLM 0.33.0 + MTP k=4; pin 4.50 GiB, window 258048, chunk 4096 after the first boot's soak OOM at 8192; check set PASS on a fresh-compile boot).2026-11-05: new candidates and evidence from windows A to D. Nothing here has gone to vLLM; the owner decides what does. Full history and context: EXPERIMENTS.md.
New candidates
draft_sample_methoddefaults togreedy, so a client that samples loses many accepted drafts, and temperature 0 benchmarks don't show it. On this rig at temperature 1.0, on one test: reasoning 58.0 to 71.0 t/s (+22 %), prose 67.0 to 73.9 (+10 %), six streams 192.1 to 217.4 (+13 %), with step time unchanged. Output matches MTP off on 4 short prompts, 1,500 samples each, first 8 tokens, thinking off: 0 of 32 positions above the noise band. Peak memory +20 MiB, though the docstring warns of a memory cost. Check for existing upstream discussion first.--override-generation-configforces a recompile (one-line PR). It is not inModelConfig.compute_hash's ignored list, though that hash is meant to cover what affects the compute graph. Adding only that flag took boot from 121 s to 575 s, and the fresh compile holds about 0.85 GiB more until restart. The fix itself is not tested.vllm bench forwardcrash (bug report). With a drafter on FlashInfer it fails in graph capture, "Cannot copy between CPU and CUDA tensors during CUDA graph capture" atseq_lens.cpu(), then torchrun hangs. Seen only on our gate-patched image.New evidence for existing threads
--enable-mamba-shared-prefix-checkpointread 79.6 % against 76.3 %, and 79.6 % is also the cold-run rate.Downgraded
Conditional
mtp/a4500-finetune, not pushed. Our memory numbers could support speculators PR #1226. Wait for the pilot.