Instructions to use Helsinki-NLP/opus-mt-en-de with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use Helsinki-NLP/opus-mt-en-de 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-en-de")# Load model directly from transformers import AutoTokenizer, AutoModelForSeq2SeqLM tokenizer = AutoTokenizer.from_pretrained("Helsinki-NLP/opus-mt-en-de") model = AutoModelForSeq2SeqLM.from_pretrained("Helsinki-NLP/opus-mt-en-de") - Inference
- Notebooks
- Google Colab
- Kaggle
translation problem
#2
by HectorSaTe - opened
I found out a problem:
- when translating "yes" it goes: "Ja"
- when translating "Yes" it goes: "Nein"
This is an important mistake, as it should also be "Ja" and not the contrary.
Thanks anyway for the great work!
Interesting example. There is no easy fix for this as the model is basically a black box and manipulating its behavior is not easy. Just as a side note: all models are trained to translate sentences and not individual words. Did you try to add punctuation or embed those in sentences? I would be interested in knowing what will happen.
Atnafu changed discussion status to closed