Abhinav/elastic snapshot#4449
Open
abhinavclemson wants to merge 104 commits into
Open
Conversation
…ards Currently the reward stack is hardcoded to a 3-fn list: [match_format_exactly, match_format_approximately, check_numbers]. Replacing it requires editing train_rl.py. Add two new config fields: - reward_functions_path: path to a user Python file - reward_functions: comma-separated list of function names to import When both are set, the built-in reward stack is REPLACED entirely by the user-provided functions (so users can pin a single VTC-style partial-credit reward, swap in a math_verify-based scorer, etc., without editing maxtext). Each user function must accept (prompts, completions, tmvp_config, **kwargs) and return a list of floats. Default (both empty) keeps existing behavior unchanged. Reuses `_load_custom_callable` helper added in the previous commit.
- Fixes shape mismatch issues on tail batches in GRPO training by enabling drop_remainder=True on training and test datasets. - Updates unit tests (train_rl_test.py) to mock configurations compatible with drop_remainder=True and specific batch sizes. - Prevents host CPU OOM by keeping the pool size of math_verify_pool constant. - Includes a template gpt_oss_rl.json for RL chat.
PiperOrigin-RevId: 940575479
PiperOrigin-RevId: 940703754
hlo_diff_test loaded each model yml directly as the top-level config, which skips base.yml and leaves pure_nnx at its pydantic schema default (False), so the test kept silently compiling the Linen path even after the NNX defaults were flipped to True in base.yml. Its reference HLOs are therefore still Linen. Compile via base.yml + model_name (the normal training path) so the config inherits base.yml's logical_axis_rules and exercises the NNX path. The three reference HLOs are regenerated for NNX via the Update HLO References workflow. Also flip the enable_nnx/pure_nnx/pure_nnx_decoder pydantic schema defaults to True so a config built without base.yml no longer silently falls back to the Linen path.
This avoids compilation OOM on TPU7x-8 slices by reducing the number of layers from 5 and 4 to 3. The skip guard for TPU7x is also removed.
…ences PiperOrigin-RevId: 940799947
Co-authored-by: Xibin Liu <xibin@google.com>
PiperOrigin-RevId: 941189378
…cies PiperOrigin-RevId: 941291334
PiperOrigin-RevId: 941300287
PiperOrigin-RevId: 941360042
PiperOrigin-RevId: 941363101
…-nnx-restore PiperOrigin-RevId: 941369401
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.