michaelfeil
commited on
Commit
•
06bd832
1
Parent(s):
eba8a47
Update README.md
Browse files
README.md
CHANGED
@@ -116,7 +116,7 @@ pip install hf_hub_ctranslate2>=1.0.3 ctranslate2>=3.13.0
|
|
116 |
from hf_hub_ctranslate2 import MultiLingualTranslatorCT2fromHfHub
|
117 |
|
118 |
model = MultiLingualTranslatorCT2fromHfHub(
|
119 |
-
model_name_or_path="michaelfeil/ct2fast-
|
120 |
tokenizer=AutoTokenizer.from_pretrained(f"facebook/m2m100_418M")
|
121 |
)
|
122 |
|
@@ -133,7 +133,7 @@ compute_type=int8 for device="cpu"
|
|
133 |
Converted 5/13/23 to Ctranslate2
|
134 |
```bash
|
135 |
export ORG="facebook"
|
136 |
-
export NAME="
|
137 |
ct2-transformers-converter --model "$ORG/$NAME" --copy_files .gitattributes README.md generation_config.json sentencepiece.bpe.model special_tokens_map.json tokenizer_config.json vocab.json --quantization float16
|
138 |
```
|
139 |
|
@@ -143,8 +143,8 @@ Alternative
|
|
143 |
import ctranslate2
|
144 |
import transformers
|
145 |
|
146 |
-
translator = ctranslate2.Translator("
|
147 |
-
tokenizer = transformers.AutoTokenizer.from_pretrained("facebook/
|
148 |
tokenizer.src_lang = "en"
|
149 |
|
150 |
source = tokenizer.convert_ids_to_tokens(tokenizer.encode("Hello world!"))
|
|
|
116 |
from hf_hub_ctranslate2 import MultiLingualTranslatorCT2fromHfHub
|
117 |
|
118 |
model = MultiLingualTranslatorCT2fromHfHub(
|
119 |
+
model_name_or_path="michaelfeil/ct2fast-m2m100_418M", device="cpu", compute_type="int8",
|
120 |
tokenizer=AutoTokenizer.from_pretrained(f"facebook/m2m100_418M")
|
121 |
)
|
122 |
|
|
|
133 |
Converted 5/13/23 to Ctranslate2
|
134 |
```bash
|
135 |
export ORG="facebook"
|
136 |
+
export NAME="m2m100_418M"
|
137 |
ct2-transformers-converter --model "$ORG/$NAME" --copy_files .gitattributes README.md generation_config.json sentencepiece.bpe.model special_tokens_map.json tokenizer_config.json vocab.json --quantization float16
|
138 |
```
|
139 |
|
|
|
143 |
import ctranslate2
|
144 |
import transformers
|
145 |
|
146 |
+
translator = ctranslate2.Translator("m2m100_418M")
|
147 |
+
tokenizer = transformers.AutoTokenizer.from_pretrained("facebook/m2m100_418M")
|
148 |
tokenizer.src_lang = "en"
|
149 |
|
150 |
source = tokenizer.convert_ids_to_tokens(tokenizer.encode("Hello world!"))
|