mt-dspec-health-en-cy
English-to-Welsh translation model specialised for the health and care domain, built using Marian NMT.
Installation
pip install sentencepiece transformers
Usage
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.
Training Data
- UK Government Legislation data
- OPUS-cy-en corpus
- Cofnod y Cynulliad (Welsh Assembly Records)
- Cofion Techiaith Cymru
Evaluation
| Metric | Score |
|---|---|
| SacreBLEU | 54.16 |
| CER | 0.31 |
| WER | 0.47 |
| CHRF | 69.03 |
Version History
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.
Links
- Live Demo: https://cyfieithu.techiaith.cymru
- Source: techiaith/marian-mt-models-api
License
Apache 2.0