LLM: fix inconsistency between output token number and max_new_token (#8479)
This commit is contained in:
parent
bcc1eae322
commit
d489775d2c
1 changed files with 1 additions and 1 deletions
|
|
@ -164,7 +164,7 @@ class GenerationMixin:
|
|||
res_list = []
|
||||
word_count = 0
|
||||
for token in tokens:
|
||||
if word_count > max_new_tokens:
|
||||
if word_count >= max_new_tokens:
|
||||
break
|
||||
res_list.append(token)
|
||||
word_count += 1
|
||||
|
|
|
|||
Loading…
Reference in a new issue