Repository navigation
bloomery-serve: the qwen3 seat holds its stage card before it reads the room, so its plan is the CLI's split - #952
Conversation
There was a problem hiding this comment.
Verdict: MUST_FIX: the change is right, but --plan now opens a card and a comment 160 lines below still says it does not.
Must fix
1. The --plan comment says no card was opened
qwen3.rs:2447 says "nothing was opened on a card". This PR adds Gpu::hold_card at line 2282, before every plan, and it runs for --plan too (the new comment says so). hold_card opens the device, so its context and the bundle stay loaded for the process. A reader who trusts the old comment will think --plan is free of a card open. It is not, and a host with no usable card now fails --plan at the hold.
Fix: replace lines 2447 to 2448 with:
// The records the load would print first are out; no model was
// opened on a card (the stage card was held above, and dropped).Non-blocking
⚠ The hold also runs for the qwen35 and qwen35moe families: qwen3.rs:2282. It sits before the family branch, so it changes the room those plans read. The qwen35 CLI path plans first and opens the card after (qwen35_open.rs:111-113). If so, the qwen35 server may now plan 4 MiB differently from its CLI, the reverse of this fix. The PR body measures qwen3moe only. Question: did you compare a qwen35 server plan with its CLI plan? If not, name the family in the PR body, or run that pair.
Checked
- Duplicates: 0 new functions or types. The new lines repeat the 3-line stage-card hold of qwen38.rs:1617-1618, each from its own seat's place flag. A shared helper would add an element for 2 lines, so no finding. dryer did not run (no changed file under
crates/, per diagnostics). - Complexity:
qwen3::run77 to 81 (crapper), straight-line growth from one hold, harmless. - Silent failure: 4 sites followed (
census()?,on()?,card_specs()?,hold_card()?). All return errors through?; none defaults. - Ordering: no
mem_infooralloc_roomread before line 2282 inrun(draft_of,check,Split::openread no room), so the hold is first. - Tests: none added.
completion_ids_are_the_cli_idsis the existing gate and fails on the base by the PR's account, so it turns red if the hold is removed. - Gates: no pins moved. Escape catalog: no pattern matched (Rust only, no shell).
Notes
- Evidence: the PR body has both hashes, the model, the commands and the
planlines, but nonvidia-smiline and nojust gate-*output.
Card check: needs-gpu. This pull request changes crates/gpu-gates/src/bin/shared/serve_seats/qwen3.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)
…he room, so its plan is the CLI's split
22a4754 to
50c6e89
Compare
There was a problem hiding this comment.
Verdict: CLEAN: the qwen3 seat now holds its stage card through the existing Gpu::hold_card before any plan reads the room, and I found no failure path.
Non-blocking
⚠ Gate not run: the PR body names no just gate-* command and no gate_qwen3_serve output, so completion_ids_are_the_cli_ids (the clause this PR says was failing, gate_qwen3_serve.rs:4567) is not shown green after the change. The --plan lines are good evidence for the split. Please add the gate run and the nvidia-smi line (the body has a model name and driver, not the nvidia-smi line CONTRIBUTING.md asks for).
Checked
- Duplicates: 1 new item (the hold block) checked. It matches the qwen38 seat's call to the existing
Gpu::hold_card. It is a reuse, not a new owner. dryer did not run (no changed file undercrates/). - Complexity:
qwen3::run77 → 81, straight-line growth (one?chain and one call). It is a seat entry point, and splitting it is its own work. - Silent failure: 4 fallible calls followed (
census,on,card_specs,hold_card). Each returns through?.a.place.unwrap_or(Place::A)is the seat's existing default; the same expression is used at lines 2307 and 2325. - Failure paths built and refuted: (1) unset
--placeholds a different card than the one planned.PlaceQ3::unplaced_onisPlace::A.on(census)andq3place::choosereturns the same card, so hold, plan and load use one card. (2)--planon a host with no card. The census error is returned by name, asq3place::choosebelow it already does. (3) The hold ordering againstvision_of. The PR's--planlines show an equal split at ctx 262144 for the 30B and 35B files; I could not check a--mmprojrun. - Tests: no test added. The existing hw gate
completion_ids_are_the_cli_idscomparessame_splitof server and CLI. Mutant: delete the newhold_cardcall. The plannedcard_expertsgoes back to 1538 against 1536 and that clause turns red, but only on a card at a large ctx. - Gates: no pins moved.
- Escape catalog: no pattern matched (no shell, no tools, no comment history).
Notes
gpu.json says evidence: false: the body has no nvidia-smi line and no just gate-* output.
Card check: needs-gpu. This pull request changes crates/gpu-gates/src/bin/shared/serve_seats/qwen3.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. |
bloomery-serve의 qwen3 좌석이 카드를 먼저 잡은 뒤 빈 메모리를 읽게 해서, 서버의 expert 배치가 CLI와 같아집니다.
What and why
bloomery-serve --model qwen3andgenerate_qwen3moeplan the same load but read the card's free bytes in different states. The CLI opens the stage card (its context and the device bundle) before it plans. The qwen3 seat ofbloomery-serveread the room before it opened any card, so it saw 4 MiB more free memory. At ctx 262144 that is two more card experts for the server (card_experts=1538 against the CLI's 1536), which is whycompletion_ids_are_the_cli_idsfails.The seat now resolves its stage card from the census and calls
Gpu::hold_cardbefore every plan,--planincluded, as the qwen38 seat already does. No record or schema changes.Release notes: Fixed: the qwen3 server plans the same expert split as the CLI at the same context.
Code shape
Gpu::hold_card, the call the qwen38 seat makes.?.cargo fmtandcargo clippyare clean on what I touched; the lint count did not go up.Duplication found or removed (
path:line), or "none": none.What I ran
Base 822b3f1, head 50c6e89, on an RTX 5090 machine, at ctx 262144 with
--place a. Models: Qwen3-30B-A3B Q4_K_M and Qwen3.6-35B-A3B Q4_K_M.The
planline of each:On the head, both processes plan the same split and read the same free bytes for both models.
Hardware (if the change is for a machine)
NVIDIA GeForce RTX 5090, driver 595.99.02.
AI help
AI 코딩 에이전트가 코드를 작성한 후 설명을 썼고, 테스트를 마쳤습니다. diff 리뷰와 PR 초안 리뷰는 제가 직접 했습니다.