CoolFace
Modelpublic

AnaluRRamos/mt5-biomedical-translation-mode1

sourceHugging Facemitupdated 1y agoView on Hugging Face
0likes6downloads
Model Card

MT5 Biomedical Translator (Mode 1 with NE Embeddings)

This is a fine-tuned MT5 model for English-to-Portuguese biomedical translation. It uses named entity-aware embeddings to prioritise the translation of biomedical terms.

๐Ÿง  Model Highlights

  • โ€”โœ… Based on google/mt5-base
  • โ€”๐Ÿงฌ Trained with additional Named Entity (NE) tag embeddings
  • โ€”โš™๏ธ Mode 1: injects NE embeddings during both training and inference
  • โ€”๐Ÿ“Š Achieved BLEU score of 52.27 on validation set

๐Ÿ“‚ Files

This repository includes:

  • โ€”pytorch_model.bin or model.safetensors
  • โ€”config.json
  • โ€”tokenizer.json + sentencepiece files

๐Ÿ’ป Usage

python
from transformers import MT5ForConditionalGeneration, AutoTokenizer

model = MT5ForConditionalGeneration.from_pretrained("AnaluRRamos/mt5-biomedical-translation-mode1")
tokenizer = AutoTokenizer.from_pretrained("AnaluRRamos/mt5-biomedical-translation-mode1")

input_text = "Translate this English biomedical abstract."
inputs = tokenizer(input_text, return_tensors="pt")
outputs = model.generate(**inputs)
translated = tokenizer.decode(outputs[0], skip_special_tokens=True)
print(translated)