Support max_response_length to dynamically cap generation tokens during rollouts: - #2062
Merged
Conversation
copybara-service
Bot
requested review from
abheesht17,
hgao327,
jiangyangmu,
lc5211,
s-noghabi,
sizhit2,
tianshub and
wang2yn84
as code owners
September 1, 2026 00:12
copybara-service
Bot
force-pushed
the
test_974130640
branch
from
September 2, 2026 23:02
a643197 to
d202d2e
Compare
copybara-service
Bot
force-pushed
the
test_974130640
branch
from
September 3, 2026 04:26
d202d2e to
1fe517b
Compare
copybara-service
Bot
force-pushed
the
test_974130640
branch
from
September 3, 2026 06:37
1fe517b to
8c23c36
Compare
copybara-service
Bot
force-pushed
the
test_974130640
branch
from
September 3, 2026 07:20
8c23c36 to
a171967
Compare
copybara-service
Bot
force-pushed
the
test_974130640
branch
from
September 3, 2026 07:42
a171967 to
4eae4b1
Compare
…ng rollouts: - AlgorithmAdapter and its subclasses (GRPOAdapter, PPOAdapter) configure max_response_length (defaulting to 1024) as the single source of truth. - StandardRLProgram auto-injects max_response_length from AlgorithmAdapter into GenerationArgs so rollout workers receive the token budget without polluting engine and orchestrator dispatch signatures. - TrajectoryCollectorEngine dynamically enforces the remaining token budget across multi-turn agentic rollout turns. - GSM8K distributed recipe configures max_response_length on GRPOAdapter. - Unit tests verify dynamic multi-turn capping and budget propagation. PiperOrigin-RevId: 975570900
copybara-service
Bot
force-pushed
the
test_974130640
branch
from
September 3, 2026 08:01
4eae4b1 to
b5b364e
Compare
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.
Support max_response_length to dynamically cap generation tokens during rollouts:
max_response_length (defaulting to 1024) as the single source of truth.
GenerationArgs so rollout workers receive the token budget without polluting
engine and orchestrator dispatch signatures.
across multi-turn agentic rollout turns.