Instructions to use facebook/nllb-moe-54b with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use facebook/nllb-moe-54b with Transformers:
# Use a pipeline as a high-level helper # Warning: Pipeline type "translation" is no longer supported in transformers v5. # You must load the model directly (see below) or downgrade to v4.x with: # 'pip install "transformers<5.0.0' from transformers import pipeline pipe = pipeline("translation", model="facebook/nllb-moe-54b")# Load model directly from transformers import AutoTokenizer, AutoModel tokenizer = AutoTokenizer.from_pretrained("facebook/nllb-moe-54b") model = AutoModel.from_pretrained("facebook/nllb-moe-54b") - Notebooks
- Google Colab
- Kaggle
Commit ·
5a753be
1
Parent(s): 83c96e4
change the model in the text description to match code and model card. (#4)
Browse files- change the model in the text description to match code and model card. (4ba95a1c9d5389bd957c37d142bc2d19b5122b32)
Co-authored-by: Pinzhen Chen <pinzhenchen@users.noreply.huggingface.co>
README.md
CHANGED
|
@@ -235,7 +235,7 @@ Safiyyah Saleem, Holger Schwenk, and Jeff Wang.
|
|
| 235 |
The avalable checkpoints requires around 350GB of storage. Make sure to use `accelerate` if you do not have enough RAM on your machine.
|
| 236 |
|
| 237 |
While generating the target text set the `forced_bos_token_id` to the target language id. The following
|
| 238 |
-
example shows how to translate English to French using the *facebook/nllb-
|
| 239 |
|
| 240 |
Note that we're using the BCP-47 code for French `fra_Latn`. See [here](https://github.com/facebookresearch/flores/blob/main/flores200/README.md#languages-in-flores-200)
|
| 241 |
for the list of all BCP-47 in the Flores 200 dataset.
|
|
|
|
| 235 |
The avalable checkpoints requires around 350GB of storage. Make sure to use `accelerate` if you do not have enough RAM on your machine.
|
| 236 |
|
| 237 |
While generating the target text set the `forced_bos_token_id` to the target language id. The following
|
| 238 |
+
example shows how to translate English to French using the *facebook/nllb-moe-54b* model.
|
| 239 |
|
| 240 |
Note that we're using the BCP-47 code for French `fra_Latn`. See [here](https://github.com/facebookresearch/flores/blob/main/flores200/README.md#languages-in-flores-200)
|
| 241 |
for the list of all BCP-47 in the Flores 200 dataset.
|