Fix JAX 0.11.0 sharding compatibility and SFT trainer signature for Tunix integration - #4708
Merged
Merged
Conversation
RexBearIU
requested review from
A9isha,
NuojCheng,
RissyRan,
SurbhiJainUSC,
abhinavclemson,
aireenmei,
bvandermoon,
darisoy,
dipannita08,
gagika,
gobbleturk,
hengtaoguo,
huytransformer,
igorts-git,
jiangjy1982,
khatwanimohit,
richjames0,
shralex,
vipannalla and
xibinliu
as code owners
August 3, 2026 10:48
|
Caution The consumer version of Gemini Code Assist on GitHub has been sunset. All code review activity has officially ceased. |
RexBearIU
force-pushed
the
fix_tunix_sft_notebook_jax11
branch
5 times, most recently
from
August 3, 2026 10:58
9395ce8 to
b70a8d4
Compare
Codecov Report❌ Patch coverage is
📢 Thoughts on this report? Let us know! |
RexBearIU
force-pushed
the
fix_tunix_sft_notebook_jax11
branch
3 times, most recently
from
August 3, 2026 14:29
5eb3850 to
8238c69
Compare
RexBearIU
force-pushed
the
fix_tunix_sft_notebook_jax11
branch
from
August 3, 2026 15:35
8238c69 to
80e145a
Compare
RexBearIU
force-pushed
the
fix_tunix_sft_notebook_jax11
branch
from
August 3, 2026 15:36
80e145a to
b93b0e4
Compare
| "outputs": [], | ||
| "source": [ | ||
| "MODEL_NAME = \"llama3.1-8b-Instruct\"\n", | ||
| "MODEL_NAME = \"llama3.1-8b\"\n", |
Collaborator
There was a problem hiding this comment.
Why do we need to use non-instruct version?
Collaborator
Author
There was a problem hiding this comment.
We fixed this in PR #4417. We accidentally removed Instruct while testing the new dependencies.
NuojCheng
approved these changes
Aug 3, 2026
SurbhiJainUSC
approved these changes
Aug 3, 2026
4 tasks
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
This PR resolves CI notebook test failures (
maxtext_jupyter_notebooks / run) under JAX 0.11.0+ and updates SFT trainer interfaces for Tunix integration.Summary of Changes:
src/maxtext/integration/tunix/tunix_adapter.py:_compat_wscand_compat_top_kshims aroundjax.lax.with_sharding_constraintandjax.lax.top_k.AssertionError: with_sharding_constraint acts as an assert when all axes of mesh are of type ExplicitandShardingTypeErroron JAX 0.11.0+ when resharding sharded logits during vLLM decoding.src/maxtext/trainers/post_train/sft/train_sft.py:train_stepsignature to acceptgrad_accumulator: Any = None.TypeError: train_step() got an unexpected keyword argument 'grad_accumulator'when called byPeftTrainer.train.src/maxtext/examples/lora_llama3_demo.ipynb:MODEL_NAME = "llama3.1-8b"to satisfy MaxTextpyconfigPydantic model name validation schema.%%capturein Cell 18.AutoTokenizerand fallback chat template in Cell 21 whenRUN_EVALUATIONis enabled.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
lora_llama3_demo.ipynbon TPU v6e-8 using Papermill with bothRUN_EVALUATION="false"andRUN_EVALUATION="true".0and Pre/Post SFT evaluation metrics.pre-commit run --files(codespell,pylint,pyink) - 100% passed cleanly.Checklist
Before submitting this PR, please make sure (put X in square brackets):
gemini-reviewlabel.