Feat: integrate NNX LoRA support via Qwix with unified configuration#3320
Open
Feat: integrate NNX LoRA support via Qwix with unified configuration#3320
Conversation
11939f9 to
6540bc8
Compare
Codecov Report❌ Patch coverage is 📢 Thoughts on this report? Let us know! |
69e481b to
80b5592
Compare
f5a0f6d to
23e79c7
Compare
5a05148 to
7570b3d
Compare
0dfeb76 to
2f91ad8
Compare
2f91ad8 to
f5736a1
Compare
bvandermoon
reviewed
Apr 20, 2026
b747695 to
a952892
Compare
bvandermoon
reviewed
Apr 28, 2026
Collaborator
bvandermoon
left a comment
There was a problem hiding this comment.
Thank you @RexBearIU. Left some comments but this is generally looking good to me
bvandermoon
reviewed
Apr 29, 2026
bvandermoon
approved these changes
May 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
Overview
This pull request introduces native LoRA support in MaxText by leveraging the NNX model definition and the Qwix library. It enables a seamless workflow for applying LoRA adapters during
training and provides utilities for bidirectional checkpoint conversion with the HuggingFace ecosystem.
Key Changes
Tests
The Qwix-based LoRA implementation was validated through a new unit test suite and verified via a comprehensive tutorial.
Implemented tests/unit/lora_utils_test.py to ensure structural correctness and trainer compatibility. Key areas covered:
Command to run unit tests:
1 # From the maxtext root directory
2 export PYTHONPATH=$PYTHONPATH:$(pwd)/src:$(pwd)
3 python3 tests/unit/lora_utils_test.py
Logit test result
https://paste.googleplex.com/6233928391327744
Checklist
Before submitting this PR, please make sure (put X in square brackets):
gemini-reviewlabel.