anzorq commited on
Commit
c4cb87b
1 Parent(s): f906787

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +10 -1
README.md CHANGED
@@ -119,8 +119,17 @@ print(translate(text))
119
  ```
120
 
121
  ## CTranslate2 model (quantized model, much faster inference)
122
- First, download the [files for the model in ctranslate2 format](https://huggingface.co/anzorq/m2m100_418M_ft_ru-kbd_44K/tree/main/ctranslate2) and place them into `ctranslate2` folder.
 
 
 
 
 
 
 
 
123
 
 
124
  ```Python
125
  import ctranslate2
126
  import transformers
 
119
  ```
120
 
121
  ## CTranslate2 model (quantized model, much faster inference)
122
+ First, download the files for the model in ctranslate2 format:
123
+ ```Python
124
+ from huggingface_hub import hf_hub_download
125
+
126
+ hf_hub_download(repo_id='anzorq/m2m100_418M_ft_ru-kbd_44K', subfolder='ctranslate2', filename='config.json', local_dir='./')
127
+ hf_hub_download(repo_id='anzorq/m2m100_418M_ft_ru-kbd_44K', subfolder='ctranslate2', filename='model.bin', local_dir='./')
128
+ hf_hub_download(repo_id='anzorq/m2m100_418M_ft_ru-kbd_44K', subfolder='ctranslate2', filename='sentencepiece.bpe.model', local_dir='./')
129
+ hf_hub_download(repo_id='anzorq/m2m100_418M_ft_ru-kbd_44K', subfolder='ctranslate2', filename='shared_vocabulary.json', local_dir='./')
130
+ ```
131
 
132
+ Run inference:
133
  ```Python
134
  import ctranslate2
135
  import transformers