Use the proper endoftext token for gwen. (#1685)

This commit is contained in:
Laurent Mazare
2024-02-09 17:02:03 +01:00
committed by GitHub
parent 5657e596cd
commit 40ce16001b

View File

@ -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("<|endoftext|>") {
Some(token) => token,
None => anyhow::bail!("cannot find the </s> token"),
None => anyhow::bail!("cannot find the <|endoftext|> token"),
};
let start_gen = std::time::Instant::now();
for index in 0..sample_len {