How to use from the
Use from the
Transformers library
# 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="Tanhim/translation-En2De")
# Load model directly
from transformers import AutoTokenizer, AutoModelForSeq2SeqLM

tokenizer = AutoTokenizer.from_pretrained("Tanhim/translation-En2De")
model = AutoModelForSeq2SeqLM.from_pretrained("Tanhim/translation-En2De")
Quick Links

English to German Translation

Model Name: Tanhim/translation-En2De
language: German or Deutsch
thumbnail: https://huggingface.co/Tanhim/translation-En2De

How to use

You can use this model directly with a pipeline for machine translation. Since the generation relies on some randomness, I set a seed for reproducibility:

>>> from transformers import pipeline, set_seed
>>> text_En2De= pipeline('translation', model='Tanhim/translation-En2De', tokenizer='Tanhim/translation-En2De')
>>> set_seed(42)
>>> text_En2De("My name is Karl and I live in Aachen")

beta version

Downloads last month
6
Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support

Dataset used to train Tanhim/translation-En2De