Fix for incorrect sequence of prompts being sent over for inference#147
Merged
ethantang-db merged 110 commits intosingle-controller-hackathonfrom Aug 14, 2025
Merged
Conversation
abaheti95
approved these changes
Aug 14, 2025
Collaborator
abaheti95
left a comment
There was a problem hiding this comment.
Awesome. This is a fine fix for now while generation per prompt <= rollouts per train actor. But, we would have to do a long term fix once we move the Rewards in the RolloutActor.
rithwik-db
approved these changes
Aug 14, 2025
Collaborator
rithwik-db
left a comment
There was a problem hiding this comment.
Left one comment, but LGTM, thanks for catching this!
bowenyang008
approved these changes
Aug 14, 2025
Collaborator
bowenyang008
left a comment
There was a problem hiding this comment.
Thanks @ethantang-db, this is great!
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.
This fixes the issue where the sequence of prompts we are sending over to vLLM is incorrect and is actually causing a scattering pattern through out its sequence wrt to the unique prompts generations where what we want is that the sequence should have the generations be grouped together for each unique prompt. This issue down the line will cause cases where certain set ups would cause the model to not train as well as this should fix the calculation for its rewards and advantage calculation.
Runs with the fix:
Single node run: https://dbc-559ffd80-2bfc.cloud.databricks.com/ml/experiments/3786561063037191/runs/6921b098214b4b0c88397c5ce0b170a2?o=7395834863327820
2 nodes run: https://dbc-559ffd80-2bfc.cloud.databricks.com/ml/experiments/3786561063037191/runs/a9a74b1a4b2a4561941513d37c305550?o=7395834863327820