Repository navigation
Conversation
There was a problem hiding this comment.
Verdict: MUST_FIX: Shared policies still have duplicate owners, and two new public aliases have no callers.
Must fix
1. Use the shared cache flag for MiMo too
crates/gpu-gates/src/bin/shared/serve_seats/tiered.rs:138 repeats crates/gpu-gates/src/bin/shared/serve_seats/mimo2.rs:537: host need, checkpoint reserve, minimum state, full-session warning and printed budget. R14 requires one owner.
Adopting the helper now removes the old policy before the copies diverge.
In MiMo, use cache_ram: tiered::CacheFlag, initialize it with Default::default(), and replace its "--cache-ram" and fallback match arms with _ => out.cache_ram.take(flag, value). Update the CacheRam doc links and remove unused budget imports. Replace its budget method with:
fn cache_budget(
flags: &Self::Flags,
plan: &Plan<'_>,
pool: u64,
slot_ctx: usize,
inputs: &model::arch::place_hybrid::PlanInputs<Self::H>,
) -> Result<u64, GateError> {
flags.cache_ram.budget(plan, pool, slot_ctx, |n| {
seq_bytes(inputs, slot_ctx, n)
})
}2. Route existing identity construction through of_load
crates/gpu/src/checkpoint/saved.rs:85 adds a factory while crates/gpu/src/arch/qwen3moe/body38.rs:1934 still derives the same first-shard/card/context identity inline. The same construction remains in GLM:1743, MiMo:879 and DeepSeek:875. This is shared load identity (R14).
Using the factory now removes four copies without adding an owner.
Replace the Qwen, GLM and MiMo let who = Identity { ... }; definitions respectively with:
let who = Identity::of_load("qwen4exp", file, gpu, ctx)?;let who = Identity::of_load("glm5next", &embd.file, gpu, ctx)?;let who = Identity::of_load("mimo2", &file, gpu, ctx)?;Replace DeepSeek's method in crates/gpu-deepseek41/src/body/snap.rs with:
fn identity(&self, gpu: &Gpu) -> Result<Identity, GpuError> {
Identity::of_load(ARCH, &self.file, gpu, self.positions())
}3. Remove the unused model-specific state aliases
crates/gpu-minimaxm3/src/seq.rs:22 and crates/gpu/src/arch/musespark/body/seq.rs:16 introduce aliases used only by their declarations, re-exports and documentation. Both seats use PlaneSeq<B> through the shared adapter. These are unnecessary public elements (R13).
Removing them now avoids establishing unused API names.
Delete both alias declarations and their doc comments. Remove PlaneSeq from both imports and link the module introductions to the shared PlaneSeq instead. Delete pub use seq::MiniMaxSeq; and pub use seq::MuseSeq;. The resulting imports and Muse export are:
// crates/gpu-minimaxm3/src/seq.rs
use bloomery_gpu::checkpoint::planes::{PlaneBody, head_major};
// crates/gpu/src/arch/musespark/body/seq.rs
use crate::checkpoint::planes::{PlaneBody, head_major};
// crates/gpu/src/arch/musespark/mod.rs
pub use body::{Body, LayerNodes, LayerRoute, Placed};Checked
Duplicates: the cache policy and four identity constructors are confirmed; both fixes reuse existing owners.
Elements: both aliases occur only in declarations, re-exports and documentation.
Tests (on paper): removing the Anywhere return at saved.rs:1040 or the prefix bound at :1091 breaks the corresponding assertions. CUDA gates were not run here.
Gates: FAIL-first is reported in the PR body for the new serve clause.
Escape catalog: C1–C4 do not match the findings. No ledger lessons are in force.
Notes
The PR reports fixture gates and identical PTX without the card/driver line, both run hashes, model path, or commands with output required by CONTRIBUTING.md. GPU evidence is incomplete. Mark the predicted memory/PCIe costs [derived].
Card check: needs-gpu. This pull request changes crates/gpu-gates/src/bin/gate_minimaxm3_serve.rs, crates/gpu-gates/src/bin/gate_musespark_serve.rs, crates/gpu-gates/src/bin/shared/serve_gate.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)
There was a problem hiding this comment.
Since the last review:
- Fixed: MiMo delegates cache parsing and budgeting to
CacheFlag(crates/gpu-gates/src/bin/shared/serve_seats/mimo2.rs:515). - Fixed: Qwen, GLM, MiMo and DeepSeek use
Identity::of_load(crates/gpu/src/arch/qwen3moe/body38.rs:1934). - Fixed: both unused state aliases and their re-exports are removed; module docs link to
PlaneSeq(crates/gpu-minimaxm3/src/seq.rs:14, crates/gpu/src/arch/musespark/body/seq.rs:13).
Verdict: CLEAN: The incremental changes resolve all three earlier findings and preserve cache-budget and identity checks.
Checked
Duplicates: 0 new functions, types or constants; existing owners replace the copies. Dryer reports 0 pairs; the excluded gpu-gates changes were checked with Grep. Neither removed alias has remaining references.
Complexity: crapper flags saved_state_returns, save_async_in, checked, both seat open functions, resume, served_with and both Body::load functions for earlier gate/save/load branching. That growth predates this increment; the new hunks add no branches.
Silent failure: 3 error sites followed. Invalid cache values, MiB overflow and absent shards return errors. Unknown flags still reach the parser's rejection.
Tests: no tests changed. On paper, changing >= to > in holding or short_of fails the existing equality-boundary assertions. CUDA gates were not run here.
Gates: no pins, thresholds, tests or clauses changed in this increment.
Adversarial checks: zero and short budgets retain their behavior; all four identity fields are preserved; foreign identities are rejected before restore copies. No token-path work was added.
Escape catalog: C1–C4 do not match. No ledger lessons are in force.
Notes
The earlier evidence note remains open. The reported fixture gate runs lack the card/driver line, both run hashes, model path, and commands with output. Provide the scan commands and output for the claimed identical PTX; --no-jit scans need no GPU (AGENTS.md). Label the predicted memory and PCIe costs [derived] (CONTRIBUTING.md).
Card check: needs-gpu. This pull request changes crates/gpu-deepseek41/src/body/snap.rs, crates/gpu-gates/src/bin/gate_minimaxm3_serve.rs, crates/gpu-gates/src/bin/gate_musespark_serve.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)
There was a problem hiding this comment.
Since the last review:
- Fixed: MiMo still delegates cache parsing and budgeting to
CacheFlag. - Fixed: all four loaders still use
Identity::of_load. - Fixed: both unused model state aliases remain removed.
- Still open: the evidence and derived-number note below.
Verdict: CLEAN: Both incremental edits preserve behavior.
Checked
Duplicates: 1 new alias checked with Grep; no existing equivalent. Dryer reports 0 pairs; gpu-gates was excluded, and its changed comparison adds no item.
Complexity: crapper flags saved_state_returns, save_async_in, checked, both seat open functions, resume, served_with and both Body::load functions. Their branching predates this increment; neither edit changes complexity.
Silent failure: 2 error channels followed through seq_save_async and its caller. GpuError still propagates; NoRoom still reaches the server's eviction/retry handling. The alias expands exactly to the previous return type.
Tests: seven integer boundary values confirm the changed comparison is equivalent. Mutation, by static trace: forcing the restored prefix to one position at planes.rs:233 still fails cache_n >= fed. CUDA gates were not run here.
Gates: no pin or threshold moved; longer.cache_n > fed still requires at least 1024 cached positions.
Adversarial checks: equality still fails the extended-return condition; fed is fixed at 1023, so the former addition cannot overflow. The alias preserves both error types and the pending-copy handle. No runtime work was added.
Escape catalog: C1–C4 do not match. No ledger lessons are in force.
Notes
The earlier evidence note remains open. The reported fixture gate runs lack the card/driver line, both run hashes, model path, and commands with output. Provide the scan commands and output for the claimed identical PTX. Label the predicted memory and PCIe costs [derived].
Card check: needs-gpu. This pull request changes crates/gpu-deepseek41/src/body/snap.rs, crates/gpu-gates/src/bin/gate_minimaxm3_serve.rs, crates/gpu-gates/src/bin/gate_musespark_serve.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)
…e of a body whose every store is a plane of positions Co-Authored-By: Claude Opus 5.5 <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
…seats (--cache-ram, saved off the request path) Co-Authored-By: Claude Opus 5.5 <[email protected]>
…the cache after another took the slot Co-Authored-By: Claude Opus 5.5 <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
V4.1, GLM-5.3, MiMo and Qwen3.8 built the same first-shard, card and context identity inline; each now calls the one factory with its arch name. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
…che_n with > Co-Authored-By: Claude Opus 5.5 <[email protected]>
There was a problem hiding this comment.
Since the last review:
- Fixed: MiMo still uses
CacheFlag. - Fixed: all four loaders still use
Identity::of_load. - Fixed: both unused model state aliases remain removed.
- Still open: the evidence and derived-number note below.
Verdict: MUST_FIX: The rebase restores an incorrect statement about MiMo's saved prompt cache.
Must fix
1. Remove MiMo from the seats that refuse saved prompt caching
docs/serving.md:545 The interdiff adds MiMo back to this refusal. MiMo accepts --cache-ram and its crates/gpu-gates/src/bin/shared/serve_seats/mimo2.rs:426 saves sequence state for later resume. This is a kind B defect: the feature description contradicts the implementation and its own heading; removing MiMo is a mechanical fix.
Cost: correcting this sentence now prevents publishing the wrong feature contract.
Replace line 545 with:
the card. The Qwen3 seats keep only the longest prefix the live slot holds; they run no saved prompt cache, and a
Checked
Duplicates: no new definitions in the interdiff. Dryer reports 0 pairs; gpu-gates was excluded.
Complexity: none of the functions crapper reports gains branching in the interdiff.
Silent failure: MiMo's snapshot and resume propagate sequence-state errors.
Tests: no assertion changed in the interdiff. Static mutation trace: restoring one position fails back.cache_n >= fed; an extended return keeping only fed fails longer.cache_n > fed. CUDA gates were not run here.
Gates: no threshold or pin moved.
Escape catalog: C1–C4 do not match. No ledger lessons are in force.
Notes
The earlier evidence note remains open. The reported fixture gate runs lack the card/driver line, both run hashes, model path, and commands with output. Provide scan commands and output for the claimed identical PTX. Label predicted memory and PCIe costs [derived].
Card check: needs-gpu. This pull request changes crates/gpu-deepseek41/src/body/snap.rs, crates/gpu-gates/src/bin/gate_minimaxm3_serve.rs, crates/gpu-gates/src/bin/gate_musespark_serve.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)
| apart, so there a shared prefix shorter than 4,096 tokens does not restore. Saving runs off the request path. On | ||
| MiniMax-M3 and Muse Spark a saved state is the K and V rows of the held positions (and MiniMax's index keys), with no | ||
| checkpoints: a request that shares any prefix with a saved state restores that prefix, and only those rows go back to | ||
| the card. The MiMo and Qwen3 seats keep only the longest prefix the live slot holds; they run no saved prompt cache, and a |
There was a problem hiding this comment.
MiMo supports --cache-ram and saves sequence state; remove it from the refusal list.
| the card. The MiMo and Qwen3 seats keep only the longest prefix the live slot holds; they run no saved prompt cache, and a | |
| the card. The Qwen3 seats keep only the longest prefix the live slot holds; they run no saved prompt cache, and a |
…s refuse one Co-Authored-By: Claude Opus 5.5 <[email protected]>
There was a problem hiding this comment.
Since the last review:
- Fixed: docs/serving.md:545 removes MiMo from the cache refusal. MiMo accepts
--cache-ramand implements snapshot and resume. - Still open: the previous evidence and derived-number note below.
Verdict: CLEAN: The incremental documentation change resolves the previous must-fix and matches the implementation.
Checked
Duplicates: 0 new items. Dryer reports 0 pairs; gpu-gates was excluded. No code changed in this increment.
Complexity: none changed in this increment; crapper's reported functions are unchanged.
Silent failure: 0 new sites. MiMo propagates snapshot and resume errors; Qwen3 explicitly refuses both operations.
Tests: no tests changed, so no new mutation check applies. CUDA gates were not run.
Gates: no gate, threshold or pin changed.
Escape catalog: C1–C4 do not match. No ledger lessons are in force.
Notes
The earlier evidence note remains open. The claimed fixture runs lack the card/driver line, both run hashes, model path, and commands with output. Provide scan commands and output for the claimed identical PTX. Label predicted memory and PCIe costs [derived].
Card check: needs-gpu. This pull request changes crates/gpu-deepseek41/src/body/snap.rs, crates/gpu-gates/src/bin/gate_minimaxm3_serve.rs, crates/gpu-gates/src/bin/gate_musespark_serve.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)
Saved prompt cache on the MiniMax-M3 and Muse Spark seats
Both seats kept the live slot's longest shared prefix but saved no state. When another conversation took the slot, the return re-fed the whole prompt (1,228 ids: 13.1 s on MiniMax-M3, 12.5 s on Muse Spark). Their stores are all planes of positions, so a saved state is the K and V rows of the held positions (and MiniMax's index keys), with no recurrent store and no checkpoint.
SeqStategets a rows-only form (save_rows,save_rows_async,load_rows): any prefix is a valid cut, so a request that shares part of a saved prompt restores that part.checkpoint/planes.rsis the one owner of the model-level save, resume and lane for such a body. A body lists its stores (PlaneBody::lend) and nothing else.--cache-ramthrough oneCacheFlagand save off the request path on a lane, as GLM and Qwen3.8 do.saved_state_returnsin the shared serve gate: A is answered after its head, so A continues the live slot by one id (the truth); an unrelated B takes the slot; A returns from the saved state.cache_nmust reach A's length less one, and with the residency off the ids must equal the truth's (same rows, same one-id pass, so equal on every seat). B takes the slot again and A returns extended:cache_nmust reach A's length. An uncached run is no oracle: on Muse Spark the live slot's continued turn already differs from a full re-feed by rounding.Expected cost at 4,096 positions: 540 MiB (MiniMax-M3.1) and 992 MiB (Muse Spark), 47 ms and 87 ms of PCIe at 12 GB/s. Both seats' serve gates pass on the fixture tier (3-4 layer cuts); the real-file tier is the lead's.
Evidence (fixture tier): gate-gpu-minimaxm3-serve and gate-gpu-musespark-serve green with
saved_state_returns(A returned keeps 1023 positions, ids equal to the truth run; A extended keeps 1039). FAIL-first:resume_prefixrestoring one position andload_rowsrestoring one row both turn the clause red; restored, green.ptx-scan --no-jitis identical for the 4 covering bins. The clause compares against the same rows and the same one-id pass, because Muse's 1024 + 9 continuation is not the same bits as a 1033-id re-feed (to be read separately againstprefill_pass_cut_is_bits).Landing: the change reaches 166 gates through the gpu lib (no kernel moved). It lands in one fixture-tier batch together with the weight-type train that selects the same set.
AI-assisted (Claude).
🤖 Generated with Claude Code