Skip to content

Commit 53a1004

Browse files
nlpfollowernlpfollowerJack-Khuu
authored
Decode_n_tokens yield eos/eot token (#1474)
Co-authored-by: nlpfollower <[email protected]> Co-authored-by: Jack-Khuu <[email protected]>
1 parent 083fdaf commit 53a1004

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)