Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions vllm/entrypoints/generate/beam_search/online.py
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,11 @@ async def beam_search(
logprobs=logprobs_num,
max_tokens=1,
temperature=temperature,
# Beam search ranks candidates by logprob and detokenizes the final
# sequences itself (see ``tokenizer.decode`` below), so the engine's
# per-step detokenization of all ``2 * beam_width`` logprob token ids
# is pure overhead -- O(beam_width) wasted decodes every step. Skip it.
detokenize=False,
)
all_beams = [
BeamSearchSequence(
Expand Down
Loading