Skip to content

Conversation

@kouroshHakha
Copy link
Collaborator

_generate_exact_length_tokens returns both tokens and mismatch number. The benchmark script has not been update to conform to this change.

Signed-off-by: Kourosh Hakhamaneshi <[email protected]>
@kouroshHakha kouroshHakha added the ready ONLY add when PR is ready to merge/full CI is needed label Oct 14, 2025
@kouroshHakha kouroshHakha changed the title [Bugfix] Fixes prefix-repetion benchmark script [Bugfix] Fixes prefix-repetition benchmark script Oct 14, 2025
@mergify mergify bot added the performance Performance-related issues label Oct 14, 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 addresses a bug in the prefix-repetition benchmark script where the return value of _generate_exact_length_tokens was not being handled correctly. The function returns both tokens and a mismatch count, but the original code failed to unpack this tuple for prefix tokens, leading to incorrect behavior. This change correctly unpacks the tuple for both prefix and suffix tokens and accumulates the mismatch counts. The fix also corrects a typo in a variable name (token_mistmatch to suffix_mismatch), improving code clarity. The changes are correct and effectively resolve the bug.

@ruisearch42 ruisearch42 enabled auto-merge (squash) October 14, 2025 17:37
@ruisearch42 ruisearch42 merged commit a2986b3 into vllm-project:main Oct 15, 2025
50 of 51 checks passed
bbartels pushed a commit to bbartels/vllm that referenced this pull request Oct 16, 2025
sducouedic pushed a commit to sducouedic/vllm that referenced this pull request Oct 16, 2025
lywa1998 pushed a commit to lywa1998/vllm that referenced this pull request Oct 20, 2025
alhridoy pushed a commit to alhridoy/vllm that referenced this pull request Oct 24, 2025
xuebwang-amd pushed a commit to xuebwang-amd/vllm that referenced this pull request Oct 24, 2025
xuebwang-amd pushed a commit to xuebwang-amd/vllm that referenced this pull request Oct 24, 2025
0xrushi pushed a commit to 0xrushi/vllm that referenced this pull request Oct 26, 2025
0xrushi pushed a commit to 0xrushi/vllm that referenced this pull request Oct 26, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

performance Performance-related issues 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