Downloads · 30 days
14
2% of all-time downloads
learningmachineaz/mt5-enaz-10m
mt5-enaz-10m is a translation model from learningmachineaz. Use it when you need text moved from one language to another. It is set up for transformers. The card lists the license as cc-by-nc-sa-4.0.
This is the most advanced and accurate mT5 based model for machine translation available as for Azerbaijani language.\ The model was trained on 10 million sentences extracted from various text sources of Azerbaijan Na…
Downloads · 30 days
14
2% of all-time downloads
All-time downloads
728
Public
Repo size
4.7 GB
Likes
1
Public
Click a slice to open those files.
.bin2.3 GB · 100%
From the Hugging Face model README
This is the most advanced and accurate mT5 based model for machine translation available as for Azerbaijani language.
The model was trained on 10 million sentences extracted from various text sources of Azerbaijan National Library.
Quality of translation is very close to Google Translate as it was used for English translations.
Bu, Azərbaycan dilinə olduğu kimi, maşın tərcüməsi üçün ən qabaqcıl və dəqiq mT5 əsaslı modeldir.
Model Azərbaycan Milli Kitabxanasının müxtəlif mətn mənbələrindən çıxarılan 10 milyon cümlə üzrə təlim keçib.
Tərcümə keyfiyyəti ingilis dilinə tərcümələr üçün istifadə olunduğundan Google Tərcümə ilə çox yaxındır.
| Key point | Info |
|---|---|
| Base model | mT5-base |
| Batch size | 16 |
| Epochs | 10 |
| Steps | 620k |
| Training Loss | 0.56 |
| Eval Loss | 0.53 |
| Training Duration | 2 days |
from transformers import MT5Tokenizer, MT5ForConditionalGeneration
model_name = 'learningmachineaz/mt5-enaz-10m'
max_length = 128
tokenizer = MT5Tokenizer.from_pretrained(model_name)
model = MT5ForConditionalGeneration.from_pretrained(model_name)
text = "Artificial intelligence is already superior to human learning in numerous domains."
input_ids = tokenizer(f'translate English to Azerbaijani: {text}', return_tensors="pt").input_ids
# OPTION 1 - SINGLE TRANSLATION
outputs = model.generate(input_ids, max_length=max_length, do_sample=False, num_return_sequences=1)
print(tokenizer.decode(outputs[0], skip_special_tokens=True))
# OPTION 2 - MULTIPLE VARIATIONS
outputs = model.generate(input_ids, max_length=max_length, do_sample=True, top_k=10, num_return_sequences=3)
for i, output in enumerate(outputs):
print(tokenizer.decode(output, skip_special_tokens=True))
OPTION 1 - OUTPUT:
Süni intellekt artıq çoxsaylı domenlərdə insanın öyrənilməsindən üstünlük təşkil edir.
OPTION 2 - OUTPUT:
Artıq çoxsaylı domenlərdə süni zəka insanın öyrənilməsindən daha üstün olması şərti ilə müşahidə edilir.
Süni intellekt artıq çoxsaylı oblastlarda insanın təlimindən yüksəkdir.
Süni intellekt artıq çoxsaylı domenlərdə insan öyrənməsindən daha üstün gəlir.
Trained and evaluated by Renat Kalimulin