Remove deprecated prompt_token_ids wrapping in vLLM backend#1191
Open
sihyeonn wants to merge 1 commit intohuggingface:mainfrom
Open
Remove deprecated prompt_token_ids wrapping in vLLM backend#1191sihyeonn wants to merge 1 commit intohuggingface:mainfrom
sihyeonn wants to merge 1 commit intohuggingface:mainfrom
Conversation
vLLM's PromptType natively accepts list[int] as a valid input since
v0.10.2 (see vllm-project/vllm DecoderOnlyPrompt type definition),
so wrapping token IDs in {"prompt_token_ids": ...} dicts or internal
TokenInputs objects is unnecessary.
This is a follow-up cleanup to PR huggingface#1173 which upgraded vllm to >=0.11.0
but left some deprecated patterns behind.
Relates to huggingface#1002
Signed-off-by: Sihyeon Jang <sihyeon.jang@navercorp.com>
This was referenced Mar 18, 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.
Context
Follow-up to #1173 which upgraded vLLM to
>=0.11.0. A few call sites still used the oldprompt_token_idswrapping patterns that are no longer needed.Relates to #1002
What changed
vLLM's
PromptTypeincludeslist[int]directly inDecoderOnlyPrompt, so we can pass token ID lists toLLM.generate()without any wrapping:Removed:
{"prompt_token_ids": ...}dict wrapping in the ray data-parallel path (vllm_model.py)TokenInputs(prompt_token_ids=...)wrapping + its import in the single-GPU path (vllm_model.py){"prompt_token_ids": ...}dict wrapping in the LLM-as-judge vLLM path (llm_as_judge.py)Now all three call sites just pass
list[list[int]]directly, which is simpler and works across vLLM 0.11 through 0.17+.Test plan
list[int]is a validPromptTypefrom 0.10.2 onwards