MUSA: re-land the DiffusionGemma /v1/systemone enablement on v0.32 (supersedes #249, #259) #301
All Vouch review confidence checks passed
Residual risk 0.30 = Change Risk (0.57) × (1 − Review Confidence (0.47)).
Review depth and reviewer attention state are adequate.
Model 1 · Change Risk (XGBoost)
Score: 0.57 · 650 lines diff across 8 files
Model 2 · Review Depth (DistilBERT)
Depth Score: 0.02 · 1 substantive comment(s)
Model 3 · Review Timing & Attention
Session adequacy: 100% · Reviewer familiarity: 35%
Bedrock Claude 3 · Risk Narration
(disconnected)
Groq Risk Narration
AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
Model 1 · Change Risk Attribution
SHAP Weights
Diff Size
diff_size
0.388
Shallow Review Depth
shallow_review_depth
0.344
Ai Authored
ai_authored
0.050
Real PR Conversation Timeline
1 comments
"Review active on #301"
general
weight: 0.35
yeahdongcn
Supersedes #249 (the v0.28 port of upstream vLLM #57250) and #259 (the v0.28 docs). Both are
closed: the port itself is no longer needed, because vLLM v0.32 already carries the feature.
Why this is much smaller than #249
v0.32.0-devpinsVLLM_COMMIT=5df63a7203(v0.32.0), and that tree already containsvllm-project/vllm#57250 (merged 2026-09-22 as
1b3b88ec2b74):/v1/systemoneis a native endpoint (vllm/entrypoints/generate/structured_decisions/), withDiffusionGemmaCanvasStrategy/JointSchemaStrategy/NextTokenStrategy;vllm/utils/diffusion.py,vllm/v1/core/sched/diffusion_scheduler.py,vllm/model_executor/models/diffusion_gemma.py);examples/features/structured_diffusion/structured_server.py.The two MUSA fixes that landed on v0.28 through #254 are already on this line too:
vllm_musa/platform.py::force_triton_attn_for_diffusion()(wired incheck_and_update_config,so a diffusion model gets
TRITON_ATTNinstead of a MUSA FlashAttention path that cannot express aper-request tensor
causal), and thekernel_unified_attentionPEP-604 annotation repair insideseries entry
0001.So this PR carries only what is genuinely missing on MUSA.
What is in here
| # | Change | Why |
|---|---|---|
|
016665e01b|vllm_musa/optimization_contract/resolver.py: read per-layer config attributes throughconfig_attr, and report an ambiguous one as missing | This one is a startup blocker. transformers 5.x keeps per-layer attributes (head counts and dims of a sliding/full hybrid) behind an interception that raisesAmbiguousGlobalPerLayerAttributeError, aRuntimeError;getattr's default only coversAttributeError, so the resolver aborted engine creation for DiffusionGemma ('num_key_value_heads' is a per-layer attribute) before it could fail closed toUNKNOWN. ARuntimeErrorof any other type still propagates. Regression test:tests/test_optimization_contract_per_layer_config.pyfails on the previous resolver with exactly that error and passes now. ||
32aa414453| Series entry0055: the DiffusionGemma read tests gate oncurrent_platform.is_cuda_alike()and take the device fromcurrent_platform.device_type| The suite gated onis_cuda()and hardcodeddevice="cuda", so a MUSA run skipped the whole per-request canvas/pin/read-only state machine. MUSA reports itselfis_cuda_alike()while keepingis_cuda()false. 21 cases now run. ||
f2d91b033e| Cookbook recipe + index, README/README_CN rows |/v1/systemoneis an engine endpoint on this line, so the recipe drops the port-18011 interposer and the layered:jevimage; it documents--logprobs-mode raw_logprobsand the MUSATRITON_ATTNpin. |Series README updated to 55 patches;
tools/musa_sync.py verifyandcheck-seriesare clean.Review rounds 1-3 are folded in on top:
eba4405119,6af327e71c,f2d91b033e,ab385652b3,f6c1a95611,48c8c01179,2cc3f3db91,e6a89e190f,725886554f,64b7f1071b,63cba40e2b,5447c1ab72,1fc8fedbbd,79d1bdebf3,b4279845b2. No review cycle hasreported a blocking finding since round 2.
Evidence (one leased S5000, development pool)
Environment: host
10.20.34.82, GPU 7 (e83180e0-…), driver5.2.0-server, MUSA 5.2.0,image
sh-harbor.mthreads.com/mcctest/vllm:v0.32.0-ph1-5.2.0-torch2.11.0.post2-20261022(digest
sha256:aba800a8…),torch/torch_musa2.11.0.post2+musa5.2.0,triton3.2.0,vllm0.32.0,vllm_musa0.1.32.| Check | Result |
|---|---|
|
tests/v1/sample/test_diffusion_gemma_reads.pybefore entry 0055 |21 skipped|| same suite, entry 0055 applied |
21 passed(33.4 s) ||
tests/test_optimization_contract_per_layer_config.pyon the previous resolver | 1 failed —AmbiguousGlobalPerLayerAttributeError: 'num_attention_heads' is a per-layer attribute|| same test, this PR |
3 passed(parametrized over the pinned error class and a subclass) ||
tools/musa_sync.py check-series/verify --repo <pristine pin>|55/55 clean,58 clean / 93 total / 0 need attention||
tests/test_musa_sync.py(local) |104 passed|| 26B BF16 end to end:
vllm serve /models/diffusiongemma-26B-A4B-it --logprobs-mode raw_logprobs --max-logprobs 32| ready in ~6 min; weights 48.53 GiB; 11.46 GiB KV;TRITON_ATTNselected automatically ||
POST /v1/systemone—noul+choice+scorein one request | 200, three identical reads at 0.17 s warm:noul 0.974,choice platform 1.000,score 2.98(critical);diagnostics.argmax_is_labeltrue,label_mass0.998–1.000; 242 in / 6 out tokens ||
POST /v1/chat/completions|thought\nYes, the sky is blue during a clear day.|Logs and the full response JSON are in the MUSA-100086 ticket under
generated/MUSA-100086/logs/.Re-validation at the PR head
Re-run on the head revision (one leased S5000, GPU 0
cc3be90f-…, same host and driver), with theimage's baked tree overlaid by this branch's
vllm_musa/optimization_contract/, series entry0055and the regression test, so the code under test is exactly this PR:
| Check | Result |
|---|---|
|
tests/v1/sample/test_diffusion_gemma_reads.py|21 passed(68.7 s) ||
tests/test_optimization_contract_per_layer_config.py|3 passed(4.9 s) || the same two files with the image's own
resolver.pyrestored | fails at import —policy.pyasks forconfig_attr, which the previous resolver does not export, so the two halves only work together ||
vllm serve /models/diffusiongemma-26B-A4B-it …(the recipe's line, no--diffusion-config) | ready in ~6 min, 11.46 GiB KV (54,235 tokens),TRITON_ATTN||
POST /v1/systemone| 200; three reads returned the same answers, usage (242 in / 6 out) and diagnostics:noul 0.9742,choice platform 0.99982,score 2.9792,label_mass0.99832 / 0.99995 / 0.99970 ||
POST /v1/chat/completions|thought\nYes, the sky is blue during a clear day.|| the recipe's
docker runblock, run as written | healthy in ~6.5 min,/dev/shm1.0 GiB, and a read inside that container returnednoul 0.97416/choice platform/score 2.97922|This run also found a documentation defect: the recipe put
vllm serveafter the image, but therelease target's entrypoint already is
vllm serve(docker/musa.Dockerfile:469,docker/README.md:23), so the container died onunrecognized arguments.b4279845b2drops theprefix, matching the Docker guide's own example. The block also needs neither
--ipc=hostnor--shm-size: themthreadsruntime gives the container 1.0 GiB of/dev/shm, which is what the run above measured.Not covered
--enforce-eager: the validated run is the default compiled path (Dynamo 79 s, 52 graph captures).The v0.28 line needed Dynamo to insert a dtype cast on
sc_embeds[decode_slots]; upstream v0.32carries that cast explicitly (57462), so eager may well work now, but it was not measured.
tests/v1/core/test_scheduler.py -kdiffusion,
tests/entrypoints/generate/structured_decisions/) fail in the offline container atModelConfig(model="facebook/opt-125m")/Qwen/Qwen3-0.6B— an environment limit, not a MUSAresult. The read suite above is the one that exercises the read state machine directly.
vllm-openai:jevtag from the previousrecipe. The tag currently carries the v0.28 port, so it has to be rebuilt from this branch after
merge; the dated daily builds carry a
vllm_musawithout the per-layer config fix the recipe needs.