Instructions to use Helsinki-NLP/opus-mt-sv-lua with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use Helsinki-NLP/opus-mt-sv-lua 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-sv-lua")# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModelForSeq2SeqLM tokenizer = AutoTokenizer.from_pretrained("Helsinki-NLP/opus-mt-sv-lua") model = AutoModelForSeq2SeqLM.from_pretrained("Helsinki-NLP/opus-mt-sv-lua", 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.0bdc687
-
set `renormalize_logits=True` for better performance (see `transformers` issue #4290)
2531ee5
-
Adding generation config file(s)
0bf8eb9
-
Add TF weights
Joao Gante09f056a
-
metadata: add license
55b0223
-
Update README.md
8b565ce
-
Update README.md
13167ac
-
Update README.md
100410c -
Update config.json
09f8744 -
Update tokenizer_config.json
c703da5 -
Update vocab.json
c65ca8a -
Update README.md
46c52dc
-
Update README.md
344d589 -
Update README.md
e202216
-
Update README.md
5ebdc3f
-
Update README.md
bd0b616
-
Update config.json
4c448f6 -
Update config.json
a2d316b
-
Update config.json
1137d2a -
Update config.json
fc7f714
-
Update tokenizer_config.json
53cc968 -
Update vocab.json
f0a7270 -
Update source.spm
ec6ded5 -
Update target.spm
0833e42 -
Update config.json
bd0cacb -
Update pytorch_model.bin
9c48783 -
initial commit
d793654