[MaxText][RL] Omit Redundant Weight Resharding Prior to Step 0 Evaluation & Add Engram Inheritance - #4636
Draft
igorts-git wants to merge 2 commits into
Draft
[MaxText][RL] Omit Redundant Weight Resharding Prior to Step 0 Evaluation & Add Engram Inheritance#4636igorts-git wants to merge 2 commits into
igorts-git wants to merge 2 commits into
Conversation
Include Engram in RLConfig inheritance chain under the Mixture of Experts section. This ensures DeepSeek Engram configuration fields (engram_layers, engram_num_heads, engram_kernel_size, engram_seed, etc.) are properly exposed and validated when initializing RL training jobs using RLConfig, preventing AttributeError exceptions during pre-training rollouts.
…luation Remove redundant rl_cluster.rollout.update_params(nnx.state(actor_model)) call prior to step 0 pre-RL evaluation in train_rl.py. Rationale & Longevity: Actor model parameters are already synchronized with vLLM rollout engines during RLCluster setup (create_rl_components). Skipping this duplicate parameter transfer eliminates ~65s of unnecessary weight resharding latency prior to step 0 evaluation.
|
Caution The consumer version of Gemini Code Assist on GitHub has been sunset. All code review activity has officially ceased. |
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
his PR optimizes startup latency and restores evaluation stability for MaxText Reinforcement Learning (RL) post-training workloads (
train_rl.py).Key Changes
rl_cluster.rollout.update_params(nnx.state(actor_model))call prior to step 0 evaluation intrain_rl.py.RLClustersetup (create_rl_components) already synchronizes Actor model weights with vLLM engines during setup, eliminating ~65 seconds of unnecessary weight resharding latency.RLConfig: AddedEngramtoRLConfig's inheritance list insrc/maxtext/configs/types.py. Exposes sparse memory attributes (engram_layers,engram_num_heads, etc.) accessed during evaluation, preventingAttributeErrorexceptions during pre-training rollouts.Tests
Ran train_rl.py on TPU VM.
CI test.
Checklist
Before submitting this PR, please make sure (put X in square brackets):
gemini-reviewlabel.