Skip to content

Nanbeige4.3-33B on one 24 GB card (llama description on Body35) - #838

Merged
midagedev merged 4 commits into
mainfrom
nanbeige43
Oct 26, 2026
Merged

midagedev merged 4 commits into
mainfrom
nanbeige43

Conversation

@midagedev

@midagedev midagedev commented Oct 26, 2026 •

Copy link
Copy Markdown
Owner

What and why

Nanbeige4.3-33B runs on the card as a configuration of the Qwen3.5 body (Body35). It loads whole on one 24 GB card and serves through the qwen3 seat with no flags. The GGUF is a dense llama: 52 layers, 56/8 heads, NORM rope at θ 1.2e8, SPM tokenizer. The cleanups the new model exposed land with it: the description owns the plan inputs, there is one trunk-bytes owner, and there is one dense whole-load path.

Release notes: Added — Nanbeige4.3-33B (Q4_K_M) on one 24 GB card, bloomery-serve with no flags; a dense model's prompt ubatch is sized to the card (-ub wins).

  • crates/model, models, tokenizer, refset, chain, metal, placement:
    • the llama reader and description (model::arch::spec gives GQA layers and a dense FFN);
    • the SPM pre-tokenizer rule;
    • the logits-nanbeige43 reference family;
    • the qwen3moe chain plan takes the GQA group as a kind.
  • crates/gpu:
    • group-of-7 flash kernels: decode seg_mma and the prompt walk, f16 and q8 caches;
    • the NORM-rope append;
    • Body35 reads a llama description;
    • the six new entries are pinned on the cc 12.1 tables at the cc 8.6 values, PIN(2026-10-26), until a GB10 scan runs.
  • crates/gpu-gates, crates/serve:
    • the qwen3 seat picks its family by program, not by architecture string;
    • a dense whole load sizes its prompt ubatch on a 4096/2048/1024/512 ladder, and -ub/--ubatch-size wins;
    • PlanInputs comes from the description (KvLayout::of_spec, one trunk_bytes owner, one whole_dense path);
    • crates/models owns the QwenXml markers;
    • a tool call cut by the length limit answers 200 length, as llama.cpp does.
  • tools/, justfile, docs/cards/: the nanbeige43 profile and its tables, the depth runner's llama arm, and two prediction cards.
  • New gates: gate-gpu-llama-dense (logits against mainline llama.cpp at P 64 and 4096), gate-gpu-llama-serve (the no-flag start on a 3090), gate-llama-meta.

Code shape

  • No second copy. The seat, the ubatch ladder, the KV sum and the whole-load decision each have one common owner.
  • Model code holds only architecture facts. The group of 7, NORM rope and SPM are facts of the description; no common owner branches on a model name.
  • Dead code is gone.
  • No silent failure. A llama description without a routed layer is refused by name. -ub 0 is a named error.
  • Comments state what is true now.
  • No relaxed gate. Two clause texts follow main's new wording, and the cc 12.1 PTX rows carry PIN(2026-10-26). No band moved.
  • cargo fmt and cargo clippy are clean; the lint count equals the ratchet.

Duplication found or removed: the recurrent and attention-only KV sums merged into one owner, and whole_attention/whole_hybrid merged into one function. Not done in this PR: about 1,300 kernel lines that two older families still copy, and section_order. Both are on the triage list.

What I ran

All runs used the maintainer's batch runner on the workstation (RTX 3090 + RTX A6000):

fixture tier, the landing's full list     DONE total=266 red=2 (gate-qwen3moe-types, gate-gpu-clef-serve: both fixed, re-run green)
real tier, the deferred list               DONE total=15  red=2 (clef-serve fixed; gate-refset red on main's missing hf-qwen4exp-nvfp4 MANIFESTs)
after merging main 40d938dcd: overlap      DONE total=32  red=0 tier=fixture
                              real tier    DONE total=14  red=1 (gate-gpu-nvtier clause 5 under a peer's load) -> alone: DONE total=1 red=0
just check (box) rc 0; lint = ratchet; check-arch, check-records, model-tax, recipes, check-comments rc 0
after merging main 904145fe4 (cuda-oxide 9df9e7ce): just check rc 0, chain lib 23/23, the check scripts rc 0;
the gates run in the lead's union batch (main + this PR + #836 + the GLM quant piece), gate-ptx-spill included

FAIL-first: every new clause went red on its named mutant:

  • asked-largest, layout-lanes, planes, refusal, program-guard;
  • trunk-bytes-ignores-q8, shape-order, shape-past-layers;
  • whole-dense-open-rule, the ubatch-flag mutant, decide_ubatch_is_the_cards_pick.

Known red not from this PR: mac-static combos, where mac-metal-lint passes bloomery-metal/... features to -p bloomery-device. Reported.

Hardware (if the change is for a machine)

The first speed sitting ran on the RTX A6000 against llama.cpp 53ed051ce at -ngl 99 -fa on, 4 rounds, Q4_K_M. Every row is [cpu-busy], so these are not public numbers; a re-sit on a quiet box is queued.

  • decode tok/s at depth 6: ours 26.96, llama.cpp 31.98.
  • decode tok/s at depth 4096: ours 25.85, llama.cpp 30.68.
  • pp tok/s at P 512: ours 1154.8, llama.cpp 1303.5.
  • pp tok/s at P 4096: ours 1148.2, llama.cpp 1256.8.

AI use: Claude Code led the rounds and wrote most of the code. Every result above was run on our cards by the maintainer's batch runner.

🤖 Generated with Claude Code

midagedev and others added 4 commits October 26, 2026 23:52
…-33B, and its logits reference family

Co-Authored-By: Claude Opus 5.5 <[email protected]>
… the description's plan inputs, and the llama gates

Co-Authored-By: Claude Opus 5.5 <[email protected]>
…ts first A6000 prediction cards

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@github-actions github-actions Bot added documentation Improvements or additions to documentation gpu The card engine: crates/gpu*, crates/app host Host crates: qdot, threads, engram, engram-lab, runtime, sampler, levers, decision, vision, refset model The CPU engine and model files: crates/model, models, hf, gguf, tokenizer, jinja needs-gpu Changes code a card must check, and carries no gate run on a card placement Placement planning: crates/placement serve The HTTP server: crates/serve tools Tools, recipes, CI and the toolchain: tools/, justfile, .github/, Cargo labels Oct 26, 2026

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Verdict: CLEAN: I built failure paths for the riskiest hunks (cut tool calls, g7 kernel pad warps, NORM-rope bounds, ubatch ladder, hparams defaults) and the code blocks each one; one non-blocking item remains.

Non-blocking

⚠ Decode is under the card's own prediction: docs/cards/nb43-decode.card derives ~31 ms a token (~32 tok/s) and predicts 27..34; the PR body reports 26.96 tok/s at depth 6 (37 ms) and 25.85 at depth 4096. The gap is about 6 ms a token, with weight bytes 20.78 GB at a roof of ~700 GB/s [derived]. The rows are [cpu-busy], so I do not call it a regression. Proof for this class (new shapes, launch count unchanged from the 8-head path per the pass_launches test): the quiet re-sit plus the BLOOMERY_PROFILE per-node row the card names under decide-below. Prefill is 11 to 12% under llama.cpp (1154.8 vs 1303.5 at P 512); the same re-sit covers it.

Checked

  • Duplicates: about 40 new items grepped (hparams reader, Pairs/Head128, norm_128, ubatch_asked, trunk_bytes, real_head, ended/cut_call). dryer's pairs: unsized_layer and unsized_store are two 6-line refusals with different messages; one owner would add a parameter for the one definition it removes, so no finding. unclosed in glmxml.rs, hermes.rs, qwenxml.rs is three 6-line impls on three different error types; a trait would add elements, so no finding. dsml.rs:776 vs reasoning.rs:222 shares only a shape.
  • Complexity: the crapper rows are new gate bodies (nb_*_check, dense_e2e::run) and ubatch_pick::parse; gate code, new functions, no split asked. Hparams::read (20) is a flat list of refusals. enqueue_pass_g7 and norm_core are kernel-side, read for correctness only.
  • Silent failure: 12 sites followed. unwrap_or_default in scripted_call and cut_of only feeds a gate that then compares the value. delta.unwrap_or([0; 3]) in Geometry35::of is pinned by the REAL constant. The hparams defaults are recorded in Hparams::defaults. -ub 0 and the env size are named errors (ubatch_asked).
  • Kernels: seg_mma at PACK = 7: the early return lo >= limit is block-uniform; pad warps skip only fold_tile_w (no block barrier inside it) and the part_* writes; sync_threads stays outside the branch. rope_norm: at + THREADS + 1 < 128 per row, p >= ctx raises CachePos and writes NaN.
  • Cut tool call: open is overwritten each push, so cut_call only runs when the scan itself reports an unclosed call; a call that ended on its own stays an error.
  • Tests: new clauses are hw_ and #[ignore]d. Mutants checked in words: real_head flipped to h <= PACK makes the pad warp write a neighbour's partial, which the g7 logits clause catches; cut ignored in try_finish_at turns hw_qwen_call_cut_by_the_limit_is_an_answer red.
  • Gates: five new bands in gate_llama_dense.rs carry PIN(2026-10-26) with a derivation; the cc 12.1 PTX rows carry a PIN. No old band moved.
  • Escape catalog: no match (the shell changes have no pipe-masked exit code, no heredoc, no pgrep -f).

Notes

  • The PR body has no nvidia-smi line, no commit hashes and no command output for the gates; the runs are described as the maintainer's batch runner. I set gpu.json to evidence: false.
  • dryer did not search crates/gpu and crates/gpu-gates; I read the kernel files by hand.

Card check: needs-gpu. This pull request changes crates/gpu-gates/Cargo.toml, crates/gpu-gates/examples/qwen35_admission.rs, crates/gpu-gates/src/bin/bloomery_serve.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)

@midagedev
midagedev merged commit d9c84aa into main Oct 26, 2026
8 checks passed
midagedev added a commit that referenced this pull request Oct 26, 2026
…guments again

#838 passed the tensor table as an eighth argument after #832 had dropped
it, so the Mac-only gate_metal_qwen35moe_e2e did not compile.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation gpu The card engine: crates/gpu*, crates/app host Host crates: qdot, threads, engram, engram-lab, runtime, sampler, levers, decision, vision, refset model The CPU engine and model files: crates/model, models, hf, gguf, tokenizer, jinja needs-gpu Changes code a card must check, and carries no gate run on a card placement Placement planning: crates/placement serve The HTTP server: crates/serve tools Tools, recipes, CI and the toolchain: tools/, justfile, .github/, Cargo

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant