Add early-finalize continuation for truncated reasoning rollouts#475
Open
taivu1998 wants to merge 3 commits into
Open
Add early-finalize continuation for truncated reasoning rollouts#475taivu1998 wants to merge 3 commits into
taivu1998 wants to merge 3 commits into
Conversation
Collaborator
|
I lean towards this being implemented at the workflow level (e.g., SingleTurnWorkflowWithEarlyFinalize) instead of a global feature in rLLM. @listar2000 What do you think? |
Collaborator
|
Will take a look thx @kylemontgomery1 for pointing this to me. |
cc26d63 to
1f5ce35
Compare
Contributor
Author
|
Hi @kylemontgomery1, @listar2000, could you help review again? Thanks! |
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.
Summary
This PR adds opt-in support for early-finalizing truncated long-form generations so we can reserve answer budget inside a single completion window.
Closes #267.
What changed
max_tokens<think>...</think>blockStep.response_maskso synthetic suffix tokens remain incompletion_idsfor continuity while being excluded from Verl lossrllm.early_finalizeDesign notes
Testing
python -m pytest tests/engine/test_early_finalize.py tests/unified_trainer/test_verl_transform.py tests/rewards/test_math_reward.py -qruff check rllm/engine/rollout/rollout_engine.py rllm/engine/rollout/verl_engine.py rllm/workflows/early_finalize.py rllm/workflows/timing_mixin.py rllm/workflows/single_turn_workflow.py rllm/workflows/multi_turn_workflow.py rllm/workflows/cumulative_workflow.py rllm/agents/agent.py rllm/experimental/verl/transform.py rllm/experimental/verl/__init__.py projects/finqa/train_finqa.py tests/engine/test_early_finalize.py tests/unified_trainer/test_verl_transform.pypython -m py_compile rllm/engine/rollout/rollout_engine.py rllm/engine/rollout/verl_engine.py rllm/workflows/early_finalize.py rllm/workflows/timing_mixin.py rllm/workflows/single_turn_workflow.py rllm/workflows/multi_turn_workflow.py rllm/workflows/cumulative_workflow.py rllm/agents/agent.py rllm/experimental/verl/transform.py rllm/experimental/verl/__init__.py projects/finqa/train_finqa.py