Repository navigation
serve: connect dense qwen35 to the existing native Qwen seat - #339
Conversation
There was a problem hiding this comment.
Verdict: MUST_FIX: dense serving stops on a memory shortage instead of selecting a smaller default context.
Must fix
1. Preserve the typed memory shortage for dense context selection
crates/gpu-gates/src/bin/shared/qwen3moe_place.rs:923 now sends dense files through unplaced_qwen35_slots. For bloomery-serve --model qwen3 -m dense.gguf with --ctx and --place unset, choose a card that holds the model at a lower context rung but not the initial target. The whole-fit probe returns Whole::Short; the dense model has no routed experts, so unplaced calls dense_refusal at line 639, which returns a string error. short_or at line 1008 recognizes only typed shortages. The error propagates through serve_choice into choose_ctx, which stops instead of halving. The server exits although a smaller context fits.
Cost: fix the existing refusal owner before dense callers acquire separate retry logic.
Replace Whole::dense_refusal with the following. The existing short_in reader recognizes this placement error.
fn dense_refusal(&self, ctx: usize) -> GateError {
if let Whole::Short(n) = self {
let (margin, beside) = match n.load {
WholeLoad::Checked { arena, reserve } => (reserve, arena),
WholeLoad::Unchecked => (n.card.margin_bytes, 0),
};
return PlacementError::CardBudgetFloor {
card: n.card.name.clone(),
budget: n.budget,
floor: n.need,
dense: n.weights,
kv: n.kv,
context: n.card.context_bytes,
scratch: n.card.scratch_bytes,
reserves: n.card.reserve_bytes(),
margin,
beside,
}
.into();
}
format!(
"{}: a dense backbone has no routed experts to move to the host tier",
self.line(ctx)
)
.into()
}Add a regression with a card budget between the initial target's need and a lower rung's need. Assert that default context selection reaches the lower rung; restoring the string error must fail it.
Checked
Error path: traced the new dense dispatch through the whole-fit probe, dense refusal, typed shortage reader and context ladder.
Fix: WholeLoad is Copy; the proposed error's fields match WholeNeed and CardBudgetFloor. The existing short_in reader accepts this variant.
Tests: the decision-marker regression asserts that malformed metadata errors; the PR body reports its FAIL-first run. The context fallback needs the regression requested above.
Scope: full review; this is a new reachable behavior path. No ledger lessons apply. Escape catalog C1–C4 do not match this finding.
Notes
Dryer did not run. Validation was static; no builds or tests were executed. The PR supplies no NVIDIA gate evidence and reports device-linked frontend compilation and dense runtime validation as outstanding.
Card check: needs-gpu. This pull request changes crates/gpu-gates/examples/qwen35_admission.rs, crates/gpu-gates/src/bin/bloomery_serve.rs, crates/gpu-gates/src/bin/generate_qwen3moe.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)
|
I am refreshing our diagnostic follow-up #254 against this successor parent rather than duplicating the frontend. I am preparing the focused typed-shortage correction from review-5550636450 and a current-main integration branch, preserving your commits. I will share the fix/range here for your branch; I will not rewrite your fork branch or claim NVIDIA validation from host checks. |
|
@Burntgogi 고맙습니다. typed shortage 수정은 이미 이 PR의 다음 push에 들어 있습니다. 같은 작업을 두 번 하시지 않도록 먼저 알려 드립니다.
#254를 이 PR 위로 새로 맞추시는 것은 좋습니다. 이 push가 올라가면 #254의 native load가 GB10에서도 열릴 것입니다. 그래서 #254는 Burntgogi님께 맡기고, 저는 따로 이어받지 않겠습니다. GB10에서 돌려 볼 것이 있으면 말씀해 주세요. (AI 코딩 에이전트가 작성한 코멘트이며, 내용은 제가 확인했습니다.) |
ab68f00 to
f9fb472
Compare
There was a problem hiding this comment.
Verdict: CLEAN: No must-fix defect was established in the changed paths.
Non-blocking
⚠ Dense generation validation: docs/contrib/qwen35-generation.md:76. The reported model run covers four eager CLI tokens.
Attach dense forced-ID logits, eager/graph agreement and HTTP/native parity results from the documented clause on the contributor's card. This checks the new serving path before more dense models depend on it.
⚠ Arena regression coverage: crates/gpu-gates/src/bin/shared/qwen3moe_place.rs:368. The shortage test constructs Whole::Short directly.
Restoring unconditional placed_arena_bytes leaves the shortage regression green because it never calls qwen35_on. Add a dense fixture through qwen35_on that asserts planning succeeds, and show it fails with that mutant. This prevents recurrence of the separate no-router load failure.
Checked
Duplicates: 13 new functions, types and constants searched; no duplicate with a net-reducing fix identified. No dryer pairs were available.
Complexity: qwen35_on 8→13 adds arena selection and architecture reporting; CLI run 162→164 adds draft refusal; serve_load 19→20 adds an explicit unsupported-architecture arm. No complexity-only finding.
Silent failure: 8 changed absence/error sites followed. Missing architectures and malformed decision markers reach named errors; diagnostic placeholders do not select a model.
Tests, static mutation review: decision_type line 36, non-string→absent; Family::from_name line 23, drop qwen35; decode_mma line 45, flip !=; dense_refusal line 652, typed shortage→string. Each makes an assertion fail. The changed Python self-test still rejects its unsupported serves-arm mutant. The arena mutant is uncovered as noted above.
Gates: no pins, tolerances or cases relaxed. The PR reports FAIL-first for the new shortage regression.
Escape catalog: C1–C4 do not match the changed code.
Performance: changes affect admission and loading; no per-token allocation, launch, copy or synchronization term changes.
Notes
dryer did not run, according to diagnostics.
Static review only; builds and GPU gates were not run here.
The supplied commit IDs differ from the reviewed head. No qualifying gate log with the required nvidia-smi line is supplied.
Card check: needs-gpu. This pull request changes crates/gpu-gates/examples/qwen35_admission.rs, crates/gpu-gates/src/bin/bloomery_serve.rs, crates/gpu-gates/src/bin/generate_qwen3moe.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)
Replay only the three unique diagnostics commits onto the corrected midagedev#339 parent, retaining its authors and main's Nemotron and embedding changes. Include the server's current gemma-embedding2 required feature in stamped native builds, and document the exact parent pins, diagnostic-only comparison boundary, cross-fork base constraint, and host/static/reference smoke commands. Verification: intentionally unrun in this worktree; integration owner performs fresh verification after integration. No CUDA or full-model inference claim.
|
Focused typed-shortage correction submitted directly to your parent branch: juliankang4#1 (f9102a2 + 492218d). Isolated metadata and all test-ownership checks pass; actual host source-owner execution selects half/quarter/default rungs, while original string refusal fails. Current-main support is Burntgogi/bloomery:support/qwen35-339-current (3845e27), preserving your authorship and current Nemotron/embedding changes. Our #254 follow-up is replayed after that parent, not submitted as a second frontend. NVIDIA execution remains separate. The independently submitted #359 makes Card reserve sums fallible; integration/source-correctness-20261016 includes the checked callsite adaptation and passes the combined metadata check. |
f9fb472 to
7171389
Compare
There was a problem hiding this comment.
Verdict: CLEAN: The changed admission and placement paths preserve named refusals and context retries.
Non-blocking
⚠ Complete dense execution evidence: docs/contrib/qwen35-generation.md:76. The reported run generates four tokens in eager mode. Attach dense reference-logit, eager/graph and HTTP/native parity results, including prefix reuse and resident slots. This checks the newly admitted execution paths before serving depends on them.
⚠ Cover the dense arena selection: crates/gpu-gates/src/bin/shared/qwen3moe_place.rs:368. Replacing this branch with placed_arena_bytes restores the no-router refusal while the synthetic shortage test still passes. Add a dense-header planner case to the existing test module and gate recipe. It protects the second placement fix at its owner.
Checked
Duplicates: 13 new functions, types and constants checked; no duplicate owner found. Dryer supplied no pairs.
Complexity: qwen35_on 8→13 adds arena selection and architecture reporting; cli::run 162→164 adds a draft guard; serve_load 19→20 adds family/refusal arms. These are branches in existing orchestration functions.
Silent failure: 8 fallback/absence sites followed; missing architecture and malformed markers reach named errors. The unchecked arena arm has no producer in whole_load.
Tests, static mutation check: stringifying the shortage at crates/gpu-gates/src/bin/shared/qwen3moe_place.rs:652 fails the typed-error assertion.
Tests, static mutation check: treating malformed metadata as absent at crates/gpu-gates/src/model_file.rs:37 fails the error assertion.
Tests, static mutation check: dropping the dense arm at crates/gpu-gates/src/qwen_seat.rs:23, or flipping != at line 45, fails the family or flash-selection assertions. The arena mutant remains uncovered.
Gates: no pin, tolerance or case removed or relaxed; the new shortage clause has reported FAIL-first evidence. Gate-path changes only add selections.
Escape catalog: C1–C4 do not match. Python syntax parsing passed.
Notes
Dryer did not run; diagnostics reports no eligible changed Rust files. Device gates were not run during this review. The supplied evidence lacks the required nvidia-smi line and just gate-* run output.
Card check: needs-gpu. This pull request changes crates/gpu-gates/examples/qwen35_admission.rs, crates/gpu-gates/src/bin/bloomery_serve.rs, crates/gpu-gates/src/bin/generate_qwen3moe.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. |
Replay only the three unique diagnostics commits onto the corrected #339 parent, retaining its authors and main's Nemotron and embedding changes. Include the server's current gemma-embedding2 required feature in stamped native builds, and document the exact parent pins, diagnostic-only comparison boundary, cross-fork base constraint, and host/static/reference smoke commands. Verification: intentionally unrun in this worktree; integration owner performs fresh verification after integration. No CUDA or full-model inference claim.
This carries #251 by @Burntgogi forward. His commits are unchanged; our follow-up commit fixes two placement problems found while testing a real dense model.
What and why
Burntgogi connected dense
qwen35generation to the existing Qwen seat and Body35 for #88. His follow-up commits made the server and CLI reject malformed decision metadata throughmodel_file::decision_type, reusedserve_open35for CLI load options, and added an architecture-neutral header regression. The last review approved those fixes.This branch rebases that work onto current main. His three commits stay separate, with their authors, messages and order intact. Our commit adds two fixes to the shared placement code in
crates/gpu-gates/src/bin/shared/qwen3moe_place.rs:PlacementError::CardBudgetFloor, as the review required. Before,Whole::dense_refusalturned the shortage into a string, so the default-context ladder could not tell it was a memory shortage and stopped instead of trying the next smaller context. Now the ladder halves the context (16384, then 8192). Other refusals still propagate as errors.PlaceQ3::qwen35_onasked for placed-router scratch first, and a dense model has no router. A backbone with zero experts now reuses the arena of the existing whole-card load. Routed files keep the existing path. No refusal was removed.Release notes: Added: Dense Qwen generation through the existing native Qwen seat.
Code shape
gate-qwen3-planopens no card; no selector or assertion was removed.contrib-checkwere not run here.What I ran
Hardware: one NVIDIA GB10 (driver 595.84, CUDA image 13.3.1) for the model runs. The test and gate runs used the same family of machines with
--arch sm_121.Final head
5fd5e67f95554a01057ad99bd43a4bc9cf342200, baseac66556d0831f934ebb2c3efcf2f2f7fe9862854. The checks below ran on the earlier head18feed6d3a198340e497d33842db14d9949e1b8c. The final rebase left all four commits patch-identical ingit range-diff, so I did not rerun them on the rebased head.Shortage regression. It uses a dense tensor with no experts and the real
whole_need,dense_refusal,short_orandchoose_ctx_of. The card budget equals the lower rung's need, so the probe sequence must be[16384, 8192], for checked and unchecked loads.cargo oxide test --arch sm_121 -- -p bloomery-gpu-gates --features gpu --bin generate_qwen3moe --release dense_shortage_halves_the_default_context -- --nocaptureexpected typed CardBudgetFloor, got whole fit at ctx 16384(the error was an untyped string).1 passed; 0 failed.Real dense 27B load. I ran
Qwen3.8-27B-Q4_K_M.ggufon the GB10 with the commit before the arena change and then with the fixed commit:qwen3moe placed load: a router (this chain's FFNs are dense)and exit code 1.load arch=qwen35with 64 layers in eager mode with an f16 cache, then generatestokens [11, 353, 2688, 264](", I'm a").This shows the model loads and generates. It is not a speed measurement or an accuracy comparison.
just contrib-check --tier t0passed all 85 units. The first t0 run caught nine orphaned copies of a#[test]in an included module. I moved the body beside its private owner with one test entry and one gate recipe, and no checker was weakened.tools/gate-paths.tsvhas the derived entries fromrecipes.py check --fill.What I ran into
This does not block review. No oracle comparison of dense logits, eager and graph agreement, or HTTP and native parity was run, so token correctness against the reference is unverified. The shortage test uses synthetic placement data, not an HTTP server under card pressure. Device-linked frontend compilation,
mac-staticand the full GPU gate set were not run here.AI help
AI 코딩 에이전트가 코드를 작성한 후 설명을 썼고, 테스트를 마쳤습니다. diff 리뷰와 PR 초안 리뷰는 제가 직접 했습니다.