Downloads · 30 days
21
6% of all-time downloads
hassan-IA/amalaz-en2ha-micro
amalaz-en2ha-micro is a machine learning model from hassan-IA. Use it for the machine learning task on the model card, and read the license before you ship it in a product.
amalaz-en2ha-micro is a small, fine-tuned translation model that converts English → Hassaniya Arabic. It is based on Helsinki-NLP/opus-mt-en-ar and trained on dah parallel dataset (~3 k examples).
Downloads · 30 days
21
6% of all-time downloads
All-time downloads
338
Public
Parameters
76.4M
307 MB on disk
Likes
3
Public
Click a slice to open those files.
.safetensors305 MB · 99%
From the Hugging Face model README
amalaz-en2ha-micro is a small, fine-tuned translation model that converts English → Hassaniya Arabic. It is based on Helsinki-NLP/opus-mt-en-ar and trained on dah parallel dataset (~3 k examples).
This model aims to improve translation coverage for Hassaniya which is linguistically distinct from Modern Standard Arabic.
from transformers import AutoTokenizer, AutoModelForSeq2SeqLM
model_name = "hassan-IA/amalaz-en2ha-micro"
tokenizer = AutoTokenizer.from_pretrained(model_name)
model = AutoModelForSeq2SeqLM.from_pretrained(model_name)
text = "Dah drinks tea 3 times everyday"
inputs = tokenizer(text, return_tensors="pt")
outputs = model.generate(**inputs)
print(tokenizer.decode(outputs[0], skip_special_tokens=True))
Output:
الداه يشرب اتاي اثلت مرات كل يوم