Add a cuda kernel for upsampling. (#441)

* Add a cuda kernel for upsampling.

* Update for the latest tokenizers version.
This commit is contained in:
Laurent Mazare
2023-08-14 13:12:17 +01:00
committed by GitHub
parent a094dc503d
commit c84883ecf2
10 changed files with 119 additions and 26 deletions

View File

@ -65,10 +65,7 @@ impl TextGeneration {
let next_token = self.logits_processor.sample(&logits)?;
tokens.push(next_token);
new_tokens.push(next_token);
let token = self
.tokenizer
.decode(vec![next_token], true)
.map_err(E::msg)?;
let token = self.tokenizer.decode(&[next_token], true).map_err(E::msg)?;
print!("{token}");
std::io::stdout().flush()?;
}