Repository navigation
fix(qwen4): apr import and the CUDA loader refuse qwen4_exp by name - #7173
Merged
Merged
Conversation
…s by name Typed Qwen4ExpConfig (all new indexer_/ngram_/ple_/hc_/output_gate/mtp keys), tensor-family classifier over the real index, and a named refusal in the safetensors convert path. Metadata only; no new op implemented. Pmat-Ticket: PMAT-7169 Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
A new tests/*.rs is dark until a fragment names it. Pmat-Ticket: PMAT-7169 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
apr import mapped an unknown model_type to Auto and q/k-norm evidence then labelled it Qwen3; the CUDA loader failed with an unnamed 'missing hidden_size'. Both now refuse with the shared text (apr_format::qwen4_exp, one source). Wording: 'no tensor data was read (headers may have been parsed)'. classify_tensor split into a prefix table (cyclomatic 14 -> 6). Pmat-Ticket: PMAT-7169 Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
S1 (#7171) landed as a squash; the branch side of qwen4_exp.rs and safetensors_infer_convert.rs is S1 plus this slice, verified blob-equal. Pmat-Ticket: PMAT-7169 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
noahgift
enabled auto-merge (squash)
November 16, 2026 17:30
|
§13.11 rung 1 — quorum shadow verdict Shadow mode: this records a verdict and merges nothing. A refusal |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Follow-up to #7171 (S1 of #7169). It closes the gaps the S1 review found.
apr importnow refuses qwen4_exp. It used to map an unknownmodel_typeto Auto, and the q/k-norm tensors then pointed it at Qwen3, so it could write a mislabelled.apr. Nowrefuse_qwen4_expinimport_include_01.rsrefuses with the named message, called fromapr_import, reading onlyconfig.json. No tensor read happens and no.apris written.qwen4_exp::check_configis called by both the CPU converter andSafeTensorsCudaModel::load.crates/apr-format/src/qwen4_exp.rs. aprender-core cannot depend on aprender-serve, so both depend on apr-format. This adds anapr-formatdependency to aprender-serve and oneCargo.lockline.classify_tensor: split into a prefix table, cyclomatic 14 → 6. A new test asserts that an unknown name returnsNone, so the "every index tensor classified" test cannot pass through a catch-all.Measured (2026-11-16, head 4754355)
cargo test -p aprender-serve --lib qwen4_exp: rc 0, 7 passed.--test qwen4_exp_refusal: rc 0, 1 passed.cargo test -p apr-format --lib qwen4_exp: rc 0, 1 passed.cargo test -p aprender-core --lib qwen4_exp: rc 0, 1 passed (the import refusal). The worker also rancargo test -p aprender-core --lib importat e10490f: rc 0, 290 passed.check_configexisted.cargo clippy --lib -- -D warningson apr-format, aprender-serve and aprender-core: rc 0.cargo check -p aprender-serve --lib --features cuda: rc 0.cargo fmt --all -- --check: rc 0.scripts/check_lockfile_current.sh: PASS.Known limits
--features cudabut not run: no GPU test.tensor_names_fallbackhas no qwen4_exp row.PRE-FLIGHT
ont-delta: none (no contract or ontology source edit)
Closes #7172
Refs #7169
keep-open: #7169 Qwen 4 master; S2 per-op parity and S3 end-to-end remain
🤖 Generated with Claude Code