michaelfeil commited on
Commit
a507766
1 Parent(s): 45a5b94

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +5 -5
README.md CHANGED
@@ -108,7 +108,7 @@ tags:
108
 
109
  # Fast-Inference with Ctranslate2
110
  Speedup inference by 2x-8x using int8 inference in C++
111
- quantized version of facebook/m2m100_1.2B
112
 
113
  pip install hf_hub_ctranslate2>=1.0.3 ctranslate2>=3.13.0
114
 
@@ -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-m2m100_PARAMS", device="cpu", compute_type="int8",
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="m2m100_PARAMS"
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("m2m100_PARAMS")
147
- tokenizer = transformers.AutoTokenizer.from_pretrained("facebook/m2m100_PARAMS")
148
  tokenizer.src_lang = "en"
149
 
150
  source = tokenizer.convert_ids_to_tokens(tokenizer.encode("Hello world!"))
 
108
 
109
  # Fast-Inference with Ctranslate2
110
  Speedup inference by 2x-8x using int8 inference in C++
111
+ quantized version of facebook/m2m100_12B-last-ckpt
112
 
113
  pip install hf_hub_ctranslate2>=1.0.3 ctranslate2>=3.13.0
114
 
 
116
  from hf_hub_ctranslate2 import MultiLingualTranslatorCT2fromHfHub
117
 
118
  model = MultiLingualTranslatorCT2fromHfHub(
119
+ model_name_or_path="michaelfeil/ct2fast-m2m100_12B-last-ckpt", 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_12B-last-ckpt"
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_12B-last-ckpt")
147
+ tokenizer = transformers.AutoTokenizer.from_pretrained("facebook/m2m100_12B-last-ckpt")
148
  tokenizer.src_lang = "en"
149
 
150
  source = tokenizer.convert_ids_to_tokens(tokenizer.encode("Hello world!"))