Instructions to use DunnBC22/opus-mt-de-en-OPUS_Medical_German_to_English with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use DunnBC22/opus-mt-de-en-OPUS_Medical_German_to_English 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="DunnBC22/opus-mt-de-en-OPUS_Medical_German_to_English")# Load model directly from transformers import AutoTokenizer, AutoModelForSeq2SeqLM tokenizer = AutoTokenizer.from_pretrained("DunnBC22/opus-mt-de-en-OPUS_Medical_German_to_English") model = AutoModelForSeq2SeqLM.from_pretrained("DunnBC22/opus-mt-de-en-OPUS_Medical_German_to_English") - Notebooks
- Google Colab
- Kaggle
license: apache-2.0
base_model: Helsinki-NLP/opus-mt-de-en
tags:
- generated_from_trainer
- medical
model-index:
- name: opus-mt-de-en-OPUS_Medical_German_to_English
results: []
datasets:
- ahazeemi/opus-medical-en-de
language:
- en
- de
metrics:
- bleu
- rouge
pipeline_tag: translation
opus-mt-de-en-OPUS_Medical_German_to_English
This model is a fine-tuned version of Helsinki-NLP/opus-mt-de-en.
Model description
For more information on how it was created, check out the following link: https://github.com/DunnBC22/NLP_Projects/blob/main/Machine%20Translation/Medical%20-%20German%20to%20English/OPUS_Medical_German_to_English_OPUS_Translation_Project.ipynb
Intended uses & limitations
This model is intended to demonstrate my ability to solve a complex problem using technology.
Training and evaluation data
Dataset Source: https://huggingface.co/datasets/ahazeemi/opus-medical-en-de
Histogram of German Input Word Counts
Histogram of English Input Word Counts
Training procedure
Training hyperparameters
The following hyperparameters were used during training:
- learning_rate: 2e-05
- train_batch_size: 8
- eval_batch_size: 8
- seed: 42
- gradient_accumulation_steps: 4
- total_train_batch_size: 32
- optimizer: Adam with betas=(0.9,0.999) and epsilon=1e-08
- lr_scheduler_type: linear
- num_epochs: 5
Training results
- eval_loss: 0.8723
- eval_bleu: 53.88120
- eval_rouge:
- rouge1: 0.7664
- rouge2: 0.6284
- rougeL: 0.7370
- rougeLsum: 0.7370
- The training results values are rounded to the nearest ten-thousandth.
Framework versions
- Transformers 4.31.0
- Pytorch 2.0.1+cu118
- Datasets 2.14.4
- Tokenizers 0.13.3
License Notice
This model is a fine-tuned derivative of a pretrained model. Users must comply with the original model license.
Dataset Notice
This model was fine-tuned on third-party datasets which may have separate licenses or usage restrictions.

