Downloads · 30 days
7
3% of all-time downloads
doris-sylvie/byt5-betsileo-malagasy
byt5-betsileo-malagasy is a machine learning model from doris-sylvie. Use it for the machine learning task on the model card, and read the license before you ship it in a product. The card lists the license as mit.
Modèle ByT5-base fine-tuné pour la traduction entre le Malagasy officiel et le dialecte Betsileo de Madagascar.
Downloads · 30 days
7
3% of all-time downloads
All-time downloads
276
Public
Parameters
583M
4.7 GB on disk
Likes
1
Public
Click a slice to open those files.
.safetensors7 GB · 100%
From the Hugging Face model README
Modèle ByT5-base fine-tuné pour la traduction entre le Malagasy officiel et le dialecte Betsileo de Madagascar.
from transformers import AutoTokenizer, AutoModelForSeq2SeqLM
tokenizer = AutoTokenizer.from_pretrained("doris-sylvie/byt5-betsileo-malagasy")
model = AutoModelForSeq2SeqLM.from_pretrained("doris-sylvie/byt5-betsileo-malagasy")
def traduire(texte, direction="translate Malagasy to Betsileo"):
inputs = tokenizer(f"{direction}: {texte}", return_tensors="pt")
outputs = model.generate(**inputs, max_length=256, num_beams=4)
return tokenizer.decode(outputs[0], skip_special_tokens=True)
print(traduire("Ny filazana ny razan'i Jesosy Kristy"))
translate Malagasy to Betsileo — Malagasy officiel → Betsileotranslate Betsileo to Malagasy — Betsileo → Malagasy officielBible Nouveau Testament alignée (Malagasy officiel ↔ Betsileo), ~1143 versets.