Repository navigation
app::mtp: a pass of several slots' drafts calls the shared draft executor, with no per-body override - #1105
Conversation
…utor, with no per-body override MtpBody::store_slots and MtpBody::chain_slots defaulted to walking the slots in turn, and both bodies that run several slots (Qwen3.8's Body38 and GLM's Body) overrode them with the same calls into GpuModel::draft_store_slots and draft_chain_slots. The two trait methods, their overrides, app's SlotChain and chains_at_once are gone: SlotWalks::run, pass_slots and its slot_chains call the shared executor directly on a body that implements SlotDraft, and the serve seats' generic round paths carry the same bound. The refusal of probabilities asked of a draft whose readback holds none moves from GLM's override into slot_chains, read from MtpBody::PROBS, still before the round. A body that holds one resident sequence (Qwen3.6's Body35, whose MTP load refuses a second sequence) takes no part in a pass of several slots, now by its type as well as by that refusal.
There was a problem hiding this comment.
Verdict: CLEAN: No must-fix defect was confirmed in the shared-executor refactor.
Non-blocking
⚠ Supply verification for the reviewed revision: crates/app/src/mtp.rs:1138. The supplied GPU runs name 1dfd2c2/663c0f4; the reviewed base/head are c297d066/0f83003d. The body omits model-file identity and the PTX equivalence proof required by AGENTS.md's move class. Explain how those runs cover the reviewed revision, identify the model file, and attach the base/head PTX comparison, for example just canon-check c297d066.
Checked
- Duplicates: 0 new functions, types or constants. Both removed model adapters called the existing shared executors. Dryer reported 0 candidate pairs.
- Complexity: crapper reported no changed function above its thresholds.
slot_chainsreplaces intermediate chain construction with a capability guard and direct dispatch. - Silent failure: the batched and GLM single-chain probability refusals return named errors before their executor calls. No silent-default site was added.
- Tests: no tests or assertions changed; mutation analysis is not applicable. GPU tests were not rerun during validation.
- Gates: no threshold, pin, test or gate clause changed.
- Dispatch: the batched path calls the same executor and writes proposals in batch order; mixed heads or walk modes retain the sequential path.
- Escape catalog: none of C1–C4 matches the diff.
Notes
Dryer did not search crates/gpu-gates; its changed hunks add imports and trait bounds.
Card check: needs-gpu. This pull request changes crates/app/src/arch/glm5next/mtp.rs, crates/app/src/arch/qwen3moe/mtp.rs, crates/app/src/mtp.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)
|
The review is done and the contribution check passed, so I'm merging this. |
여러 slot의 draft 경로가 공용 executor를 바로 부르도록 하고, body마다 둔 차례 실행 기본값과 override를 지웠습니다.
What and why
The draft walks of several slots (
SlotWalks::run,slot_chains) now call the shared draft executor (GpuModel::draft_store_slots,GpuModel::draft_chain_slots) directly.MtpBody::store_slotsandMtpBody::chain_slots(a one-slot-at-a-time default), the Qwen3.8 and GLM overrides of them,SlotChain,chains_at_onceand GLM'srefuse_probabilitiesare removed. The refusal of a probabilities request on a draft whose readback holds ids only now sits inslot_chains, before the round runs, and still names the cause. The multi-slot entry points are bounded bySlotDraft, so a body without it cannot enter them at compile time.The same shared calls run in the same order with the same launches. Only host Rust changes, no kernel or PTX.
Release notes: internal: the several-slot draft path has one owner, the shared draft executor, instead of a default plus two per-model overrides.
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": the sequential default incrates/app/src/mtp.rs(MtpBody::store_slots,MtpBody::chain_slots) and its overrides incrates/app/src/arch/qwen3moe/mtp.rsandcrates/app/src/arch/glm5next/mtp.rsare removed.What I ran
Upstream base
1dfd2c2b86d21f1a117cff8bd94d381864d95fed, PR head663c0f49733f71c6827f03773b6cb729cbb4597f. Fixture tier (BLOOMERY_TIER=fixture) on one GB10:Gates the diff reaches:
The
(z)lines exerciseslot_chains(draft_chain_slots) andSlotWalks::run(draft_store_slots) on Qwen3.8's MTP.The real binary, with MTP on one slot (
--arm drafted) and with--parallel 2(--arm plain, the slots clauses):Hardware (if the change is for a machine)
NVIDIA GB10, driver 595.84, CUDA 13.3.
AI help
AI 코딩 에이전트가 코드를 작성한 후 설명을 썼고, 테스트를 마쳤습니다. diff 리뷰와 PR 초안 리뷰는 제가 직접 했습니다.