Repository navigation
model::arch::qwen35moe::fixture: the recorded card budget plans with the load's own activation stack, so q38dense holds 256 routed experts a layer again - #1093
Conversation
…the load's own activation stack, so q38dense holds 256 routed experts a layer again The fixture budget's machine counted the walk's quantized forms as Stack::q8_blocks32 while the load plans with PlanInputs::stack, so the budget it recorded was short of what the load reserves and the q38dense card leg held 252 or 253 routed experts a layer. budget_machine and the hw_fixture_q38_budget test now take inputs.stack(); a test holds the recorded reserve to the load's for F32, Q4_K and Q8_0 on integrated and discrete cards.
There was a problem hiding this comment.
Verdict: CLEAN: Fixture budgeting now uses the load's activation stack, with no merge-blocking defect found.
Checked
Duplicates: 1 new item checked, the budget-stack regression test; no equivalent test found. Dryer reported 0 pairs.
Complexity: crapper flagged no changed function. The new test adds bounded loops over tensor types and card integration.
Silent failure: 0 new sites. Planning errors propagate; set-aside overflow and an invalid card adjustment remain named errors.
Tests: restoring Stack::q8_blocks32 at fixture.rs:311 makes the new F32 equality assertion fail. The PR supplies FAIL-first output. Restoring the fixed stack at fixture.rs:2744 reintroduces the reserve mismatch guarded by the half-expert assertion.
Gates: no bands, tolerances or pins moved; the hardware test retains its ignore attribute.
Escape catalog: C1–C4 do not match.
Adversarial: mixed tensor types use the shared stack calculation; unified-card adjustments cancel the shared scratch term; foreign architectures are refused. Remaining fixed-stack uses are synthetic or explicitly pinned metadata tests.
Performance: fixture planning and tests only; no decode, prefill or kernel path changes.
Fix layers: shared-owner closure, regression coverage and existing fixture variant-budget/gate plan output are present.
Notes
Tests were reviewed statically and were not rerun. The supplied CPU/GPU logs quote head 18d767144c964096a71106957b8e195c8ea062b1; the reviewed head is 079f45d1b2da357da351538aa4b4a43c052ae614.
🔨 Shingler, bloomery's review bot: approves a clean pull request and requests changes on a must-fix (how it works)
|
The review is done and the contribution check passed, so I'm merging this. |
Qwen3.8 fixture 예산을 실제 load와 같은 activation stack으로 계산하도록 고쳐, q38dense가 층마다 routed expert 256개를 다시 카드에 둡니다.
What and why
The Qwen3.8 fixture budget planned a card with a fixed q8 activation stack (
Stack::q8_blocks32), while a real load plans it withPlanInputs::stack(), which counts the file's own tensor types. The two reserved different amounts on the card, so the recorded budget picked a different expert count than the load.budget_machineand thehw_fixture_q38_budgetmachine now useinputs.stack(), and the stale comment that said the fixture sets wait for a regeneration is rewritten. No kernel, launch or load-plan code changes.Release notes: Fixed: the Qwen3.8 fixture card budget plans with the load's own activation stack, so the q38dense fixture keeps 256 routed experts on the card in every layer.
Code shape
The review reads these first. A box left unticked needs one line of why.
copying it (
AGENTS.md"Common code first",docs/rust-quality.mdR14). Where I found an existing copy, Inamed it below.
(tensor shapes, the attention kind, the quant). A common owner gained no per-model branch, flag or trait method.
tools/check-comments.sh).PIN(YYYY-MM-DD):and its reason.
cargo fmtandcargo clippyare clean on what I touched; the lint count did not go up.Duplication found or removed (
path:line), or "none": removed the fixed-stack copy incrates/model/src/arch/qwen35moe/fixture.rs(budget_machine) and incrates/model-hf/tests/fixture.rs(hw_fixture_q38_budget); both now use the load'sinputs.stack().What I ran
Base
9f35aa59b2c472382f496cdab681b472f13c1dac, head18d767144c964096a71106957b8e195c8ea062b1.New test
the_budget_machine_uses_the_loads_stack, before the fix (it checks F32, Q4_K and Q8_0 dense types with the integrated card false and true; the first failing case is shown):After the fix, with clippy:
GPU gate on the q38dense fixture variant (
qwen38-fixture-q38dense-00001-of-00001.gguf, derived fromQwen3.8-Flash-Next-UD-Q4_K_XL-00001-of-00004.gguf), on the head above:The recorded card budget of this variant moved from 9230614528 to 9204400128 bytes when the fixture CLI replanned it.
Hardware (if the change is for a machine)
nvidia-smiheader line:NVIDIA-SMI 595.99.02 Driver Version: 595.99.02 CUDA Version: 13.2AI help
AI 코딩 에이전트가 코드를 작성한 후 설명을 썼고, 테스트를 마쳤습니다. diff 리뷰와 PR 초안 리뷰는 제가 직접 했습니다.