[BugFix] Typing fixes to RequestOutput.prompt and beam search (#9473)

This commit is contained in:
Nick Hill
2024-10-18 08:19:53 +01:00
committed by GitHub
parent 944dd8edaf
commit 1ffc8a7362
4 changed files with 26 additions and 14 deletions

View File

@@ -433,6 +433,7 @@ class LLM:
for token_id, logprob_obj in logprobs.items():
new_beam = BeamSearchSequence(
tokens=current_beam.tokens + [token_id],
logprobs=current_beam.logprobs + [logprobs],
cum_logprob=current_beam.cum_logprob +
logprob_obj.logprob)