Skip to content

Support max_response_length to dynamically cap generation tokens during rollouts: - #2062

Merged
copybara-service[bot] merged 1 commit into
mainfrom
test_974130640
Sep 3, 2026
Merged

Support max_response_length to dynamically cap generation tokens during rollouts:#2062
copybara-service[bot] merged 1 commit into
mainfrom
test_974130640

Conversation

@copybara-service

@copybara-service copybara-service Bot commented Sep 1, 2026

Copy link
Copy Markdown

Support max_response_length to dynamically cap generation tokens during 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.

@copybara-service copybara-service Bot changed the title Support max_response_length to dynamically cap generation tokens during rollouts. Support max_response_length to dynamically cap generation tokens during rollouts: Sep 3, 2026
…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
copybara-service Bot merged commit b5b364e into main Sep 3, 2026
3 checks passed
@copybara-service
copybara-service Bot deleted the test_974130640 branch September 3, 2026 08:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants