Praise2112 commited on
Commit
e10ff17
1 Parent(s): 505d21a

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +4 -2
README.md CHANGED
@@ -5,9 +5,11 @@ license: apache-2.0
5
  ``` python
6
  import ctranslate2
7
  import transformers
 
8
 
9
- generator = ctranslate2.Generator("Praise2112/Mistral-7B-v0.1-int8-ct2", device="cuda", compute_type="int8") # GPU
10
- # generator = ctranslate2.Generator("Praise2112/Mistral-7B-v0.1-int8-ct2", device="cpu", compute_type="int8") #CPU
 
11
  tokenizer = transformers.AutoTokenizer.from_pretrained("mistralai/Mistral-7B-v0.1")
12
 
13
  # Unconditional generation.
 
5
  ``` python
6
  import ctranslate2
7
  import transformers
8
+ from huggingface_hub import snapshot_download
9
 
10
+ model_dir = snapshot_download(repo_id="Praise2112/Mistral-7B-v0.1-int8-ct2")
11
+ generator = ctranslate2.Generator(model_dir, device="cuda", compute_type="int8") # GPU
12
+ # generator = ctranslate2.Generator(model_dir, device="cpu", compute_type="int8") #CPU
13
  tokenizer = transformers.AutoTokenizer.from_pretrained("mistralai/Mistral-7B-v0.1")
14
 
15
  # Unconditional generation.