feat: make max_logprobs configurable for inference engines#1357
Open
penfever wants to merge 1 commit intoNovaSky-AI:mainfrom
Open
feat: make max_logprobs configurable for inference engines#1357penfever wants to merge 1 commit intoNovaSky-AI:mainfrom
penfever wants to merge 1 commit intoNovaSky-AI:mainfrom
Conversation
The max_logprobs parameter was hardcoded to 1 (chosen-token only). Make it configurable via create_ray_wrapped_inference_engines() so callers like teacher distillation can request top-K logprobs from vLLM. Default remains 1 for backward compatibility. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Contributor
There was a problem hiding this comment.
Code Review
This pull request correctly makes the max_logprobs parameter configurable for inference engines, which is a necessary step for supporting top-K logprobs. The changes in ray_wrapped_inference_engine.py are implemented correctly. For the feature to be fully functional, other parts of the codebase not included in this PR might need adjustments. For example, the _postprocess_outputs method in vllm_engine.py seems to only extract the logprob of the chosen token, and a validation in utils.py restricts the default logprobs configuration. These are outside the scope of this PR's changes but are worth considering for the feature to work end-to-end.
4 tasks
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
max_logprobsparameter increate_ray_wrapped_inference_engines()was hardcoded to 1 (chosen-token only)Test plan
🤖 Generated with Claude Code