diff options
author | Laurent Mazare <laurent.mazare@gmail.com> | 2024-05-04 10:41:18 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-05-04 10:41:18 +0200 |
commit | a75cd8164fb0b8377d101fc8526783d4abd18f12 (patch) | |
tree | 32aaefe7a4986e1cdd193d51e1cc40387eb38b6e /candle-examples/examples | |
parent | b13a82a4387a55df07bec4e2eb6f7a8ebd0b98a2 (diff) | |
download | candle-a75cd8164fb0b8377d101fc8526783d4abd18f12.tar.gz candle-a75cd8164fb0b8377d101fc8526783d4abd18f12.tar.bz2 candle-a75cd8164fb0b8377d101fc8526783d4abd18f12.zip |
Force the revision for the phi3-llama quantized models. (#2159)
Diffstat (limited to 'candle-examples/examples')
-rw-r--r-- | candle-examples/examples/quantized/main.rs | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/candle-examples/examples/quantized/main.rs b/candle-examples/examples/quantized/main.rs index 4196ddcd..d91701ff 100644 --- a/candle-examples/examples/quantized/main.rs +++ b/candle-examples/examples/quantized/main.rs @@ -344,9 +344,18 @@ impl Args { "Phi-3-mini-4k-instruct-q4.gguf", ), }; + let revision = if self.which == Which::Phi3 { + "5eef2ce24766d31909c0b269fe90c817a8f263fb" + } else { + "main" + }; let api = hf_hub::api::sync::Api::new()?; - let api = api.model(repo.to_string()); - api.get(filename)? + api.repo(hf_hub::Repo::with_revision( + repo.to_string(), + hf_hub::RepoType::Model, + revision.to_string(), + )) + .get(filename)? } }; Ok(model_path) |