feat: add flags for multi_round pipeline to return logprob.#993
Open
DragonFive wants to merge 2 commits intojd-opensource:mainfrom
Open
feat: add flags for multi_round pipeline to return logprob.#993DragonFive wants to merge 2 commits intojd-opensource:mainfrom
DragonFive wants to merge 2 commits intojd-opensource:mainfrom
Conversation
XuZhang99
reviewed
Mar 4, 2026
There was a problem hiding this comment.
Code Review
This pull request introduces a new flag, output_rec_logprobs, to enable the output of token-aligned log probabilities for multi-round recommendation pipelines. While the feature is a good addition, the current implementation has a couple of issues. First, it uses an incorrect default value for log probabilities in an edge case, which could lead to misleading results. Second, there is a performance concern due to inefficient token decoding within a loop. I have provided specific comments and code suggestions to address these points.
XuZhang99
approved these changes
Mar 4, 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.
PR Description
Summary
This PR adds optional REC logprob output for pure-device multi-round beam results on top of main.
Background
main already has the beam ranking order fix (descending by beam logprob).
The remaining gap was REC multi-round output logprobs in generate_multi_round_output.
What changed
Files changed
Behavior matrix
Compatibility / performance
Validation