Helsinki-NLP/opus-100
Viewer • Updated • 55.1M • 30.9k • 235
How to use manueldeprada/t5-small-pt-en 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="manueldeprada/t5-small-pt-en") # Load model directly
from transformers import AutoTokenizer, AutoModelForSeq2SeqLM
tokenizer = AutoTokenizer.from_pretrained("manueldeprada/t5-small-pt-en")
model = AutoModelForSeq2SeqLM.from_pretrained("manueldeprada/t5-small-pt-en")This is a t5-small model finetuned on pt-en translation.
The model has been finetuned first one epoch in the Opus-100 dataset, achieving a 31.45 test BLEU.
Then, the model has completed 5 epochs on opus_books, achieving 28.83 test BLEU.
There is no need for a prompt like "translate pt to en:".