Skip to content

Nemotron-3.5 NVFP4 checkpoint folders open placed; pixtral and tekken tokenize with the Tekken split - #940

Merged
midagedev merged 6 commits into
mainfrom
nvhr4
Oct 29, 2026
Merged

midagedev merged 6 commits into
mainfrom
nvhr4

Conversation

@midagedev

@midagedev midagedev commented Oct 28, 2026 •

Copy link
Copy Markdown
Owner

What and why

A Nemotron-3.5 ModelOpt NVFP4 checkpoint folder (the Lightning release) now opens and decodes on the card the way
its GGUF does. Getting there showed that the tokenizer reads GGUF pixtral the way ik does (the LLAMA3 split), while
mainline llama.cpp has mapped pixtral and tekken to its TEKKEN split since e197cef45. So digits and cased words
split differently on Nemotron-3.5 and every other pixtral file.

Release notes: Added — Nemotron-3.5 NVFP4 checkpoint folders (-m <folder>) open placed on the card. Fixed — pixtral/tekken GGUFs and folders tokenize with the Tekken split, as mainline does.

  • tokenizer: Pre::Tekken (GGUF pixtral, tekken; ignore_merges) and its HF reading. The old pixtral reading
    stays as Pre::Llama3, which lfm2 uses. The Nemotron tokenizer set is read by mainline 19cce6919
    (refset NEMOTRON_BUILD, oracle.sh), and was re-dumped there.
  • hf: the Tekken PRE row, model_input_names, and a named pad token that wins over a config's pad id, matching
    gguf-py's SpecialVocab.
  • gpu-gates: serve_seats/folder.rs is the one owner of a seat's folder open. It checks the architecture and the
    row tables. minimaxm3_folder, qwen38_folder and the nemotron seat keep only what their architecture forces.
    GpuModel::load_placed_bytes / open_placed take a folder model.
  • model: the coverage rows take the NVFP4 shared expert and the NVFP4 head the folder carries.
  • New gate gate-gpu-nemotron-h-moe-folder (family row, class row, card).

Code shape

  • No second copy. The three folder seats' shared open (architecture check, row-table check, the
    no-checkpoint refusal) moved into serve_seats/folder.rs.
  • Model code holds only architecture facts.
  • Dead code is gone.
  • No silent failure. A folder of another architecture, an unread row table and a tokenizer pipeline with no row
    are each refused by name.
  • Comments state what is true now.
  • No relaxed gate. The Nemotron tokenizer set moved to the oracle that has the Tekken split. Its pins are the
    new oracle's ids, not a loosened band.
  • cargo fmt and cargo clippy clean; lint count unchanged.

Duplication found or removed (path:line): the folder open in serve_seats/{minimaxm3_folder,qwen38_folder}.rs (now one owner).

What I ran

Narrowed landing list (just narrow origin/main HEAD): the ptx scans of all 4 covering bins are identical, so no kernel
moved. 214 gates, fixture tier, tools/gate-batch.sh --ledger:

DONE total=214 red=7 tier=fixture skipped=15 wall=1772s … deferred=252
DONE total=6 red=0 tier=fixture   (rerun of the 6 reds the box's full root drive caused: "0 are free")
gate-ptx-spill … violations=0 PASS   (rerun alone; the batch run scanned a generate_ds41 a parallel lane had changed)

The one remaining red, gate-gpu-qwen4exp-e2e@q38dense, is the gemm flip-frontier FAIL that main has had since
b825b64 (#935). It is not from this change.

gate-gpu-nemotron-h-moe-folder (A6000): split and whole vs the host engine, cosine 0.99996; prompt rows 8 and 32,
0.99998 and 0.99978; eager = replay. Against the UD-Q4_K_XL twin (a diagnostic, no verdict: NVFP4 and the twin's
32-value types round the same weights differently): whole vs twin cosine 0.996097, max |delta| 1.4918, argmax 4309 vs
4309. A floor from it waits for a FAIL-first run with a dropped per-expert scale.

At head 36685c6 (base origin/main), the review fixes rerun on the box: gate-gpu-nemotron-h-moe-folder,
-card32 and -serve rc 0; just lint 0 warnings. Cards: NVIDIA GeForce RTX 3090 and NVIDIA RTX A6000, driver
615.71.09.
gate-tokenizer passes against the re-dumped Nemotron set.
cargo test: tokenizer 121 + 53, hf 122, refset 311, coverage 33. just remote-static origin/main: remote rc 0.

Hardware (if the change is for a machine)

RTX A6000 (folder gate) and RTX 3090 (box), driver as in the gate log.

🤖 Generated with Claude Code

midagedev and others added 4 commits October 29, 2026 06:23
… is read by mainline 19cce6919

Mainline e197cef45 maps the GGUF pre `pixtral` to its TEKKEN type: cased words with marks, one digit a
piece, `[\r\n/]*` after punctuation, ignore_merges. Pre::Tekken (and Pre::TekkenHf for a tokenizer.json)
reuse minimax-m2's cased-word matcher with a shape argument; lfm2 keeps the LLAMA3 reading under its
own name (Pre::Llama3). The Nemotron tokenizer family pins the tree that has the move,
/home/user/llama.cpp-19cce691 (NEMOTRON_BUILD); its set is re-dumped there and gate-tokenizer's
nemotron corpus and cases equal it.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
…w, model_input_names, a named pad over a config's pad id

The PRE row `pixtral` spells the Tekken pipeline. model_input_names takes the one value HF writes.
A pad token tokenizer_config.json names wins over config.json's other pad id, as gguf-py's
SpecialVocab takes it (a config id only fills a kind it has not set); a bos id that disagrees stays
refused.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
… is one common owner

open_placed takes a Split or a folder Model; GpuModel::load_placed_bytes reads either source. The
serve seats' folder open (checked, open, model, without_checkpoint) moves into serve_seats/folder.rs;
MiniMax-M3 and Qwen3.8 keep thin wrappers and the nemotron seat takes a folder. The coverage rows take
what the body already runs: an NVFP4 shared expert and an NVFP4 head. gate_nemotron_h_moe_folder
holds the split and whole arms to every expert on the host, eager to replay, and the prompt passes
to the steps.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
A seat reaches the folder reader through this crate's `checkpoint` feature, so a bin that builds
without it (the Qwen3.8 serve gates) does not name model-hf's folder modules in its own target.

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 tools Tools, recipes, CI and the toolchain: tools/, justfile, .github/, Cargo labels Oct 28, 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: MUST_FIX: the new gate copies the card32 gate's harness instead of sharing it; the tokenizer and hf changes found no failure path.

Must fix

1. gate_nemotron_h_moe_folder duplicates gate_nemotron_h_moe_card32

gate_nemotron_h_moe_folder.rs:114-299 repeats gate_nemotron_h_moe_card32.rs:83-222 almost line for line: COSINE_FLOOR, PROMPT_LEN, CTX_SPARE, COLS, HOST, near, Premise, arm and prompt_near_steps. The only differences are the model source (a closure instead of open_split), the half_room budget and the clause name. A change to the floor or to the margin rule in one gate will not reach the other. That is one fact with two owners. The dryer tool did not search crates/gpu-gates, so this is a hand Grep result.
Cost: two copies drift on the first edit of the band; one shared file now removes about 110 lines and adds one module line per bin.
Fix: put these items in one file under shared/ (for example shared/moe_arm.rs, with a #[path] module in both bins, as e2e.rs is shared). Give arm a source: &dyn Fn() -> Result<Model, GateError> and a levers: PlanLevers parameter; card32 passes || open_split(Arch::NemotronHMoe, RECIPE). Keep only half_room, model_at, header_at, twin_arg and run in the folder gate.

Non-blocking

⚠ The gate cannot see a defect common to the folder's map: gate_nemotron_h_moe_folder.rs:27-30. The host, split and whole arms read the same folder scales. A dropped or wrong NVFP4 tensor scale in model_hf's map moves all arms alike, so every PASS clause stays green. The doc comment says so, and only the folder_near_twin line prints a number. Mutant: the map drops the per-expert scale; no assertion turns red. The PR body reports the host cosines (0.99996) but not the twin cosine. Please add that number (with its conditions) to the PR body, and set a floor from it once it is measured, with a FAIL-first run.

⚠ The folder/file choice in the seat is made in four places: nemotron.rs:369 (opened), the (split, parts) match at :373, :431 (parts.is_some()) and :469 ((tokenizer, folder)). run grew from 41 to 49 by these branches. Keep one Option<folder::Opened> and read it at each point.

Also 1 minor: PIN(2026-10-29) at refset/src/arch/tokenizer.rs:67 is dated after the review date (2026-10-28); check the date.

Checked

  • Duplicates: about 30 new items checked. One hit (finding 1). folder.rs is a net removal from the three seat openers. The dryer tool found 0 pairs in the crates it searched; gpu-gates and gpu were searched by hand.
  • Complexity: gate::run 44 and gate::arm 16 are new gate code (finding 1 covers arm). Seat run 41→49 is branches added to one function (non-blocking item 2). special_ids 14→16 is one branch. pretok::split 16→18 is even growth (two match arms).
  • Silent failure: 6 sites followed (the pad arm, whole_card_file, the folder refusals in folder::checked, the dense and omni refusal in nemotron_h::Checkpoint::parse, hp.experts[l]? in arm, run.logits.last()). Each ends in a named error. The pad arm keeps the named pad token by design, and no code reads the stored pad id.
  • Tests: the Tekken split tests, a_tekken_pipeline_is_the_pixtral_row and a_named_pad_token_wins_over_a_config_s_pad_id each turn red on the plausible mutants (digits 3, contraction on, a missing row, the pad arm removed). The folder gate misses the common-mode scale mutant (non-blocking item 1).
  • Gates: the Nemotron tokenizer build moved from MAINLINE_BUILD to NEMOTRON_BUILD with a dated PIN and a reason; no band moved.
  • Hot path: none touched (load time, tokenizer, gate code). Escape catalog: no pattern matched; the diff has no shell change beyond justfile and oracle.sh variable text.

Notes

  • No GPU evidence per CONTRIBUTING.md: the PR body has no nvidia-smi line, no commit hashes and no gate output, only a summary of the results.

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

…ecides folder or file once

gate_nemotron_h_moe_card32 and gate_nemotron_h_moe_folder run their arms through
shared/nemotron_h_moe_arm.rs (the open is a parameter, as are the plan levers); every clause keeps
its name, band and verdict. The nemotron seat's Weights::open decides folder or file once and its
header, placement and engine-thread open match that value.

Co-Authored-By: Claude Opus 5.5 <[email protected]>

@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: MUST_FIX: the new commits repeat an open idiom that model_file::header owns, and add a Words.split field that only repeats name.

Since the last review:

  • Must-fix 1 (gate harness copy): fixed. nemotron_h_moe_arm.rs is now the one owner; both gates include it by #[path].
  • ⚠ folder/file choice in four places: fixed. nemotron.rs:158-219 Weights decides once.
  • ⚠ twin cosine not in the PR body: still open, see below.

Must fix

1. split_at repeats the file open that header owns

nemotron.rs:170 is Split::open(path).map_err(|e| format!("open {}: {e}", ..)). model_file.rs:82-87 header does the same for a file, with the same error text. Both split_at calls (lines 182 and 216) run on a path that is not a directory, so header gives the same result. Cost: one fewer function and one fewer copy of the error text.
Fix: delete split_at; in Weights::open write Ok(Weights::File(model_file::header(path)?)); at line 216 write Ok(model_file::header(&file)?.into()); add use bloomery_gpu_gates::model_file;.

2. Words.split is a parameter the change does not need

nemotron_h_moe_arm.rs:63-75 holds split only for the premise-miss message at line 141. The same line starts with arm {name}, and both gates pass SPLIT_ARM as name for Premise::Split (folder gate:293, card32 gate:148). The field repeats name. Cost: one field, one argument and two call sites fewer.
Fix: remove the split field; make Words::clause() take no argument; call Words::clause() at folder gate:261 and card32 gate:134; the ..words at folder gate:333 stays valid. In arm, write the message as "... (a layer with experts on both sides for the split arm, every expert on the card for whole) {}", words.fail.

Non-blocking

⚠ The folder gate cannot see a defect common to the folder's map: gate_nemotron_h_moe_folder.rs:27. The host, split and whole arms read the same folder scales. A dropped per-expert scale in the map moves all arms alike, and no assertion turns red. Only folder_near_twin prints a number, and it decides nothing. Please add the twin cosine to the PR body with its conditions, and set a floor from it after a FAIL-first run.

Checked

  • Duplicates: 9 new items in the new commits checked (Weights, OpenModel, split_at, Words, arm, near, near_host, prompt_arm, last_logits). The card32 and folder gates share no copy. One hit: split_at (must-fix 1). Words.split is a redundant field (must-fix 2). dryer found 0 pairs in the crates it searched; gpu-gates was Grepped by hand.
  • Complexity: seat run 41→44 (branches moved into Weights; lower than the 49 of the last head). gate::run 40 is new gate code. special_ids and pretok::split growth is one branch and two match arms.
  • Silent failure: 3 sites followed (Weights::open for a directory, last_logits, prompt_near_steps's empty-walk error). Each ends in a named error or a FAIL line.
  • Behavior of the refactor: half_room is computed in the arm loop for Premise::Split only, as arm did before. The host and twin arms keep PlanLevers::default().
  • Tests: no assertion moved. The folder gate still misses the common-mode scale mutant (non-blocking item).
  • Gates: no band, tolerance or lint level moved in the new commits (COSINE_FLOOR 0.999 moved files unchanged).
  • Hot path: none touched. Escape catalog: no pattern matched; no shell change in the new commits.

Notes

  • No GPU evidence per CONTRIBUTING.md: the PR body has no nvidia-smi line, no commit hashes and no gate output, only a summary. The new commits changed gate code, so the earlier gate run may not cover this head.

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

… Words drops the split arm's name

Co-Authored-By: Claude Opus 5.5 <[email protected]>

@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: both earlier must-fix items are fixed in the new commit, and it adds no new defect.

Since the last review:

  • Must-fix 1 (split_at repeats header): fixed. nemotron.rs:177 and nemotron.rs:211 call model_file::header. split_at is gone.
  • Must-fix 2 (Words.split): fixed. Words::clause() takes no argument. Both gates call it (folder:261, card32:134).
  • ⚠ twin cosine: answered. The PR body now gives whole vs twin cosine 0.996097, with its conditions. The author defers the floor to a FAIL-first run with a dropped per-expert scale. That plan is sound.

Checked

  • Duplicates: 0 new items in the new commit (it only removes split_at and Words.split). Grep finds no remaining words.split or split_at( use of the removed function in gpu-gates.
  • Complexity: seat run 41→44 is unchanged from the last review and comes from branches moved into Weights. No new growth.
  • Silent failure: 1 site followed. model_file::header returns GateError with the same open {path}: {e} text, so a missing file still ends in a named error. The directory branch in header is not reached from these two calls, because Weights::open handles directories first.
  • Tests: no assertion moved or added. The ..words removal is valid because Words now has two fields, both set.
  • Gates: no band, tolerance or lint level moved.
  • Hot path: none touched. Escape catalog: no pattern matched; no shell change.

Notes

  • The PR body has no nvidia-smi line, and gives origin/main instead of the base commit hash. The gate output is abbreviated with …. This does not meet the evidence list in CONTRIBUTING.md. The new commit changed gate code, so the card run may predate it. The body does say the review fixes were rerun at head 36685c6 with rc 0.

Card check: needs-gpu. This pull request changes crates/gpu-gates/Cargo.toml, crates/gpu-gates/src/bin/bloomery_serve_qwen38.rs, crates/gpu-gates/src/bin/gate_minimaxm3_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 21c8d39 into main Oct 29, 2026
8 checks passed
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 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