[SkyRL][train] Support prompt_logprobs in /sample in the new inference stack#1417
Open
nithinvc wants to merge 6 commits intoNovaSky-AI:mainfrom
Open
[SkyRL][train] Support prompt_logprobs in /sample in the new inference stack#1417nithinvc wants to merge 6 commits intoNovaSky-AI:mainfrom
nithinvc wants to merge 6 commits intoNovaSky-AI:mainfrom
Conversation
…client.py Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
…client.py Co-authored-by: devin-ai-integration[bot] <158243242+devin-ai-integration[bot]@users.noreply.github.com>
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
This PR addresses #1416 and adds prompt log probabilities to the new
/sampleendpoint in the new remote inference client.prompt_logprobsandtopk_prompt_logprobssupport toRemoteInferenceClient.sample(), wiring through to vLLM's/inference/v1/generateendpointinclude_prompt_logprobs(bool) andtopk_prompt_logprobs(int) from the request body, with fallback toprompt_logprobsfor TinkerSampleRequestcompatibilityTest plan
test_sample— verifiesinclude_prompt_logprobs=Truereturns per-token logprobs with correct valuestest_sample_n2— verifies prompt logprobs work withn=2test_sample_topk_prompt_logprobs— verifiestopk_prompt_logprobs=2returns both fields with correct(token_id, logprob)valuestest_client_sample— verifies vLLM returns prompt logprobs (non-positive floats)test_client_sample_multiple— verifies prompt logprobs withn=3test_client_sample_topk_prompt_logprobs— verifies that the vLLM top-k tuples contain the actual prompt token