Skip to content

Commit e63fd44

Browse files
authored
Fix: Correctly filter special tokens in benchmark_prefix_caching (vllm-project#28615)
Signed-off-by: Di Wu <[email protected]>
1 parent 11ac9dd commit e63fd44

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

benchmarks/benchmark_prefix_caching.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ def sample_tokens(tokenizer: PreTrainedTokenizerBase, length: int) -> list[int]:
6969

7070
# Remove the special tokens.
7171
return random.choices(
72-
[v for k, v in vocab.items() if k not in all_special_ids],
72+
[v for v in vocab.values() if v not in all_special_ids],
7373
k=length,
7474
)
7575

0 commit comments

Comments
 (0)