Instructions to use tonythethompson/opus-mt-en-pt with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use tonythethompson/opus-mt-en-pt 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="tonythethompson/opus-mt-en-pt")# Load model directly from transformers import AutoTokenizer, AutoModelForSeq2SeqLM tokenizer = AutoTokenizer.from_pretrained("tonythethompson/opus-mt-en-pt") model = AutoModelForSeq2SeqLM.from_pretrained("tonythethompson/opus-mt-en-pt") - Notebooks
- Google Colab
- Kaggle
opus-mt-en-pt
Overview
This repository contains the English-to-Portuguese OPUS-MT transformer model from Helsinki-NLP/opus-mt-tc-big-en-pt.
Source
Source model: Helsinki-NLP/opus-mt-tc-big-en-pt
The upstream model card describes this as a neural machine translation model for translating from English (en) to Portuguese (pt). It is part of the OPUS-MT project and was trained with OPUS data using Marian NMT, then converted for use with Transformers.
Files
| File | Description |
|---|---|
model.safetensors |
Model weights |
config.json |
Marian model configuration |
generation_config.json |
Text generation configuration |
source.spm |
Source SentencePiece model |
target.spm |
Target SentencePiece model |
vocab.json |
Vocabulary |
tokenizer_config.json |
Tokenizer configuration |
special_tokens_map.json |
Special token mapping |
Intended Use
Use this model for English-to-Portuguese machine translation with Transformers-compatible Marian tooling.
Training Data
The upstream model card states that training data is taken from OPUS.
Evaluation
The upstream model card reports self-reported BLEU scores for English-to-Portuguese translation:
| Test Set | BLEU |
|---|---|
flores101-devtest |
50.4 |
tatoeba-test-v2021-08-07 |
49.6 |
Limitations
- Evaluation scores are inherited from the upstream model card and are not independently verified here.
- Translation quality can vary by domain and input style.
- This repository does not document additional fine-tuning or conversion beyond the upstream source model files.
License
CC-BY-4.0, matching the upstream source model metadata.
- Downloads last month
- 16
Model tree for tonythethompson/opus-mt-en-pt
Base model
Helsinki-NLP/opus-mt-tc-big-en-pt