Skip to content

Update L2Norm module to use NNX #1855

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open

Conversation

bvandermoon
Copy link
Collaborator

@bvandermoon bvandermoon commented Jun 20, 2025

Description

Update the L2Norm module to use NNX instead of Linen.

L2Norm has no dependencies/params. And only one module depends on it (Attention - and only for Llama4).

Tests

Llama4 train_compile passes:

python3 -m pytest MaxText/tests/train_compile_test.py::TrainCompile::test_moe_llama4_17b_16e

Checklist

Before submitting this PR, please make sure (put X in square brackets):

  • I have performed a self-review of my code.
  • I have necessary comments in my code, particularly in hard-to-understand areas.
  • I have run end-to-end tests tests and provided workload links above if applicable.
  • I have made or will make corresponding changes to the doc if needed.

@bvandermoon bvandermoon force-pushed the bvandermoon-nnx-dev branch from 7d4641a to c2d40fe Compare June 20, 2025 22:38
@bvandermoon bvandermoon requested a review from cgarciae June 20, 2025 22:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant