[NNX] Delete Linen (12.1c): collapse dispatch in quantization and model creation - #4685
Open
ecnal-cienet wants to merge 1 commit into
Open
Conversation
|
Caution The consumer version of Gemini Code Assist on GitHub has been sunset. All code review activity has officially ceased. |
feat/nnx-del-linen-pretrain-quant (base: feat/nnx-del-linen-pretrain-sharding-opt
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
ecnal-cienet
force-pushed
the
feat/nnx-del-linen-pretrain-quant
branch
4 times, most recently
from
August 20, 2026 21:38
87c0371 to
125109f
Compare
ecnal-cienet
changed the base branch from
main
to
feat/nnx-del-linen-pretrain-sharding-opt
August 24, 2026 20:10
ecnal-cienet
marked this pull request as ready for review
August 24, 2026 20:15
ecnal-cienet
requested review from
A9isha,
NuojCheng,
RissyRan,
SurbhiJainUSC,
abhinavclemson,
aireenmei,
bvandermoon,
darisoy,
gagika,
gobbleturk,
hengtaoguo,
igorts-git,
jiangjy1982,
jshin1394,
khatwanimohit,
liudangyi,
richjames0,
shralex,
shuningjin,
vipannalla and
zxhe-sean
August 24, 2026 20:15
ecnal-cienet
force-pushed
the
feat/nnx-del-linen-pretrain-sharding-opt
branch
from
August 25, 2026 18:38
0279059 to
89897a7
Compare
ecnal-cienet
force-pushed
the
feat/nnx-del-linen-pretrain-quant
branch
from
August 25, 2026 18:38
125109f to
df096b4
Compare
ecnal-cienet
force-pushed
the
feat/nnx-del-linen-pretrain-sharding-opt
branch
from
August 31, 2026 14:13
89897a7 to
b51c644
Compare
ecnal-cienet
force-pushed
the
feat/nnx-del-linen-pretrain-quant
branch
from
August 31, 2026 14:13
df096b4 to
d482492
Compare
… and model creation - quantizations.maybe_quantize_model always runs the qwix forward pass with the dummy tokens/positions/segment ids (and the MTP decoder targets when mtp_num_layers > 0), then pops the transient nnx.Intermediate variables the traced forward sows. - model_creation_utils.from_pretrained always builds the sharded model through maxtext_utils_nnx.create_nnx_sharded_model. Tests follow: quantizations_test and nnx_quant_guard_test drop their flag arguments and Linen expectations, correctness_tests_nnx_dispatch_test keeps only the NNX case, and forward_pass_logit_checker always loads via from_pretrained.
ecnal-cienet
force-pushed
the
feat/nnx-del-linen-pretrain-sharding-opt
branch
from
August 31, 2026 15:00
b51c644 to
dd76238
Compare
ecnal-cienet
force-pushed
the
feat/nnx-del-linen-pretrain-quant
branch
from
August 31, 2026 15:00
d482492 to
7da8b8a
Compare
bvandermoon
approved these changes
Sep 5, 2026
NuojCheng
approved these changes
Sep 5, 2026
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
Start with a short description of what the PR does and how this is a change from
the past.
The rest of the description includes relevant details and context, examples:
If the change fixes a bug or a Github issue, please include a link, e.g.,:
FIXES: b/123456
FIXES: #123456
You can also provide a comma-separated list. If you don't want to close a bug but
simply to reference it, use BUGS, e.g.:
BUGS: b/123456
Notice 1: Once all tests pass, the "pull ready" label will automatically be assigned.
This label is used for administrative purposes. Please do not add it manually.
Notice 2: For external contributions, our settings currently require an approval from a MaxText maintainer to trigger CI tests.
Tests
Please describe how you tested this change, and include any instructions and/or
commands to reproduce.
Checklist
Before submitting this PR, please make sure (put X in square brackets):
gemini-reviewlabel.