Repository navigation
[NNX] Delete Linen 5/5: remove the pure_nnx / enable_nnx / pure_nnx_decoder config flags - #4361
Merged
Merged
Conversation
Codecov Report❌ Patch coverage is 📢 Thoughts on this report? Let us know! |
ecnal-cienet
force-pushed
the
feat/nnx-del-linen-5-flags
branch
2 times, most recently
from
July 7, 2026 21:00
d294837 to
75fb598
Compare
ecnal-cienet
force-pushed
the
feat/nnx-del-linen-5-flags
branch
7 times, most recently
from
July 21, 2026 19:11
b5d2940 to
511d13a
Compare
ecnal-cienet
force-pushed
the
feat/nnx-del-linen-5-flags
branch
6 times, most recently
from
July 29, 2026 14:48
1e6f41e to
83d2308
Compare
ecnal-cienet
force-pushed
the
feat/nnx-del-linen-5-flags
branch
4 times, most recently
from
August 20, 2026 21:38
8c1f026 to
7e9cd77
Compare
ecnal-cienet
force-pushed
the
feat/nnx-del-linen-5-flags
branch
5 times, most recently
from
August 31, 2026 21:18
ce61748 to
6c3c9b6
Compare
ecnal-cienet
force-pushed
the
feat/nnx-del-linen-5-flags
branch
2 times, most recently
from
September 8, 2026 22:20
28a7c2b to
8dbdd97
Compare
ecnal-cienet
changed the base branch from
main
to
feat/nnx-del-linen-4-layers
September 8, 2026 23:07
ecnal-cienet
force-pushed
the
feat/nnx-del-linen-4-layers
branch
from
September 8, 2026 23:10
a4835ed to
e93ede5
Compare
ecnal-cienet
force-pushed
the
feat/nnx-del-linen-5-flags
branch
from
September 8, 2026 23:10
8dbdd97 to
e84b113
Compare
ecnal-cienet
force-pushed
the
feat/nnx-del-linen-5-flags
branch
from
September 10, 2026 16:41
97d87ec to
bbb843f
Compare
ecnal-cienet
marked this pull request as ready for review
September 10, 2026 18:45
ecnal-cienet
requested review from
A9isha,
Lumosis,
NuojCheng,
RissyRan,
SurbhiJainUSC,
aireenmei,
bvandermoon,
darisoy,
gagika,
gobbleturk,
gpolovets1,
igorts-git,
jacoguzo,
jiangjy1982,
jrplatin,
mailvijayasingh,
mitalisi,
parambole,
patemotter,
richjames0,
shralex,
shuningjin,
vipannalla and
xibinliu
as code owners
September 10, 2026 18:45
bvandermoon
approved these changes
Sep 10, 2026
hengtaoguo
approved these changes
Sep 10, 2026
4 tasks done
4 tasks done
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.
NNX Migration Route Map
pure_nnxflag,init_state_fn,TrainStateNNX, NNX utils. Linen workflow unchanged. (PR NNX migration prep (1/N): pure_nnx flag and init_state_fn scaffolding #3427)get_abstract_state_nnx,get_named_sharding_nnx,set_named_sharding_nnx,get_partition_spec_nnx,get_mesh_from_config. (PR NNX migration prep (2/N): NNX utils and sharding utilities #3470)TrainStateNNX, model creation, gradient accumulation, checkpointing, and training loop dispatch. (PR NNX migration prep (3/N): TrainState, model creation, and end-to-end training loop #3500)9.5. ✅ NNX + AQT in MaxEngine + serve-mode reload + gpt3 prefill fix. (PR [NNX] NNX migration prep (9.5/N): NNX + AQT in MaxEngine + serve-mode reload + gpt3 prefill fix #3844)
custom_vjpfor NNX.True; regenerate sharding goldens; flip back integration-testpure_nnx=Falseannotations. (PR [NNX] NNX migration (11/N): set pure_nnx / enable_nnx / pure_nnx_decoder defaults to True #3526)12.1. ✅ Collapse Linen dispatch in utils / quantization / checkpointing / sharding. (PR [NNX] Delete Linen 1/5: collapse dispatch in utils, quantization, checkpointing, sharding #4357)
12.2. ✅ Collapse Linen dispatch in trainers (pre-train, DiLoCo, GRPO); regenerate the NNX DPO golden. (PR [NNX] Delete Linen 2/5: collapse dispatch in trainers (pre-train, DiLoCo, GRPO) #4358)
12.3. ✅ Collapse Linen dispatch in inference (maxengine, kvcache, vLLM, LoRA). (PR [NNX] Delete Linen 3/5: collapse dispatch in inference (maxengine, kvcache, vLLM, LoRA) #4359)
12.4. ✅ Delete the Linen decoder/attention/embedding layers +
*_as_linenmodel wrappers. (PR [NNX] Delete Linen 4/5: remove the Linen decoder/attention layers and *_as_linen model wrappers #4360)12.5. 🔄 [This PR] Remove the
pure_nnx/enable_nnx/pure_nnx_decoderflags fromtypes.py(Fields + dead qwix validator),base.yml,inference/vllm.yml, the distillation configs, andpyconfig_deprecated.py, plus doc/notebook/script mentions. No source or test reads the flags anymore; config init succeeds with them absent. Completes the Linen deletion (≈ −5.3k lines across the series); the original single-branch PR [NNX] NNX migration (12/N): delete Linen code paths, classes, and NNX compatibility flags #4038 can be closed. Stacks on 12.4.Description
Final PR of the stacked "Delete Linen" series (see 1/5). With every read gone after 1–4, this removes the three migration flags —
pure_nnx,enable_nnx,pure_nnx_decoder— fromtypes.py(theFields plus the now-dead qwix validator),base.yml,inference/vllm.yml, the distillation configs, andpyconfig_deprecated.py, and clears the remaining mentions in the docs, the LoRA demo notebook, and the distillation / gemma3-LoRA shell scripts.Nothing reads the flags anymore (
grep -rE 'pure_nnx|enable_nnx|pure_nnx_decoder' src/ tests/, excludingreference_hlo, is empty), and config init succeeds with them absent, including underuse_qwix_quantization=True. After this the Linen deletion is complete — roughly −5.3k lines across the series — and the original single-branch PR #4038 can be closed. Base branch isfeat/nnx-del-linen-4-layers. ~14 files, +9 / −54.Checklist
Before submitting this PR, please make sure (put X in square brackets):
gemini-reviewlabel.