[Performance] Optimize get_seqs (#7051)

This commit is contained in:
Woosuk Kwon
2024-08-01 18:29:52 -07:00
committed by GitHub
parent 6a11fdfbb8
commit 6ce01f3066
3 changed files with 22 additions and 22 deletions
+1 -1
View File
@@ -40,7 +40,7 @@ class Detokenizer:
assert prms is not None
# We can pick any sequence for the prompt.
seq = next(iter(seq_group.seqs_dict.values()))
seq = seq_group.get_seqs()[0]
# Only prompt, without the generated token.
all_token_ids = seq.get_token_ids()
prompt_token_ids = all_token_ids[:-1]