Downloads · 30 days
15
15% of all-time downloads
linguardia/opus-mt-en-rhg
opus-mt-en-rhg is a translation model from linguardia. Use it when you need text moved from one language to another. It is set up for transformers. The card lists the license as apache-2.0.
Translates English into Rohingya. Finetuned by Linguardia from Helsinki-NLP/opus-mt-en-mul on the English↔Rohingya sentence pairs in Tatoeba.
Downloads · 30 days
15
15% of all-time downloads
All-time downloads
100
Public
Parameters
77M
310 MB on disk
Likes
0
Public
Click a slice to open those files.
.safetensors308 MB · 99%
From the Hugging Face model README
Translates English into Rohingya. Finetuned by
Linguardia from Helsinki-NLP/opus-mt-en-mul on the
English↔Rohingya sentence pairs in Tatoeba.
Built to generate course material for a language that no major machine translator supports.
from transformers import AutoTokenizer, AutoModelForSeq2SeqLM
tok = AutoTokenizer.from_pretrained("linguardia/opus-mt-en-rhg")
model = AutoModelForSeq2SeqLM.from_pretrained("linguardia/opus-mt-en-rhg")
batch = tok([">>rhg<< I wake up early."], return_tensors="pt")
out = model.generate(**batch, num_beams=4, max_length=64)
print(tok.batch_decode(out, skip_special_tokens=True))
The target language is selected by the >>rhg<< prefix on the source
text. It was added as a new token rather than replacing one of the base
model's existing languages, so every language the base already handled still
works.
| base | Helsinki-NLP/opus-mt-en-mul (77M params) |
| training pairs | 3,548 |
| held out | 300 dev, 0 gold |
| epochs | 20.0 |
| batch size | 32 |
| optimiser | Adafactor, lr 5e-5, 500 warmup steps |
| max sequence | 48 tokens (99.9% of source, 99.6% of target) |
| hardware | Apple M4, MPS |
Held-out Tatoeba (300 pairs never seen in training):
| metric | score |
|---|---|
| BLEU | 18.4 |
| chrF | 42.5 |
Translating the same 2,000-sentence course corpus:
| corpus | rows | distinct | vocab | words/sentence |
|---|---|---|---|---|
| this model | 2000 | 1998 (99.9%) | 2246 | 6.7 |
Sentence pairs come from Tatoeba, released under CC-BY 2.0 FR, with some sentences under CC0 1.0. Tatoeba's sentences are written by volunteers, and this model is a derivative of their work: if you use it, credit Tatoeba and its contributors.
Pairs were deduplicated on exact (English, Rohingya) text. No machine translation was used to create the training data at any point.
| layer | licence |
|---|---|
base model Helsinki-NLP/opus-mt-en-mul | Apache-2.0 |
| training data (Tatoeba) | CC-BY 2.0 FR / CC0 1.0 |
| these weights | Apache-2.0, with the attribution above |