[gkd] support buffers & fix some bugs#9278
Merged
Merged
Conversation
Contributor
There was a problem hiding this comment.
Code Review
This pull request refactors and standardizes the handling of generation batch parameters across GRPO and GKD trainers by centralizing logic in a shared mixin. Key improvements include the implementation of buffered inputs for GKD to allow sample reuse across training steps and the addition of multimodal support for fetching teacher logprobs via an external API. Feedback focuses on improving debuggability by recommending that the code log warnings when falling back to raw images during multimodal encoding or when retrying API requests without specific processor arguments.
Jintao-Huang
approved these changes
May 7, 2026
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.
1、Support rollout buffers to enable sampling multiple batches of data in a single generation pass (generation_batch_size / steps_per_generation)
2、Fix compatibility issue between GKD and padding_free
3、Fix the bug in GKD multimodal inference when calling the vLLM server API #9222