Instructions to use Helsinki-NLP/opus-mt-af-nl with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use Helsinki-NLP/opus-mt-af-nl 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="Helsinki-NLP/opus-mt-af-nl")# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModelForSeq2SeqLM tokenizer = AutoTokenizer.from_pretrained("Helsinki-NLP/opus-mt-af-nl") model = AutoModelForSeq2SeqLM.from_pretrained("Helsinki-NLP/opus-mt-af-nl", device_map="auto") - Notebooks
- Google Colab
- Kaggle
Commit History
-
Adding `safetensors` variant of this model
This is an automated PR created with https://huggingface.co/spaces/safetensors/convert This new file is equivalent to `pytorch_model.bin` but safe in the sense that no arbitrary code can be put into it. These files also happen to load much faster than their pytorch counterpart: https://colab.research.google.com/github/huggingface/notebooks/blob/main/safetensors_doc/en/speed.ipynb The widgets on your model page will run using this model even if this is not merged making sure the file actually works. If you find any issues: please report here: https://huggingface.co/spaces/safetensors/convert/discussions Feel free to ignore this PR.b25662d
-
set `renormalize_logits=True` for better performance (see `transformers` issue #4290)
bc1ec7f
-
Adding generation config file(s)
8ae5097
-
Add TF weights
Joao Gante2011ecb
-
Changed num_beams to 4
ec9feae
-
Update README.md
a4125c0 -
Update README.md
31a056d -
Update metadata.json
aa695c4
-
Update README.md
a30e56a -
Update config.json
241f23c -
Update metadata.json
66371c1 -
Update tokenizer_config.json
1a887ff -
Update vocab.json
cb1ab3e -
Update README.md
4b087e8 -
Update metadata.json
a3462b7 -
Update README.md
933ae99 -
Update config.json
e1292fc -
Update metadata.json
572dd4a -
Update pytorch_model.bin
613560a -
Update source.spm
8a16dee -
Update target.spm
98fabf5 -
Update tokenizer_config.json
606b720 -
Update vocab.json
c3ee05d -
initial commit
64e4824