Skip to content

tools: prepare dense Qwen logits and same-seat HTTP diagnostics - #254

Merged
juliankang4 merged 7 commits into
midagedev:mainfrom
Burntgogi:contribution/qwen35-dense-validation-20261015
Oct 17, 2026
Merged

juliankang4 merged 7 commits into
midagedev:mainfrom
Burntgogi:contribution/qwen35-dense-validation-20261015

Conversation

@Burntgogi

@Burntgogi Burntgogi commented Oct 15, 2026 •

Copy link
Copy Markdown
Contributor

Scope and resolved parent dependency

Diagnostics follow-up at 769749240a3da5a600944be4eee286ded9ff960e, based on main cca9beaef0180caf5fed247ac53a74617a868007.

Successor parent #339 is merged (71713898d3f94527b87af2e96aff0afe4ed1f43e). Only the original diagnostic commits (cef6606, be1393a, a67b74a) and their compatibility/documentation updates are replayed onto merged main. The parent correction and its context regression are not copied into this PR. The obsolete focused support PR juliankang4#1 is closed; the original #251 is closed. The old review head is retained on archive/dense-validation-before-current-main.

The guide now names the merged context test dense_shortage_halves_the_default_context. The parent-base/draft submission blocker is removed; this is ready for code review, not NVIDIA acceptance.

Behavior

  • generate_qwen3moe --logit-rows FILE uses the existing native generation loop and shared LE row writer, not an alternate engine.
  • Independent official llama.cpp reference writer; immutable source/model/input/build/library/output identities and complete, finite rows.
  • Existing Qwen seat/Session CLI/HTTP diagnostics, including short/4K input, reset/edited-prefix and optional resident-overlap paths.
  • Native build includes the current EmbeddingGemma side seat. No engine bands, MTP/media guards, model admission or serving policy are weakened.

Exercised final-source and integration evidence

  • Default host library in final integration c5e2e1e: 124 passed, 3 ignored.
  • Both diagnostic script self-tests pass: malformed/identity/truncated/NaN rows, eager/graph comparison, owned-session cleanup, strict HTTP/token/reset/resident contracts.
  • Review correction at 7697492: the duplicate-metadata fixture is otherwise valid. Removing only production duplicate detection wrongly left the old test green (exit 0); the repaired test fails at accepted duplicate metadata (exit 1). Both unmutated script self-tests pass.
  • Final integration's workspace/all-targets and all-feature GPU-test metadata checks pass, including the actual generation CLI and server. These do not generate or run CUDA device code.
  • Official llama.cpp rebuilt at fb4b2737a808a3fb7c2117a498f43815dc9be53e; the independent C++ harness builds with warnings denied.
  • Fresh exact-head CPU-only 0.8B step and batch captures each contain three complete rows. Finite/shape/identity comparison passes. They are not bitwise equal; the result explicitly remains diagnostic_only_no_numeric_band, not an accuracy-gate PASS.

Two independent current-main compilation regressions are isolated as #370 (split-prefill first-key argument) and #372 (the merged Card API's dense-refusal/test callers), not mixed into this diagnostics diff. Final integration c5e2e1e incorporates merged main e195c9e, both fixes and the repaired metadata fixture; formatting, workspace/all-targets, all-feature GPU-test metadata, both diagnostic self-tests and recipe derivation pass. Earlier integration 3498be4 also passes the full recipe suite: 784 card tests, 61 tool self-tests and ownership checks for 2,717 tests.

Unrun NVIDIA acceptance

27B native eager-vs-graph/reference, actual CUDA context regression and native/HTTP serving acceptance are not run. Local hardware is RX7900GRE; there is no configured remote GPU host, and the actual default ws destination fails hostname resolution. Please run the agreed A6000 lane using the exact source/model/input identities and commands in docs/contrib/qwen35-dense-validation.md. No whole-model AMD support, numerical-band or timing result is claimed.

Immutable evidence

Final-head build record, raw CPU bundles and comparison · duplicate-metadata mutation output · combined source refs, final checks and external prerequisites.

@github-actions github-actions Bot added documentation Improvements or additions to documentation gpu The card engine: crates/gpu*, crates/app 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 15, 2026
@Burntgogi
Burntgogi force-pushed the contribution/qwen35-dense-validation-20261015 branch from 9c5b3a5 to 4bd0784 Compare October 15, 2026 07:28
@Burntgogi
Burntgogi force-pushed the contribution/qwen35-dense-validation-20261015 branch from 4bd0784 to a67b74a Compare October 15, 2026 08:24
@Burntgogi
Burntgogi force-pushed the contribution/qwen35-dense-validation-20261015 branch from a67b74a to affc216 Compare October 16, 2026 19:38
@Burntgogi

Copy link
Copy Markdown
Contributor Author

Refreshed to affc216 on the corrected current-main #339 parent; original head preserved on archive/dense-validation-before-20261016. Parent correction is juliankang4#1, not a duplicate frontend PR. Exact-head 0.8B CPU step/batch reference captures completed; they are diagnostics, not 27B/NVIDIA acceptance. Draft remains honestly blocked on corrected #339 landing (or an upstream integration base) and the agreed A6000 validation lane.

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.
@Burntgogi
Burntgogi force-pushed the contribution/qwen35-dense-validation-20261015 branch from affc216 to efdc55d Compare October 16, 2026 20:27
@Burntgogi
Burntgogi marked this pull request as ready for review October 16, 2026 20:36

@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 duplicate-metadata self-test stays green when duplicate detection is removed.

Must fix

1. Make the duplicate-metadata fixture otherwise valid

tools/ref/dense-logits.py:588 Removing or pair[0] in fields from read_meta() leaves this test green: missing dtype triggers a different ValueError. An in-memory mutation check confirmed this.
Repair the fixture now so a later duplicate-key regression turns the test red. Replace its write with:

        meta.write_text("format\tbloomery-forced-logits-v1\nformat\tbloomery-forced-logits-v1\ndtype\tfloat32-le\nlast_step\ttrue\ncomplete\ttrue\n")

Checked

Duplicates: no duplicate finding remains.
Complexity: diagnostics report run 164→176 and run_arm 35→46; these are aiming signals, not findings.
Silent failure: read_meta() rejects malformed or duplicate keys, unsupported formats and incomplete rows; the fixture masks which rejection fired.
Tests: isolated mutation confirms the original fixture masks missing duplicate detection. The replacement exposes that mutant, parses as Python and sits on an added line.
Gates: no CUDA gates run by the validator; the PR disclaims NVIDIA acceptance.
Escape catalog: no C1–C4 pattern applies to these findings.

Notes

dryer did not run; its stated reason conflicts with the changed Rust paths.
Full self-tests, builds and CUDA gates were not run in this review. The PR explicitly lacks NVIDIA acceptance evidence.

Card check: needs-gpu. This pull request changes crates/gpu-gates/src/bin/generate_qwen3moe.rs, crates/gpu-gates/src/generate.rs, crates/gpu-gates/src/lib.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)

Filed outside this PR: #373

Comment thread tools/ref/dense-logits.py Outdated
except ValueError:
pass
meta = root / "raw.meta"
meta.write_text("format\tbloomery-forced-logits-v1\nformat\tbloomery-forced-logits-v1\n")

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.

Make the fixture otherwise valid so removing duplicate-key detection fails this test.

Suggested change
meta.write_text("format\tbloomery-forced-logits-v1\nformat\tbloomery-forced-logits-v1\n")
meta.write_text("format\tbloomery-forced-logits-v1\nformat\tbloomery-forced-logits-v1\ndtype\tfloat32-le\nlast_step\ttrue\ncomplete\ttrue\n")

@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.

Since the last review: must-fix 1 is fixed at tools/ref/dense-logits.py:588. The fixture includes valid dtype and completion markers.

Verdict: CLEAN: The repaired fixture detects removal of duplicate-key validation; the incremental changes introduce no finding.

Checked

Duplicates: no new functions, types or constants in this increment.
Complexity: no function control flow changes in this increment.
Silent failure: 1 metadata rejection path followed; duplicate keys raise a named ValueError.
Tests: isolated execution of the changed fixture passes. Removing the duplicate guard at production line 272 makes its assertion fail. Unique-key metadata passes; duplicate dtype and completion keys and missing completion markers are rejected.
Gates: no thresholds, pins or cases removed or relaxed.
Escape catalog: no C1–C4 pattern matches the incremental diff.

Notes

Full script self-tests and CUDA gates were not run during validation. The PR reports no NVIDIA acceptance run.

Card check: needs-gpu. This pull request changes crates/gpu-gates/src/bin/generate_qwen3moe.rs, crates/gpu-gates/src/generate.rs, crates/gpu-gates/src/lib.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)

@Burntgogi

Copy link
Copy Markdown
Contributor Author

Addressed the duplicate-metadata MUST_FIX in 769749240a3da5a600944be4eee286ded9ff960e.

The existing fixture now has valid format, dtype, last_step and complete fields; the duplicate format key is its only defect. The documented sidecar contract explicitly requires unique keys. No production comparison rule, band or model admission was changed.

Actual complete-self-test mutation proof (only or pair[0] in fields removed in memory):

  • Before fixture repair: exit 0, incorrectly green.
  • On repaired source: exit 1 with AssertionError: accepted duplicate metadata.
  • With the production duplicate check intact: both diagnostic self-tests pass.

Fresh real reference captures at exact head 7697492: official llama.cpp CPU step and batch each finish three rows; finite/shape/identity checks pass. They are not bitwise equal and remain explicitly diagnostic-only, not numerical acceptance.

Final integration c5e2e1e includes the updated fixture and isolated current-main compile repairs #370/#372: format, workspace/all-targets, all-feature GPU-test metadata, 124 default host-library tests (3 ignored), both diagnostic self-tests and recipe derivation pass. This is not CUDA execution. NVIDIA native/27B and serving acceptance remain unrun.

Immutable mutation output, raw CPU bundles and complete final integration log:
https://github.com/Burntgogi/bloomery/tree/036c69c9052f7a345d0e44ee812738ed42bf54ff/docs/contrib/evidence/native-roadmap-20261015/refresh-20261016

The latest formal changes-requested review targets the older efdc55d head; the correction and executable mutation evidence above are ready for re-review. The separate pre-existing forced_probe report #373 remains outside this diagnostics patch.

@juliankang4
juliankang4 merged commit 0248388 into midagedev:main Oct 17, 2026
7 checks passed
@juliankang4

Copy link
Copy Markdown
Collaborator

@Burntgogi Thanks for the contribution. The review is done, so I'm merging this.

midagedev added a commit that referenced this pull request Oct 19, 2026
…d its writer

dense_logits_ref (#254) becomes the family's one writer: its manifest carries the model, build and arch lines and a
trailer, and the qwen35 profile's mainline tree builds it. just dump-logits-qwen38d writes the p64 and p4096 sets
(32 teacher-forced rows each) on the A6000, and --cpu-twin writes each set's CPU twin, the floor a gate's band is
derived from (dense-logits.py floor). The corpus is the qwen35 one: the 27B's token table is the same.

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 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.

2 participants