Repository navigation
qwen38: serve paged plans at their requested slot count - #713
Conversation
There was a problem hiding this comment.
Verdict: CLEAN: No reachable behavior defect or proven quality defect remains in the changed code.
Non-blocking
⚠ Validate the drafted arena change: crates/model/src/arch/qwen35moe/place.rs:3469. The body says no model code changes, but this diff also increases MTP arena floors. The reported bloomery-placement test does not exercise this model regression. Run cargo test --release -p bloomery-model drafted_slot_plans_floor_the_arena_for_every_verify_row and attach its output and tested commit. This checks the additional behavior before callers depend on it.
Checked
Duplicates: 1 new named item checked against existing arena/slot tests; none duplicated. Dryer reported 0 pairs. The gate reuses the existing request, token-comparison and record readers.
Complexity: gate::paged rose from 145 to 171 through added request stages and branches in the CLI loop. These implement separate gate clauses; complexity alone is not a finding.
Silent failure: 6 parse/default sites followed. Invalid arena fields and token lists fail assertions. Display defaults affect diagnostics only.
Tests, by source mutation analysis: both model tests protect place.rs:686; dropping the MTP multiplier makes their column assertions fail. Restoring the startup refusals at shared/serve_seats/qwen38.rs:1772 or generate_qwen3moe.rs:2776 fails the listening or CLI-exit checks. Splitting a round fails the pass-count assertion; shortening or swapping token lists fails length/equality checks. These mutations were not executed.
Gates: the printed parallel clause becomes judged, with a dated PIN and FAIL-first startup evidence. Both removed refusals have dated reasons. No tolerance is relaxed.
Adversarial checks: zero slots are refused; MTP rows are capped at the eight-column port and larger rounds are partitioned between windows; lookup verification runs two rows per slot in turn. Changed code runs during planning/startup or in tools; no decode-loop work is added.
Escape catalog: C1–C4 do not match the diff.
Notes
GPU evidence is incomplete: the reported runs omit the tested base/head commit hashes. The full serve gate was not run. No builds or gates were executed during this static review.
Dryer did not search crates/gpu-gates; those changes were searched manually.
Card check: needs-gpu. This pull request changes crates/gpu-gates/src/bin/gate_qwen38_serve.rs, crates/gpu-gates/src/bin/generate_qwen3moe.rs, crates/gpu-gates/src/bin/shared/serve_seats/qwen38.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에서 페이지 방식 계획으로 슬롯을 여러 개 요청하면 시작 단계에서 거부되던 결함을 고치고, 네 슬롯 요청이 끝까지 처리되는지 확인하는 검사를 되살립니다.
Part of #565. Tracked in #699.
What and why
bloomery-serve-qwen38 --parallel 4andgenerate_qwen3moewith four slots fail on a plan that pages its host experts through the NVMe tier's RAM arena. The placement owner accepts the plan and sizes the arena for four slots, and the load then stops withthe one-column rule read another plan.The placement change that lets a paged plan serve
--parallel Nin one step (e1a3374) left two older checks in place that still assumed one column. The server's check in the serve seat (shared/serve_seats/qwen38.rs) came in with b787893 and itstogether(slots)condition with 44c3068. The plain generation load ingenerate_qwen3moe.rscame in with d9e8bad. Each rejects every paged plan with more than one slot, after the planner has already accepted it.This PR removes the two stale checks. The planner and
ArenaFlooralready count each slot's columns, so nothing else in placement changes. The check that a paged plan must not carry an unset draft stays ingenerate_qwen3moe.rs, since it is a separate contract. There is no new option, public API, kernel or unsafe code.gate_qwen38_serve'spagedclause used to print what the--parallel 2server did and leave it unjudged (PIN(2026-10-12)). It now starts a four-slot server and judges three things: the server listens with the paged plan served as asked, each of four requests returns the same greedy tokens alone and together, and a round carries all four slots in one step. It also runsgenerate_qwen3moewith one slot and with four slots (two tokens each) and checks that every slot finishes and no draft loads.Release notes: Fixed: A paged Qwen3.8 plan now serves the slot count it was asked for, in both the server and
generate_qwen3moe, instead of failing at startup.Code shape
plan_with_slotsandHostTotals::step_slots; I added no calculation.PIN(2026-10-12)is replaced by aPIN(2026-10-23)with its reason.cargo fmtandcargo clippyare clean on what I touched; the lint count did not go up.cargo fmton the three files andgit diff --checkare clean; clippy has not been run on this head.Duplication found or removed (
path:line), or "none": none.What I ran
Model:
unsloth/Qwen3.8-Flash-Next-GGUFat revision766911a6b7369840a91dbcd95f9f997acaab6cd6,UD-Q4_K_XL, four shards. Plan settings:BLOOMERY_DRAFT=off BLOOMERY_RESIDENCY=off BLOOMERY_HOST_ROOM=27G,--place gate. The real-model runs used an earlier revision of this branch with the same code; the branch was later rebased onto newer main, and only a comment in the gate differs.Hardware: an RTX 5090 machine with no other CUDA process at the start. The
nvidia-smilines:Both binaries were built with
cargo oxide build --arch sm_120 -- -p bloomery-gpu-gates --features deepseek41,gemma-embedding2,hf --release --bin bloomery-serve-qwen38 --bin generate_qwen3moe; the head also built--bin gate_qwen38_serve.FAIL-first, on main: the server with
--place gate --ctx-size 1024 --parallel 4andgenerate_qwen3moewithBLOOMERY_GEN_SLOTS=4 --place gate --ctx 1024 --tokens 1,2,3,4 -n 2both exit 1. The server stops withthe load's plan pages host experts through the NVMe tier's 22512709632 B RAM arena at 4 slots, the draft off: the one-column rule read another plan; the CLI stops with the same message at23494107136 B. The planner line before it readspaged rule=served arena=22512709632 asked_slots=4 slots=4.Head, server: it listens and prints
paged rule=served arena=22512709632 asked_slots=4 slots=4. Four different prompts were sent one at a time and then together (temperature=0, 16 tokens each,ignore_eos=true,cache_prompt=false). All four token lists are identical alone and together (GREEDY request=0torequest=3,match=True), the rounds showrows=4 passes=1 slots=4, and the check endsPAGED_PARALLEL PASS four requests, 16 greedy tokens each, positive arena, rows=4 passes=1.Head, CLI:
generate_qwen3moefinishes four slots with two tokens each in eager and in graph mode, the per-slot tokens agree (CLI eager arena=23494107136 tokens={0: [271, 2], 1: [220, 17], 2: [16, 15], 3: [16412, 1928]}, the same forCLI graph), and it endsPAGED_CLI PASS four slots, two tokens each, eager equals graph.Host unit test for the slot-aware arena floor,
cargo test --release -p bloomery-placement the_arena_floor_counts_the_plans_slots -- --nocapture:test result: ok. 1 passed; 0 failed; 0 ignored; 0 measured; 174 filtered out; finished in 1.66s. It ran on an earlier revision of this branch, and the PR's head differs from it only in a gate comment.Fixture gate on the head:
It includes
paths five eager steps vs five graph replays: tokens [157377, 137169, 47835, 32521, 34727] vs [157377, 137169, 47835, 32521, 34727]; every position's logits bit for bit: true.No kernel, launch, copy or sync changed, so I ran no timing comparison.
Not run: the plain arm of
gate_qwen38_servethroughjust gate-gpu-qwen38-serve. Its harness fixes the plain arm to an RTX 3090, and the machine I had is an RTX 5090, so the paged server and CLI runs above stand in for it. Also not run: clippy andt0. Each real-model run was done once.Reproduction
cargo oxide build --arch sm_120 -- -p bloomery-gpu-gates --features deepseek41,gemma-embedding2,hf --release --bin bloomery-serve-qwen38 --bin generate_qwen3moe --bin gate_qwen38_serve BLOOMERY_DRAFT=off BLOOMERY_RESIDENCY=off BLOOMERY_HOST_ROOM=27G target/release/bloomery-serve-qwen38 --place gate --ctx-size 1024 --parallel 4 BLOOMERY_GEN_SLOTS=4 BLOOMERY_DRAFT=off BLOOMERY_RESIDENCY=off BLOOMERY_HOST_ROOM=27G target/release/generate_qwen3moe --place gate --ctx 1024 --tokens 1,2,3,4 -n 2 cargo test --release -p bloomery-placement the_arena_floor_counts_the_plans_slots -- --nocapture BLOOMERY_TIER=fixture just gate-gpu-qwen4exp-e2eOn main the server and CLI commands stop with the one-column message. On this head the server listens and serves the four requests, and the CLI finishes four slots.
What I ran into
This does not block the PR.
gate_qwen38_serve's plain arm is fixed to an RTX 3090, so a paged server on another card is only checked by running it by hand, as above.AI help
AI 코딩 에이전트가 코드를 작성한 후 설명을 썼고, 테스트를 마쳤습니다. diff 리뷰와 PR 초안 리뷰는 제가 직접 했습니다.