Skip to content

Commit

Permalink
Add the custom tokenizer. (#1686)
Browse files Browse the repository at this point in the history
  • Loading branch information
LaurentMazare authored Feb 9, 2024
1 parent 40ce160 commit 90447bc
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion candle-examples/examples/chatglm/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -202,7 +202,9 @@ fn main() -> Result<()> {
let repo = api.repo(Repo::with_revision(model_id, RepoType::Model, revision));
let tokenizer_filename = match args.tokenizer {
Some(file) => std::path::PathBuf::from(file),
None => repo.get("tokenizer.json")?,
None => api
.model("lmz/candle-chatglm".to_string())
.get("chatglm-tokenizer.json")?,
};
let filenames = match args.weight_file {
Some(weight_file) => vec![std::path::PathBuf::from(weight_file)],
Expand Down

0 comments on commit 90447bc

Please sign in to comment.