mirror of
https://github.com/huggingface/candle.git
synced 2025-06-16 10:38:54 +00:00
make up for the missing last token output of phi2 example (#2299)
This commit is contained in:
@ -114,6 +114,10 @@ impl TextGeneration {
|
||||
tokens.push(next_token);
|
||||
generated_tokens += 1;
|
||||
if next_token == eos_token {
|
||||
if let Some(t) = self.tokenizer.decode_rest()? {
|
||||
print!("{t}");
|
||||
std::io::stdout().flush()?;
|
||||
}
|
||||
break;
|
||||
}
|
||||
if let Some(t) = self.tokenizer.next_token(next_token)? {
|
||||
|
Reference in New Issue
Block a user