Repository navigation
Conversation
Qwen3moeBody's leg_arms and routed_rule are Qwen35Body's prompt_leg pair, so a Qwen3-30B file with Q8_0, Q6_K or IQ4_XS experts places card experts on common layers. placed.rs owns card_leg, common_forms and stack_ty for both bodies; placed_bytes and placed_scratch take the forms, and Placed::within refuses a load holding more card bytes than its plan counted. gate_qwen3moe_e2e's clause (z) runs a Q8_0 file's common layers against its whole-host run. Co-Authored-By: Claude Opus 5.5 <[email protected]>
There was a problem hiding this comment.
Verdict: MUST_FIX: the shared budget search duplicates the search still used by the Qwen3.6 gate.
Must fix
1. Use the shared budget search in both gates
shared/qwen3moe_place.rs:419 copies the bisection and budget-floor error handling in gate_qwen35moe_e2e.rs:3516. This is a kind B duplicate under R14. Removing the local copy prevents later planner changes from requiring two edits.
Delete the local budget_for_card_experts definition and its doc block. Retarget the doc link at line 3632 to PlaceQ3::budget_for_card_experts. Replace the call at line 3687 with:
let budget = q.budget_for_card_experts(CTX, want, top)?;Replace the closure at line 3995 with:
|q| q.budget_for_card_experts(CTX, 0, placed_budget()),Both gates then use the shared owner, with fewer definitions and lines.
Non-blocking
⚠ Complete the GPU and timing evidence: docs/cards/q30leg-decode.card:30 requires quiet rows and reruns of busy rows. The card models moving 28.4%/37.5% of Q8_0/Q6_K experts off the host, but the PR supplies busy Q8_0 timing and gate summaries. Supply quiet decode and prefill A/B output for both files, owning gate commands with output, the card/driver line and both commit hashes.
Checked
- Duplication: both budget searches read and confirmed equivalent apart from parameters and diagnostic wording. Dryer reported no pairs and excluded GPU/gate crates.
- Complexity: diagnostics flag
z_load,common_leg_file,run,Body::loadandBody35::build; complexity alone yields no finding. - Silent failure: invalid stack dimensions and failed conversions reach shape errors; the budget search ignores only floor refusals.
- Tests: clause (z) rejects zero card placement and checks logits. The PR reports swapped-stack FAIL-first evidence. GPU gates were not run during validation.
- Gates: routed coverage pins and the new logits band have dated PIN reasons; no numeric band was relaxed.
- Escape catalog: C1–C4 have no matches in the changes reviewed.
Card check: needs-gpu. This pull request changes crates/gpu-gates/src/bin/gate_qwen3moe_e2e.rs, crates/gpu-gates/src/bin/shared/qwen3moe_place.rs, crates/gpu/src/arch/qwen3moe/body.rs … and carries no gate run on a card (CONTRIBUTING's evidence list); a maintainer adds gpu-verified after one.
🔨 Shingler, bloomery's review bot: approves a clean pull request and requests changes on a must-fix (how it works)
… one Co-Authored-By: Claude Opus 5.5 <[email protected]>
There was a problem hiding this comment.
Since the last review:
Must-fix 1 is fixed: both Qwen3.6 callers now use the shared budget search.
Verdict: CLEAN: the incremental changes remove the duplicate search and preserve both callers' behavior.
Checked
- Duplication: no new definitions. One budget-search definition remains, with three callers.
- Complexity: the changed callers gain no branches.
- Silent failure: 1 budget-floor filter followed. Only that refusal becomes
None; other errors reach both callers through?, as before. - Tests: no assertions or test contracts changed. The shared search matches the removed body after parameter substitution and diagnostic wording. GPU gates were not run during validation.
- Gates: no pins, bands, assertions or cases moved or removed. The deleted function was a duplicate planning helper.
- Escape catalog: C1–C4 have no matches in this increment.
Card check: needs-gpu. This pull request changes crates/gpu-gates/src/bin/gate_qwen35moe_e2e.rs, crates/gpu-gates/src/bin/gate_qwen3moe_e2e.rs, crates/gpu-gates/src/bin/shared/qwen3moe_place.rs … and carries no gate run on a card (CONTRIBUTING's evidence list); a maintainer adds gpu-verified after one.
🔨 Shingler, bloomery's review bot: approves a clean pull request and requests changes on a must-fix (how it works)
What
Qwen3-30B-A3B (
Program::Qwen3moeBody: Instruct-2507, Coder-30B and their fine-tunes) reads the same placed card-legarms as Qwen3.6 (
prompt_leg_gate_up/prompt_leg_down), from one place incrates/placement/src/accepts.rs. ItsQ8_0 and Q6_K expert stacks now go to the card leg. Before this change, the plan put 0 card experts on either file.
crates/gpu/src/arch/qwen3moe/placed.rsownscard_leg,common_formsandstack_ty.body.rsandbody35.rsboth read them, and
body35.rsdrops its own copies.Placed::within: a load refuses card bytes above what the plan counted. Both bodies call it.crates/model/src/arch/coverage.rsROW_PINSre-pinned (PIN(2026-10-22)) for the new arms.gate_qwen3moe_e2e. A Q8_0 or Q6_K file places card experts on common layers and decodes thewhole-host run's greedy ids within the gate's band.
Prediction and measurement
Card
docs/cards/q30leg-decode.card[derived]. One RTX 3090, serving defaults, ctx 131072. Plan: Q8_0card_experts=1746 (f 0.284), Q6_K card_experts=2306 (f 0.375).
Measurement:
just depth-serveon one RTX 3090 (250 W cap), base main a0d5dec (this branch's parent). Four rounds,D 6, N 128, ctx 131072. Lead hold up; 0 of 16 rows
[cpu-busy]or[other-busy]. Prefill at D 6 also rose: Q8_081.40 → 108.22 tok/s, Q6_K 92.55 → 130.93.
Q8_0 is inside its band. Q6_K is under it. The base ran faster than the model said (59.89 against 53.7 tok/s), so
the host leg costs less than the model's 128 GB/s term assumed, and taking a share of it off the card saves less. The
q30leg arm's rows on Q6_K scatter by 4.6 %. The gain is positive on both files. The host-leg bandwidth term goes to
the triage for a re-fit.
Gates
Real tier, from the round (
tools/gate-batch.sh --tier real,DONE total=6 red=0):gate-placement,gate-qwen3moe-meta,gate-gpu-qwen3moe-typesgate-gpu-qwen3moe-e2ewith (z)gate-gpu-qwen35moe-leg,gate-gpu-qwen35moe-e2eAlso green:
gate-gpu-lib, run alone.card_experts=1746.FAIL-first:
Qwen3moeBodyturn (z) red withcard_experts=0.header_common_formsreturning NONE makes the load refuse bywithin.common_stacksturns the logits and greedy-ids checks red.just affectedselects 198 of 222 recipes, because placement is a common owner. They run in the 0.3.8 release batch(fixture tier, the union).
🤖 Generated with Claude Code