Update README.md
Browse files
README.md
CHANGED
@@ -119,8 +119,17 @@ print(translate(text))
|
|
119 |
```
|
120 |
|
121 |
## CTranslate2 model (quantized model, much faster inference)
|
122 |
-
First, download the
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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
|