mirror of
https://github.com/huggingface/candle.git
synced 2025-06-16 18:48:51 +00:00
Fix the eos token for gemma. (#1753)
This commit is contained in:
@ -66,9 +66,9 @@ impl TextGeneration {
|
|||||||
std::io::stdout().flush()?;
|
std::io::stdout().flush()?;
|
||||||
|
|
||||||
let mut generated_tokens = 0usize;
|
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,
|
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();
|
let start_gen = std::time::Instant::now();
|
||||||
for index in 0..sample_len {
|
for index in 0..sample_len {
|
||||||
|
Reference in New Issue
Block a user