Repository navigation
feat(qwen4): gated norm, n-gram embedding and PLE match the transformers reference - #7177
Merged
Merged
Conversation
…ormers reference Per-op goldens (indexer, indexed attention, n-gram, PLE, hc residual, output gate) dumped from the HF reference at a pinned sha with tiny seeded weights. MTP has no reference implementation at that sha; see MANIFEST.md. Pmat-Ticket: PMAT-7175 Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…in MANIFEST Re-seed the indexer/attention goldens so the k-th and (k+1)-th block scores differ by >= 1e-3 on every row (generator asserts it), dump the attention's own selection mask, and inline the plain-math op descriptions without private paths. Pmat-Ticket: PMAT-7175 Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Pmat-Ticket: PMAT-7175 Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…rs reference Pmat-Ticket: PMAT-7175 Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
|
§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
Three qwen4_exp ops: the gated RMSNorm with sigmoid output gate, the n-gram hashed embedding, and the per-layer embedding (PLE) with its dilated causal conv, in
crates/aprender-serve/src/qwen4_exp_embed.rs(pure fp32 CPU, no unsafe, no unwrap). The parity tests incrates/aprender-serve/tests/qwen4_exp_embed_parity.rscheck them against the transformers-reference goldens from #7176. Measured max-abs error: output gate 1.5e-8, ngram 0 (hashed ids exact), PLE 2.4e-7. Each op was RED first, with zero-returning stubs.The test is wired into CI by
ci/explicit-test-commands.d/876-aprender-serve-qwen4-exp-embed-parity.cmd, andscripts/tree_reader_tests.txtis regenerated (check_explicit_test_commands.shandcheck_tree_reader_tests.shboth rc 0).Stacked on #7176 (goldens). Until that merges, this diff also shows its two commits.
PRE-FLIGHT
ont-delta: none
Refs #7175
Refs #7169
keep-open: #7175 S2 closes when both op PRs and the MTP decision land; #7169 Qwen 4 master
🤖 Generated with Claude Code