Skip to content

Commit 2ab9092

Browse files
author
nlpfollower
committed
Decode_n_tokens yield eos/eot token
1 parent 3ce9c8e commit 2ab9092

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

torchchat/generate.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -576,6 +576,7 @@ def decode_n_tokens(
576576
**sampling_kwargs,
577577
)
578578
input_pos += 1
579+
yield cur_token.clone(), next_prob.clone()
579580
break
580581

581582
if not encountered_eos:

0 commit comments

Comments
 (0)