diff options
author | Laurent Mazare <laurent.mazare@gmail.com> | 2023-08-14 13:12:17 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-08-14 13:12:17 +0100 |
commit | c84883ecf2c240792392353175b634f6ec92a011 (patch) | |
tree | 10b14324310421802a68669485c75cc3dcc16c48 /candle-examples/examples/bigcode/main.rs | |
parent | a094dc503d69a6ca3db71098ebc26d0d2f2a33a6 (diff) | |
download | candle-c84883ecf2c240792392353175b634f6ec92a011.tar.gz candle-c84883ecf2c240792392353175b634f6ec92a011.tar.bz2 candle-c84883ecf2c240792392353175b634f6ec92a011.zip |
Add a cuda kernel for upsampling. (#441)
* Add a cuda kernel for upsampling.
* Update for the latest tokenizers version.
Diffstat (limited to 'candle-examples/examples/bigcode/main.rs')
-rw-r--r-- | candle-examples/examples/bigcode/main.rs | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/candle-examples/examples/bigcode/main.rs b/candle-examples/examples/bigcode/main.rs index ac9c63c7..39b1de27 100644 --- a/candle-examples/examples/bigcode/main.rs +++ b/candle-examples/examples/bigcode/main.rs @@ -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()?; } |