Machine Translation Models
Collection
8 items • Updated
English-to-Welsh translation model specialised for the health and care domain, built using Marian NMT.
pip install sentencepiece transformers
import transformers
model_id = "techiaith/mt-dspec-health-en-cy"
tokenizer = transformers.AutoTokenizer.from_pretrained(model_id)
model = transformers.AutoModelForSeq2SeqLM.from_pretrained(model_id)
translate = transformers.pipeline("translation", model=model, tokenizer=tokenizer)
result = translate("The patient has a headache.")
print(result[0]["translation_text"])
# Mae gan y claf gur pen.
| Metric | Score |
|---|---|
| SacreBLEU | 54.16 |
| CER | 0.31 |
| WER | 0.47 |
| CHRF | 69.03 |
2026-02-26: Re-converted with weight tying fix. The previous version required
transformers<=4.30.2 due to issue #26271.
This version works with all transformers versions.
Apache 2.0