test: add numerical reference coverage for the Qwen3.5 text decoder c…#4512
Open
chloechiaw wants to merge 1 commit into
Open
test: add numerical reference coverage for the Qwen3.5 text decoder c…#4512chloechiaw wants to merge 1 commit into
chloechiaw wants to merge 1 commit into
Conversation
chloechiaw
requested review from
A9isha,
NuojCheng,
RissyRan,
SurbhiJainUSC,
abhinavclemson,
aireenmei,
bvandermoon,
darisoy,
dipannita08,
gagika,
gobbleturk,
hengtaoguo,
huytransformer,
igorts-git,
jiangjy1982,
khatwanimohit,
richjames0,
shralex,
suexu1025,
vipannalla and
xibinliu
as code owners
July 16, 2026 22:55
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.
Description
I noticed that the recent models here (DeepSeek-V4, GPT-OSS, Qwen3-Next) all have numerical
reference tests, but the Qwen3.5 text decoder added back in April 2026
never got one. The only Qwen3.5 test in MaxText repo covers the vision tower, so this is a consistency test
Since Qwen3.5 specifically stitches layers together, cause every 4th layer is a
full-attention layer and the rest are GatedDeltaNet, and
Qwen3_5ScannableBlockbuilds onefull cycle of them. That wiring had no coverage, so that's what these tests target.
The tests reuse the existing Qwen3-Next PyTorch reference layers and compare a full Qwen3.5
decoder layer against them. Test-only change — nothing in
src/changes.Tests
Adds
tests/unit/qwen3_5_vs_reference_test.pywith four tests (float32, same setup as theexisting Qwen3-Next reference test):
Run with:
All four pass on a Cloud TPU from Google TRC (
v4-8) in ~16s.Checklist
Before submitting this PR, please make sure (put X in square brackets):
gemini-reviewlabel.Please let me know if any fixes need to be made!!