Skip to content

Commit

Permalink
Decode_n_tokens yield eos/eot token
Browse files Browse the repository at this point in the history
  • Loading branch information
nlpfollower committed Jan 23, 2025
1 parent 3ce9c8e commit 2ab9092
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions torchchat/generate.py
Original file line number Diff line number Diff line change
Expand Up @@ -576,6 +576,7 @@ def decode_n_tokens(
**sampling_kwargs,
)
input_pos += 1
yield cur_token.clone(), next_prob.clone()
break

if not encountered_eos:
Expand Down

0 comments on commit 2ab9092

Please sign in to comment.