Downloads · 30 days
12
11% of all-time downloads
jonathanmutal/WMT24-spanish-to-aranese-aragonese
WMT24-spanish-to-aranese-aragonese is a translation model from jonathanmutal. Use it when you need text moved from one language to another. It is set up for transformers. The card lists the license as apache-2.0.
This model was submitted to the WMT24 Shared Task on Translation into Low-Resource Languages of Spain. It is a multilingual translation model that translates from Spanish into Aranese and Occitan, fine-tuned from face…
Downloads · 30 days
12
11% of all-time downloads
All-time downloads
109
Public
Parameters
615M
2.5 GB on disk
Likes
1
Public
Click a slice to open those files.
.safetensors2.5 GB · 99%
From the Hugging Face model README
This model was submitted to the WMT24 Shared Task on Translation into Low-Resource Languages of Spain. It is a multilingual translation model that translates from Spanish into Aranese and Occitan, fine-tuned from facebook/nllb-200-distilled-600M.
oci_Latn language tag<arn> / <oci> used in training to distinguish the targetsEvaluated on FLORES+ test set:
| Language | BLEU | ChrF | TER |
|---|---|---|---|
| Aranese | 30.1 | 49.8 | 71.5 |
| Aragonese | 61.9 | 79.5 | 26.8 |
We trained the model on Spanish–Occitan and Spanish–Aranese jointly, using:
oci_Latn as the shared language tag<arn> or <oci> to distinguish themfrom transformers import AutoModelForSeq2SeqLM, AutoTokenizer
import torch
# Load model and tokenizer
model_name = "jonathanmutal/WMT24-spanish-to-aranese-aragonese"
tokenizer = AutoTokenizer.from_pretrained(model_name)
model = AutoModelForSeq2SeqLM.from_pretrained(model_name)
# Input in Spanish
spanish_sentence = "¿Cómo se encuentra usted hoy?"
# Tokenize input
inputs = tokenizer(spanish_sentence, return_tensors="pt")
# Target language: Aranese uses 'oci_Latn' in NLLB
translated_tokens = model.generate(
**inputs,
forced_bos_token_id=tokenizer.convert_tokens_to_ids("oci_Latn"),
max_length=50,
num_beams=5
)
# Decode and print output
translation = tokenizer.batch_decode(translated_tokens, skip_special_tokens=True)[0]
print(translation)
Example output:
Com se trape vos aué?
oci_Latn token for both Occitan and Aranese, disambiguation may require special prompts@inproceedings{mutal2024timunige,
title = "{TIM-UNIGE}: Translation into Low-Resource Languages of Spain for {WMT24}",
author = {Mutal, Jonathan and Ormaechea, Lucía},
booktitle = "Proceedings of the Ninth Conference on Machine Translation",
year = {2024},
pages = {862--870}
}