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

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)
Downloads last month
40
Safetensors
Model size
0.6B params
Tensor type
F32
Β·
Inference Providers NEW
This model isn't deployed by any Inference Provider. πŸ™‹ Ask for provider support

Space using AnaluRRamos/mt5-biomedical-translation-mode1 1