Conditionally add the generation prompt to the multi-turn chat template#676
Merged
SumanthRH merged 1 commit intoNovaSky-AI:mainfrom Nov 17, 2025
Merged
Conversation
…e episode is done.
Contributor
There was a problem hiding this comment.
Code Review
This pull request correctly addresses a bug where a generation prompt was unconditionally added during multi-turn chat templating, even for completed trajectories. The change to use add_generation_prompt=not done is a clean and accurate fix. It prevents appending an unnecessary generation prompt at the end of a trajectory and makes the logic consistent with the case where there are no new observations. The change is sound and improves the correctness of the generator.
SumanthRH
approved these changes
Nov 17, 2025
li-boxuan
pushed a commit
to li-boxuan/SkyRL
that referenced
this pull request
Nov 23, 2025
…rn chat template (NovaSky-AI#676) Currently, the Generator always adds the generation prompt to the `input_ids` for multi-turn chat templating. This should only happen if the trajectory is not done.
dzorlu
pushed a commit
to fleet-ai/SkyRL
that referenced
this pull request
Feb 4, 2026
…rn chat template (NovaSky-AI#676) Currently, the Generator always adds the generation prompt to the `input_ids` for multi-turn chat templating. This should only happen if the trajectory is not done.
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.
Currently, the Generator always adds the generation prompt to the
input_idsfor multi-turn chat templating. This should only happen if the trajectory is not done.