Skip to content

Conversation

@NickLucche
Copy link
Collaborator

Small optimization to skip redundant detokenization step when token_id is instead requested.

Signed-off-by: NickLucche <[email protected]>
@NickLucche NickLucche requested a review from aarnphm as a code owner September 4, 2025 09:07
@mergify mergify bot added the frontend label Sep 4, 2025
Copy link
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request introduces a small but effective optimization in the _create_chat_logprobs method. By checking whether the output format should be a token ID before decoding the token, it avoids an unnecessary and potentially expensive tokenizer.decode() call. The change is correct, well-contained, and improves efficiency. I have no further comments.

@simon-mo simon-mo enabled auto-merge (squash) September 4, 2025 21:14
@github-actions github-actions bot added the ready ONLY add when PR is ready to merge/full CI is needed label Sep 4, 2025
@simon-mo simon-mo merged commit 65e0389 into vllm-project:main Sep 4, 2025
50 checks passed
eicherseiji pushed a commit to eicherseiji/vllm that referenced this pull request Sep 9, 2025
skyloevil pushed a commit to skyloevil/vllm that referenced this pull request Sep 13, 2025
FeiDaLI pushed a commit to FeiDaLI/vllm that referenced this pull request Sep 25, 2025
xuebwang-amd pushed a commit to xuebwang-amd/vllm that referenced this pull request Oct 10, 2025
Aristotle-111816 pushed a commit to Aristotle-111816/vllm that referenced this pull request Oct 21, 2025
xuebwang-amd pushed a commit to xuebwang-amd/vllm that referenced this pull request Oct 24, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

frontend ready ONLY add when PR is ready to merge/full CI is needed

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants