Repository navigation
model: qwen4exp placement sizes saved states and PLE readers for the load, and refuses a missing plan callback - #979
Conversation
…load, and refuses a missing plan callback
There was a problem hiding this comment.
Verdict: CLEAN: The saved-state bound and reader reservation follow the load dimensions, and missing callbacks return a named error.
Non-blocking
⚠ Run the placement check from the gate recipe: gate_qwen4exp_nvfp4.rs:758 selects the new checks only with --placement.
The gate-gpu-qwen4exp-nvfp4 recipe (justfile:1763) invokes the binary without arguments, so it skips these checks.
Append a second gpu-gate.sh gate_qwen4exp_nvfp4 --placement invocation to that recipe with its existing card selection and exit-code chaining. Wiring it now keeps recurrence prevention in routine runs.
Checked
Duplicates: 12 new functions/constants checked; no duplicated sizing rule. Dryer reported 0 pairs; GPU and gate code were searched manually.
Complexity: new placement = 21 covers planning, reader checks and save checks. Existing growth is argument-error propagation or gate clauses: props_engine, drafted_paged_run, NVFP4 run, serve-seat run; nvtier run/arm/stepunion_arm/slots_mid_arm/refuse_clauses/sitting_child; nodes measure/census_plan/run_history; e2e snapshot_prefix. No structural defect found.
Silent failure: 5 added/reformatted default or error-discard sites followed. Zero spacing and stateless pricing are defined inputs; failed test plans reach false assertions.
Tests (static mutation check): replacing the checkpoint count at place.rs:2050 with two copies breaks qwen38_state_bytes; restoring fixed reader width at place.rs:678 breaks the expanded source test. Dropping the MissingPlan checks at place.rs:1378 (also line 1398), or the ubatch guard at line 1063, breaks the expanded route test. Removing the budget cap at seqstate.rs:131 breaks the new bound test; removing the verify floor at stores.rs:33 breaks the new reader-reservation test. Fixing MTP hidden rows to one breaks props_engine. The new card check rejects the old bound at 16,384 positions. Other test edits pass the new argument through existing assertions.
Gates: the split-save equality is retained beside its new bound check; the changed clause carries a dated PIN. No tolerance was relaxed.
Performance: changes affect planning, loading and save-size accounting; no new per-token work, launch or copy.
Escape catalog: no matching pattern.
Notes
The PR supplies GB10 gate output, but omits the required nvidia-smi line and base revision for those runs. GPU evidence is false.
This review used source inspection; no build or card run was performed.
Card check: needs-gpu. This pull request changes crates/gpu-gates/Cargo.toml, crates/gpu-gates/src/bin/gate_nvtier.rs, crates/gpu-gates/src/bin/gate_qwen38_nodes.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. |
Qwen3.8 배치 계획이 저장 상태와 PLE reader 예약을 실제 load 크기로 계산하고, plan callback이 없으면 오류를 냅니다.
What and why
The Qwen3.8 placement planned a fixed number of saved-state checkpoints regardless of context, and reserved the PLE reader for a fixed width regardless of the serving ubatch. The load saves a context-dependent number of states and reads with the real ubatch, so the plan and the load disagreed.
widen_card_routealso accepted a successful callback that returned no plan.Price::saved_points(runtime) is the one bound on the inner points a save can carry (first, anchors, last, capped by the host budget).state38uses it for the checkpoint copies and for the MTP hidden rows. The load keeps using the realsave_points.runtime::stores::reader_columns(ubatch)is the one owner of the reader width (max(ubatch, PASS_ROWS)). The plan and the host reader both read it, and a ubatch of 0, above the context or above the supported width isPlaceError::Ubatch.widen_card_routereturnsPlaceError::MissingPlanwhen a successful callback hands back no plan.assert_eq!(reserve(4096) - reserve(512), 896 << 20)insaved_state_and_reader_count_the_load_shape). No kernel or dispatch changes, and I claim no speed change.Release notes: Fixed: Qwen3.8 placement now sizes saved sequence states and the PLE reader from the context and ubatch the load uses.
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": noneWhat I ran
Unit tests (head
ef3798b44for the model and single-case runs,585927823for the placement module):Each fix fails its own test on the old behavior. With the fixed checkpoint count, the fixed reader columns and the
expecton the plan callback put back (head333e10eb):Restoring the fixes returns the same command to
test result: ok. 38 passed; 0 failed.GB10 gate with the NVFP4 expert model (
nvidia/Qwen3.8-Flash-Next-NVFP4, one F8 PLE plane), headef3798b44, draft off, ctx 16385, U=512, q8 KV:The real server on the same model and flags answers a completion request:
GB10 gate with the two-plane PLE table (
nvidia/Qwen3.8-Flash-Next-FP4-Local, code plane U8[2500012, 80], scale plane F8[2500012, 10], 128 shards), head585927823:The checkpoint lines show the planned bound at or above the bytes the load actually saves (
arrays_bytes) at both context lengths.Hardware (if the change is for a machine)
sm_121a)AI help
AI 코딩 에이전트가 코드를 작성한 후 설명을 썼고, 테스트를 마쳤습니다. diff 리뷰와 PR 초안 리뷰는 제가 직접 했습니다.