Repository navigation
generate, beside, serve seats: the draft yield is one rule both seats call, and a drafted plan's refusal other than no room for the context stops the load by name - #1070
Conversation
… both seats call, and a drafted plan's refusal other than no room for the context stops the load by name
There was a problem hiding this comment.
Verdict: CLEAN: The shared yield rule propagates non-capacity refusals and preserves the selected plan's context.
Checked
Duplicates: 16 new functions/types checked; no duplicate owner found. Dryer reported 0 pairs in model/placement; gpu-gates checked manually.
Complexity: crapper flagged no functions. The added branches classify load-time refusals; no decode, prefill or kernel work changed.
Silent failure: 4 refusal/default sites followed. Capacity errors permit a plain-plan probe; other errors return to the caller. The saturated subtraction describes an already-guarded shortage.
Tests: static mutation analysis predicts failing assertions for each changed test's protected behavior: drop the source (crates/gpu-gates/src/beside.rs:128); omit the embedding reserve (crates/gpu-gates/src/beside.rs:35); stop traversing wrapped unpaged refusals (crates/gpu-gates/src/generate.rs:402); accept every error as zero context (crates/gpu-gates/src/generate.rs:336); restore the broad auto fallback or reject a discrete host shortage (crates/gpu-gates/src/bin/shared/serve_seats/qwen38.rs:1416); omit context restoration (crates/gpu-gates/src/generate.rs:352); omit the host-shortage class (crates/gpu-gates/src/start.rs:424); emit HostRoom instead of DraftHostRoom (crates/model/src/arch/glm5next/place.rs:1120).
Gates: no existing tolerance, threshold, gate or case removed or relaxed. The PR includes FAIL-first output for the shared refusal regression.
Escape catalog: no C1–C4 pattern matched.
Adversarial checks: unrelated planning errors propagate; a forced draft bypasses the plain probe; a kept draft restores its context note.
Notes
Static review only; tests were not run here. The PR reports the unchanged auto_slots_keep_the_fitting_host_plan test, but no run of the modified auto_slots_keep_the_fitting_drafted_plan test. Complete card evidence is absent: no nvidia-smi line, both tested commit hashes, or just gate-* command/output.
Card check: needs-gpu. This pull request changes crates/gpu-gates/src/beside.rs, crates/gpu-gates/src/bin/shared/glm5next_place.rs, crates/gpu-gates/src/bin/shared/routed_legs.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)
Filed outside this PR: #1071
|
The review is done and the contribution check passed, so I'm merging this. |
MTP 초안의 양보(yield) 규칙을 한 곳으로 모아, 초안 계획이 컨텍스트 부족이 아닌 이유로 거절되면 조용히 MTP를 끄지 않고 이름을 붙여 로드를 멈추게 했습니다.
What and why
The Qwen3.8 and GLM serve seats each carried their own copy of the unset draft's yield. Both read every refusal of the drafted context search as "the draft holds no context" (
with = 0), so any error in the drafted plan, such as a failed folder read, made the cost rule yield the draft and the plain plan served without MTP, with no error shown.The rule now has one owner in
generate.rs:draft_yieldyields only when the drafted plan fits no context the machine may take (FloorShort,CtxDoesNotFit, orHostRoomFloor, read through the family refusal or a barePlacementError), and returns any other refusal by name.beside::refusalkeeps the refusal as the error source, so the type is still readable under an image or embedding reserve. The Qwen3.8 one-slot fallback inauto38uses the same test instead of treating any error as no fit.Release notes: Fixed: a drafted plan that fails for a reason other than context room now stops the load with its error instead of serving without MTP.
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): the yield match inserve_seats/qwen38.rs(drafted_rule...map_or(0, ...)) and the one inserve_seats/glm.rs(drafted.as_ref().map_or(0, ...)) are replaced by onedraft_yieldcall each.What I ran
On a DGX Spark, with the old rule (
Err(_) => Some(0)) put back indraft_yield, the new test fails:With the fix, on a DGX Spark:
bloomery-serve --planon the two Qwen3.8 folders (nvidia/Qwen3.8-Flash-Next-NVFP4,nvidia/Qwen3.8-Flash-Next-FP4-Local) still keeps the draft where it fits, and yields it only for a set context the drafted plan cannot hold:All five plan runs exit 0.
Hardware (if the change is for a machine)
AI help
AI 코딩 에이전트가 코드를 작성한 후 설명을 썼고, 테스트를 마쳤습니다. diff 리뷰와 PR 초안 리뷰는 제가 직접 했습니다.