Downloads · 30 days
9
6% of all-time downloads
SirEthanK/opus-mt-en-ru-health-finetuned
opus-mt-en-ru-health-finetuned is a translation model from SirEthanK. Use it when you need text moved from one language to another. It is set up for transformers. The card lists the license as cc-by-nc-sa-4.0.
This model is a domain-adapted English→Russian neural machine translation model, finetuned from Helsinki-NLP/opus-mt-en-ru. It has been trained specifically on medical and health-related English–Russian parallel text,…
Downloads · 30 days
9
6% of all-time downloads
All-time downloads
158
Public
Parameters
76.2M
307 MB on disk
Likes
1
Public
Click a slice to open those files.
.safetensors305 MB · 99%
From the Hugging Face model README
This model is a domain-adapted English→Russian neural machine translation model, finetuned from Helsinki-NLP/opus-mt-en-ru. It has been trained specifically on medical and health-related English–Russian parallel text, enabling more accurate translations of clinical instructions, medical terminology, and news in on public health.
This model uses full-parameter finetuning and is intended for research, experimentation, and academic work in domain-specific NMT.
This model is based on the OPUS-MT English→Russian MarianMT Transformer architecture and has been further trained on curated medical-domain parallel corpora. The finetuning objective was to improve translation quality for:
Compared to the base OPUS model, this finetuned version achieves significantly higher SacreBLEU, chrF, and METEOR scores on medical-domain evaluation sets. Performance on general-domain text decreases only slightly, which is expected for domain-adapted NMT models.
This model is intended for research and educational purposes, especially for exploring domain adaptation in low-resource machine translation settings.
This model is intended for research and experimentation in:
It is designed as a proof of concept illustrating how finetuning improves translation quality in a specialized low-resource domain. It is not intended for real-world clinical or diagnostic translation.
No individuals should rely on this model for medical communication in real-world settings. All outputs are intended strictly for educational and research purposes.
This model can be used as-is to generate English→Russian translations of medical and health-related text for research, experimentation, and evaluation. It is suitable for:
Direct use of this model should remain limited to non-clinical research. It has not been validated for real-world medical communication, diagnosis, or decision-making.
This model is not intended for:
The model has not been validated for professional medical use and may produce inaccurate or misleading translations of technical medical content.
This model inherits limitations and potential biases from both the base OPUS-MT model and the medical-domain datasets used for finetuning. Users should be aware of the following:
This model is intended only for research and educational purposes in machine translation and domain adaptation. It should not be used in real-world clinical, diagnostic, or patient-facing applications.
Users (both direct and downstream) should be aware of the model’s technical limitations and the risks associated with translating medical text. In particular, the following recommendations apply:
Overall, users should exercise caution, treat the translations as non-authoritative, and use the model only in educational, experimental, and research contexts.
Use the code below to load the model and run an English→Russian translation:
from transformers import AutoTokenizer, AutoModelForSeq2SeqLM, pipeline
model_id = "SirEthanK/opus-mt-en-ru-medical-finetuned"
# Load pipeline
translator = pipeline("translation", model=model_id, tokenizer=model_id)
text = "Take one tablet by mouth twice daily."
result = translator(text)
print(result[0]["translation_text"])
Or, using the model and tokenizer directly:
from transformers import AutoTokenizer, AutoModelForSeq2SeqLM
model_id = "SirEthanK/opus-mt-en-ru-medical-finetuned"
tokenizer = AutoTokenizer.from_pretrained(model_id)
model = AutoModelForSeq2SeqLM.from_pretrained(model_id)
inputs = tokenizer("The patient has a mild fever.", return_tensors="pt")
outputs = model.generate(**inputs)
print(tokenizer.decode(outputs[0], skip_special_tokens=True))
This model was finetuned on the medical EN-RU dataset, available here: https://huggingface.co/datasets/SirEthanK/en-ru-health-only-dataset This dataset consists of medical and health-domain English-Russian parallel text, cleaned and split into train/validation/test sets. The full dataset documentation is provided on the dataset card
The model was finetuned using the standard MarianMT encoder-decoder architecture implemented in 🤗 Transformers. Training followed a full parameter finetuning approach, using the same SentencePiece tokenizer and vocabulary as the base OPUS-MT model.
All texts were preprocessed using the same pipeline described in the dataset card for SirEthanK/en-ru-health-only-dataset. For the full preprocessing procedure, see the dataset documentation: https://huggingface.co/datasets/SirEthanK/en-ru-health-only-dataset
Training was performed on an NVIDIA A100 GPU using PyTorch and 🤗 Transformers.
The primary evaluation was performed on the held-out test split of the SirEthanK/en-ru-health-only-dataset: https://huggingface.co/datasets/SirEthanK/en-ru-health-only-dataset
This test set contains English–Russian parallel sentences from medical and health-related domains and was kept completely separate from the training and validation data used during finetuning.
To measure the effect of domain adaptation on general-domain translation quality, two additional evaluation sets were used:
The evaluation results were disaggregated by domain, comparing model performance on:
Medical-domain text
(held-out test split of the en-ru-health-only-dataset)
General-domain text (QuickMT)
A broad, non-medical English–Russian parallel dataset.
General-domain mixed dataset (custom)
A heterogeneous mixture of non-medical sources used to measure how domain finetuning affects general translation performance.
These factors allow assessment of both in-domain (medical) performance and potential degradation or trade-offs on out-of-domain (general) text.
The model was evaluated using the following standard machine translation metrics:
| Model | Decoding | BLEU | METEOR | TER | ROUGE-L | chrF |
|---|---|---|---|---|---|---|
| OPUS-MT (pretrained) | greedy | 22.78 | 0.49 | 67.90 | 0.37 | 51.26 |
| OPUS-MT (finetuned, med.) | greedy | 31.78 | 0.55 | 61.44 | 0.45 | 57.74 |
| Model | Decoding | BLEU | METEOR | TER | ROUGE-L | chrF |
|---|---|---|---|---|---|---|
| OPUS-MT (pretrained) | greedy | 27.99 | 0.48 | 64.95 | 0.16 | 54.62 |
| OPUS-MT (finetuned, med.) | greedy | 23.81 | 0.46 | 66.95 | 0.15 | 52.74 |
| Model | Decoding | BLEU | METEOR | TER | ROUGE-L | chrF |
|---|---|---|---|---|---|---|
| OPUS-MT (pretrained) | greedy | 24.37 | 0.48 | 66.68 | 0.13 | 52.12 |
| OPUS-MT (finetuned, med.) | greedy | 26.04 | 0.48 | 67.47 | 0.15 | 53.24 |
Finetuning OPUS-MT on medical-domain data resulted in substantial improvements on the in-domain medical test set, increasing BLEU from 22.78 to 31.78 and chrF from 51.26 to 57.74 under greedy decoding. These gains are consistent across all reported metrics.
As expected with domain-adapted NMT models, performance on a general-domain benchmark (QuickMT) decreased slightly relative to the pretrained baseline. This reflects the trade-off between specialization and broad-domain generalization.
However, evaluation on a heterogeneous custom general-domain dataset showed a different pattern: the finetuned model achieved slightly higher BLEU and chrF than the pretrained baseline. This suggests that domain adaptation did not uniformly degrade general-domain performance and may improve translation quality on certain non-medical sources with overlapping vocabulary or style.
Overall, the finetuned model provides substantial gains in its target medical domain while showing manageable and dataset-dependent trade-offs in general-domain translation performance.
Below are example translations comparing the pretrained OPUS-MT model with the finetuned medical model on short medical-domain sentences.
Example 1 — Medication instruction
Source (EN): Take one tablet twice daily after meals.
OPUS-MT (pretrained): Возьмите одну таблетку дважды в день после еды.
Finetuned medical model: возьмите одну таблетку дважды в день после еды.
In this case, both models produce essentially the same correct translation (the main difference is casing).
Example 2 — Symptom description
Source (EN): The patient reports increasing shortness of breath.
OPUS-MT (pretrained): Пациент сообщает, что у него растет дыхание.
Finetuned medical model: пациент сообщает о растущем затруднении дыхания.
The pretrained model output is awkward and semantically incorrect: "растет дыхание" literally means "breathing is increasing" and does not correspond to "shortness of breath."
The finetuned model produces a more medically appropriate phrasing using "затруднение дыхания," which correctly captures the intended meaning.
Example 3 — Clinical monitoring
Source (EN): Monitor blood pressure every four hours.
OPUS-MT (pretrained): Контролировать давление каждые четыре часа.
Finetuned medical model: контролировать артериальное давление каждые четыре часа.
The finetuned model explicitly specifies "артериальное давление" (“arterial blood pressure”), which is more precise and typical in medical Russian.
This model is released under the CC BY-NC-SA 4.0 license.
The model was finetuned using training data that includes WikiHow-derived text (through the WikiHealth corpus), which is distributed under CC BY-NC-SA 3.0. Because the dataset contains non-commercial, share-alike material, the finetuned model must also be released under a non-commercial, share-alike license.
This license permits:
It does not permit:
Users are responsible for ensuring their use complies with the license terms.
For questions or issues, please contact: https://huggingface.co/SirEthanK