diff options
author | Laurent Mazare <laurent.mazare@gmail.com> | 2024-02-24 11:07:02 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-02-24 11:07:02 +0100 |
commit | 8d04f70f4d1bd67c42fb7d63e7031d49cf780a61 (patch) | |
tree | bc759b86e151faf8d373a21ddd2eeef21a3a0382 /candle-examples | |
parent | eeb7e2b683bc514440bd464f78afc43d61dfe10b (diff) | |
download | candle-8d04f70f4d1bd67c42fb7d63e7031d49cf780a61.tar.gz candle-8d04f70f4d1bd67c42fb7d63e7031d49cf780a61.tar.bz2 candle-8d04f70f4d1bd67c42fb7d63e7031d49cf780a61.zip |
Fix the eos token for gemma. (#1753)
Diffstat (limited to 'candle-examples')
-rw-r--r-- | candle-examples/examples/gemma/main.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/candle-examples/examples/gemma/main.rs b/candle-examples/examples/gemma/main.rs index a4a1b3de..fb59f0bb 100644 --- a/candle-examples/examples/gemma/main.rs +++ b/candle-examples/examples/gemma/main.rs @@ -66,9 +66,9 @@ impl TextGeneration { std::io::stdout().flush()?; let mut generated_tokens = 0usize; - let eos_token = match self.tokenizer.get_token("</s>") { + let eos_token = match self.tokenizer.get_token("<eos>") { Some(token) => token, - None => anyhow::bail!("cannot find the </s> token"), + None => anyhow::bail!("cannot find the <eos> token"), }; let start_gen = std::time::Instant::now(); for index in 0..sample_len { |