Split logical rule for eval from for train#4523
Open
NuojCheng wants to merge 1 commit into
Open
Conversation
|
Caution The consumer version of Gemini Code Assist on GitHub has been sunset. All code review activity has officially ceased. |
Codecov Report❌ Patch coverage is
📢 Thoughts on this report? Let us know! |
NuojCheng
force-pushed
the
chengnuojin-train-eval-mesh
branch
2 times, most recently
from
July 17, 2026 22:10
2c5a47d to
1972c3b
Compare
NuojCheng
force-pushed
the
chengnuojin-train-eval-mesh
branch
from
July 17, 2026 22:17
1972c3b to
7e78b58
Compare
NuojCheng
marked this pull request as ready for review
July 17, 2026 23:01
NuojCheng
requested review from
RissyRan,
gagika,
michelle-yooh,
richjames0,
shralex and
suexu1025
as code owners
July 17, 2026 23:01
|
Caution The consumer version of Gemini Code Assist on GitHub has been sunset. All code review activity has officially ceased. |
NuojCheng
requested review from
A9isha,
SurbhiJainUSC,
abhinavclemson,
aireenmei,
bvandermoon,
darisoy,
gobbleturk,
hengtaoguo,
huytransformer,
igorts-git,
jiangjy1982,
khatwanimohit,
parambole,
shuningjin,
vipannalla and
xibinliu
as code owners
July 17, 2026 23:01
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
We might want different sharding logical rule for eval compared with train, since the global train batch size and eval batch size are different. This PR enables this feature by introducing two new flags:
custom_mesh_and_rule_for_evallogical_axis_rules_for_evalWhen
custom_mesh_and_rule_for_evalis specified (non-default value), an alternative logical rule is used for the eval pipeline. A typical use case would be using fractional batch size for eval, so that CP/TP like shardings are enabled (only for eval). Same axis is used as other shardings, e.g. FSDP/EP, for the train step.Currently, we still use the same mesh for both train and eval steps. A potential future optimization would be split the meshes for train and eval, which is in theory possible since train and eval functions are in different jit.It may required careful checks.
FIXES: b/535639231
Tests
Run on v5p-8: we use FSDP+EP for train step, and EP-as-CP custom rule for eval,
log
xprof
Checklist
Before submitting this PR, please make sure (put X in square brackets):
gemini-reviewlabel.