Skip to content

Commit

Permalink
fix(examples/gpt): tokenizers =0.13.4
Browse files Browse the repository at this point in the history
  • Loading branch information
decahedron1 committed Aug 16, 2023
1 parent 2cbe0f0 commit 33b81e4
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ ureq = "2.1"
image = "0.24"
test-log = { version = "0.2", default-features = false, features = [ "trace" ] }
tracing-subscriber = { version = "0.3", default-features = false, features = [ "env-filter", "fmt" ] }
tokenizers = { version = "0.13", default-features = false, features = [ "onig" ] }
tokenizers = { version = ">=0.13.4", default-features = false, features = [ "onig" ] }
rand = "0.8"

[build-dependencies]
Expand Down
2 changes: 1 addition & 1 deletion examples/gpt.rs
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ fn main() -> OrtResult<()> {
let token = probabilities[rng.gen_range(0..=TOP_K)].0;
tokens = CowArray::from(concatenate![Axis(0), tokens, array![token.try_into().unwrap()]]);

let token_str = tokenizer.decode(vec![token as _], true).unwrap();
let token_str = tokenizer.decode(&[token as _], true).unwrap();
print!("{}", token_str);
stdout.flush().unwrap();
}
Expand Down

0 comments on commit 33b81e4

Please sign in to comment.