Downloads · 30 days
42
4% of all-time downloads
OvozifyLabs/nllb-200-uz-en-v1
nllb-200-uz-en-v1 is a machine learning model from OvozifyLabs. 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 apache-2.0.
This model is a fine-tuned version of facebook/nllb-200-distilled-600M specifically optimized for bidirectional translation between Uzbek (uz) and English (en).
Downloads · 30 days
42
4% of all-time downloads
All-time downloads
1K
Public
Parameters
615M
3.7 GB on disk
Likes
3
Public
Click a slice to open those files.
.safetensors2.5 GB · 99%
From the Hugging Face model README
This model is a fine-tuned version of facebook/nllb-200-distilled-600M specifically optimized for bidirectional translation between Uzbek (uz) and English (en).
This translation model has been fine-tuned to provide high-quality translations for the Uzbek-English language pair, addressing the limited availability of quality translation models for Uzbek language.
Base Model: facebook/nllb-200-distilled-600M
Language Pairs:
The model was fine-tuned on a diverse dataset totaling approximately 100% of training data, composed of:
This multi-source approach ensures robust performance across different domains and translation directions.
The model was evaluated on 200 samples from the openlanguagedata/flores_plus dataset using multiple metrics: BLEU, CHRF, COMET, and BLEURT.
| Model | BLEU | CHRF | COMET | BLEURT |
|---|---|---|---|---|
| NLLB-200-uz-en-v1 | 20.22 | 59.3 | 0.906 | 0.766 |
| Tahrirchi Tilmoch | 19.83 | 58.01 | 0.91 | 0.795 |
| NLLB-200 Baseline | 13.07 | 51.73 | 0.881 | 0.707 |
| Model | BLEU | CHRF | COMET | BLEURT |
|---|---|---|---|---|
| NLLB-200-uz-en-v1 | 34.47 | 62.19 | 0.874 | 0.747 |
| Tahrirchi Tilmoch | 33.76 | 61.97 | 0.876 | 0.754 |
| NLLB-200 Baseline | 30.28 | 58.28 | 0.856 | 0.718 |
pip install transformers sentencepiece
from transformers import pipeline
def translate(text, src_lang, tgt_lang):
"""
Translate text between Uzbek and English using transformers pipeline.
"""
translator = pipeline(
"translation",
model="OvozifyLabs/nllb-en-uz-v1",
src_lang=src_lang,
tgt_lang=tgt_lang,
max_length=512
)
result = translator(text)
return result[0]["translation_text"]
# English → Uzbek
en_text = "Hello, how are you today?"
uz_translation = translate(en_text, "eng_Latn", "uzn_Latn")
print("EN:", en_text)
print("UZ:", uz_translation)
# Uzbek → English
uz_text = "Salom, bugun qandaysiz?"
en_translation = translate(uz_text, "uzn_Latn", "eng_Latn")
print("UZ:", uz_text)
print("EN:", en_translation)
def translate_batch(texts, src_lang, tgt_lang):
"""
Translate a list of texts using the transformers pipeline.
Pipeline automatically supports batch input.
"""
translator = pipeline(
"translation",
model="OvozifyLabs/nllb-en-uz-v1",
src_lang=src_lang,
tgt_lang=tgt_lang,
max_length=512
)
results = translator(texts)
return [item["translation_text"] for item in results]
# Example usage
texts = [
"Machine learning is fascinating.",
"I love learning new languages.",
"This is a great translation model."
]
translations = translate_batch(texts, src_lang="eng_Latn", tgt_lang="uzn_Latn")
for orig, trans in zip(texts, translations):
print(f"{orig} → {trans}")
<!-- ## Limitations and Bias
- The model's performance may vary depending on domain and text complexity
- Best results are achieved with general-purpose texts similar to the training data distribution
- The model may inherit biases present in the training data
- Performance on highly specialized technical or literary texts may require additional fine-tuning -->
This model is intended for:
This model inherits the license from the base NLLB-200 model. Please refer to the original model card for licensing information.
For questions, issues, or feedback, please open an issue in the model repository.