Skip to content

Commit

Permalink
Fix the eos token for gemma. (huggingface#1753)
Browse files Browse the repository at this point in the history
  • Loading branch information
LaurentMazare authored Feb 24, 2024
1 parent eeb7e2b commit 8d04f70
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions candle-examples/examples/gemma/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down

0 comments on commit 8d04f70

Please sign in to comment.