Repository navigation
Conversation
The arena refused every vocabulary but 248,320 and sized the head's candidates by a constant. The head kernel already takes its row count at run time and guards the last group's tail, so the arena now takes the file's vocabulary (0 is refused by name) and sizes the candidates by head_groups(vocab), the launch's own ceiling rule. Qwen3.6's head stays 7,760 groups; no MSL changes. This opens MiniCPM-V 4.7 35B-A3B's text body (vocabulary 248,144, a partial last group). New clause head_partial: the head argmax at 248,144 rows with the winner in the partial last group, against the f64 oracle; its mutant head_last_group (the final reduction stops one candidate short) is red on it. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01Q5zTV27LbaVZFTjnkdmTjJ
There was a problem hiding this comment.
Verdict: MUST_FIX: the new groups function is an unnecessary forwarding wrapper.
Must fix
1. Remove the forwarding wrapper
crates/metal/src/kernels/head.rs:44 groups forwards both arguments unchanged to usize::div_ceil. Its two callers can use that existing operation directly. This is a kind B defect under the fewest-elements rule.
Removing it now deletes a definition and its documentation without changing either caller's behavior.
Delete groups and its documentation. Replace the head_groups definition with:
pub const fn head_groups(rows: usize) -> usize {
rows.div_ceil(ROWS_PER_THREADGROUP)
}Replace the candidates statement at crates/metal/src/kernels/head.rs:111 with:
let candidates = p.rows.div_ceil(rows_per_threadgroup);Non-blocking
⚠ Cover the arena's vocabulary change: crates/metal/src/arch/qwen3moe/arena.rs:677.
head_partial allocates its own buffers and never opens the arena. Restoring the old vocabulary refusal or the fixed 7,760-candidate allocation leaves this clause green.
Add a session gate with vocabulary 248,144 and provide its run output. This catches recurrence at the engine boundary.
Checked
Elements: groups has two callers in head.rs; the base launch check already uses div_ceil directly.
Silent failure: head_partial propagates device errors and rejects a reported fault.
Tests: head_partial asserts the tail logits and planted final-row id. The added mutant skips the final reduction candidate; the PR reports it red.
Gates: no numeric bands or tolerances moved; fixture grid assertions replace the fixed engine vocabulary assertions.
Escape catalog: no C1–C4 pattern matched in the cited changes.
Notes
Static review only. Metal gates were not rerun. The PR reports M1 Pro results as summaries; the promised real-file runs remain pending.
🔨 Shingler, bloomery's review bot: approves a clean pull request and requests changes on a must-fix (how it works)
The groups helper only forwarded its two arguments to usize::div_ceil. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01Q5zTV27LbaVZFTjnkdmTjJ
|
Real files on a second Mac (Apple M1 Pro 32 GB, macOS 27.0.1, run-time source path).
Text only: MiniCPM-V's mmproj is not read on Metal. The |
There was a problem hiding this comment.
Since the last review:
- Must-fix 1 is fixed: crates/metal/src/kernels/head.rs:38 and the launch check call
div_ceildirectly; the forwarding wrapper is gone.
Verdict: CLEAN: The incremental change resolves the must-fix and preserves both ceiling calculations and their operands.
Checked
Duplicates: 0 new items; both dryer pairs share clause-table structure but register different contracts.
Complexity: diagnostics flag no changed functions; this increment removes one function and adds no branches.
Silent failure: no new sites. Zero rows, weight-size overflow and mismatched window lengths retain named errors.
Tests: no tests changed. The existing head_last_group mutant drops the final reduction candidate; head_partial rejects the resulting wrong id. Its red run is reported in the PR body.
Gates: no bands, thresholds, tests or cases changed in this increment.
Escape catalog: no C1–C4 patterns matched.
Notes
Static review only; Metal gates were not rerun. The PR carries gate-result summaries without the complete run evidence. Real-file runs remain pending in the supplied PR text.
🔨 Shingler, bloomery's review bot: approves a clean pull request and requests changes on a must-fix (how it works)
Part of #593 (Phase 1-0 in
docs/research/metal-all-models.md, #802).The Metal arena refused every vocabulary but 248,320 and sized the head's candidates by a constant. The head kernel already takes its rows at run time and guards the last group's tail. Now the arena takes the file's vocabulary and sizes the candidates by the launch's own ceiling rule. No MSL changes; Qwen3.6's head stays 7,760 groups.
This opens MiniCPM-V 4.7's text body (vocabulary 248,144). Sage and Ornith already passed every refusal.
Evidence (lead M1 Pro 32 GB, this commit):
just lab-metal: PASS, 125 mutants each red on its clause. Newclause head_partial: PASS (248144 rows in 7755 groups, the last of 16: id 248143, ...); mutanthead_last_groupred on it.gate_metal_qwen35moe_e2e: every clause PASS butr_resident, which fails the same way on the base 0ccbb7b on this Mac under load (a 250 ms gap rule). Its--mutants-allPASS (12), and the generate_metal smokes pass.Written with AI help (Claude Code).
🤖 Generated with Claude Code
https://claude.ai/code/session_01Q5zTV27LbaVZFTjnkdmTjJ