CoolFace
Modelpublic

NeuronUz/NeuronAI-Uzbek

sourceHugging Faceapache-2.0updated 8mo agoView on Hugging Face
7likes428downloads
Model Card

<div align="center">

πŸ‡ΊπŸ‡Ώ NeuronAI-Uzbek

The Most Advanced Open-Source Language Model for Uzbek

![Model](https://huggingface.co/NeuronUz/NeuronAI-Uzbek) ![License](https://opensource.org/licenses/Apache-2.0) ![Base Model](https://huggingface.co/Qwen/Qwen3-4B)

πŸ† 4th Place Globally | πŸ₯‡ 1st Place in Uzbekistan on UzLiB Benchmark

Outperforming GPT-4o, Claude 3.5 Sonnet, and Gemini 2.5 Flash on Uzbek language tasks

</div>


πŸ“Š Key Results

<div align="center">

AchievementValue
UzLiB Overall Score0.662
Global Ranking#4
Regional Ranking#1 in Uzbekistan
Tokenizer Efficiency Improvement+22.5% vs Qwen3-4B

</div>


πŸ† UzLiB Benchmark Performance

NeuronAI-Uzbek achieves exceptional performance on the UzLiB Benchmark, the comprehensive evaluation suite for Uzbek language understanding.

Leaderboard Position

![image](https://github.com/tahrirchi/uzlib/blob/main/LEADERBOARD.md)

Note: NeuronAI-Uzbek is the smallest model in the top 10, with only 4B parameters, while competing against models with 100B+ parameters.

Performance Comparison vs Original Qwen3-4B

MetricQwen3-4B (Original)NeuronAI-UzbekImprovement
Overall (All)0.3450.662+91.9%
Correct Word0.3510.718+104.6%
Meaning0.3090.466+50.8%
Meaning in Context0.3470.333-4.0%
Fill-in0.3270.385+17.7%

πŸ”€ Tokenizer Efficiency

We optimized the tokenizer specifically for Uzbek, achieving significantly better tokenization efficiency (lower fertility rate = fewer tokens per word = faster inference and lower costs).

Fertility Rate Comparison

ModelFertility RateStd DevVocab SizeImprovement vs Qwen3
NeuronAI-Uzbek (Ours) πŸ†2.670.15180,000+22.5%
Gemma 2-9B3.150.22256,000+8.3%
LLaMA 3.1-8B3.320.22128,256+3.7%
DeepSeek-V33.320.21128,815+3.4%
Qwen3-4B (Original)3.440.22151,669-
Fertility Rate: Average number of tokens per word. Lower is better for efficiency.

<div align="center"> <img src="assets/fertilitycomparisonchart.png" alt="Tokenizer Fertility Rate Comparison" width="700"/> </div>

What This Means

  • β€”22.5% fewer tokens needed to represent Uzbek text
  • β€”Faster inference due to shorter sequences
  • β€”Lower API costs when deployed
  • β€”Better context utilization - fit more content in the same context window

πŸ› οΈ Model Details

Architecture

PropertyValue
Base ModelQwen3-4B
Parameters4 Billion
Vocabulary Size180,000 tokens
Context Length32,768 tokens
ArchitectureTransformer (Decoder-only)
PrecisionBFloat16

Training Methodology

  1. 1.Tokenizer Surgery: Extended vocabulary with 40,000 Uzbek-optimized tokens
  2. 2.Embedding Initialization: Semantic initialization using subword composition
  3. 3.Continual Pretraining: Trained on 2B tokens of Uzbek and English text corpus
  4. 4.Instruction Fine-tuning: Aligned using Uzbek and English instruction datasets

Training Data

DatasetTypePurpose
Uzbek Web CorpusPretrainingLanguage modeling
behbudiy/alpaca-cleaned-uzSFTUzbek instructions
NeuronUz/uzbek-spelling-mcqSFTBenchmark-targeted training
vicgalle/alpaca-gpt4SFTEnglish capability retention

πŸš€ Quick Start

Installation

bash
pip install transformers torch

Basic Usage

python
from transformers import AutoModelForCausalLM, AutoTokenizer

model_name = "NeuronUz/NeuronAI-Uzbek"

tokenizer = AutoTokenizer.from_pretrained(model_name, trust_remote_code=True)
model = AutoModelForCausalLM.from_pretrained(
    model_name,
    torch_dtype="auto",
    device_map="auto",
    trust_remote_code=True
)

prompt = "O'zbekiston haqida qisqacha ma'lumot bering."

messages = [
    {"role": "user", "content": prompt}
]

text = tokenizer.apply_chat_template(
    messages,
    tokenize=False,
    add_generation_prompt=True
)

inputs = tokenizer(text, return_tensors="pt").to(model.device)
outputs = model.generate(
    **inputs,
    max_new_tokens=512,
    temperature=0.7,
    top_p=0.9,
    do_sample=True
)

response = tokenizer.decode(outputs[0][inputs['input_ids'].shape[1]:], skip_special_tokens=True)
print(response)

With Thinking Mode (Chain-of-Thought)

python
messages = [
    {"role": "user", "content": "5 ta 3 ga bo'linuvchi 100 dan kichik natural sonlarni toping."}
]

text = tokenizer.apply_chat_template(
    messages,
    tokenize=False,
    add_generation_prompt=True,
    enable_thinking=True  # Enable step-by-step reasoning
)

πŸ“ˆ Use Cases

NeuronAI-Uzbek excels at:

  • β€”πŸ“ Text Generation: Creative writing, content creation in Uzbek
  • —❓ Question Answering: Answering questions about Uzbek culture, history, and general knowledge
  • β€”πŸ“š Reading Comprehension: Understanding and analyzing Uzbek texts
  • β€”πŸ”€ Grammar & Spelling: Uzbek language correctness tasks
  • β€”πŸŒ Translation Assistance: Uzbek-English language tasks
  • β€”πŸ’¬ Conversational AI: Building Uzbek chatbots and assistants

⚠️ Limitations

  • β€”Knowledge Cutoff: Training data has a knowledge cutoff date
  • β€”Hallucinations: May generate plausible-sounding but incorrect information
  • β€”Bias: May reflect biases present in training data
  • β€”Not for Critical Applications: Should not be used for medical, legal, or safety-critical applications without human oversight

πŸ“œ License

This model is released under the Apache 2.0 License.


πŸ™ Acknowledgments

  • β€”Qwen Team at Alibaba for the excellent Qwen3-4B base model
  • β€”UzLiB Benchmark creators for the comprehensive evaluation framework
  • β€”Uzbek NLP Community for datasets and linguistic resources

πŸ“– Citation

bibtex
@misc{neuronai-uzbek-2025,
  title={NeuronAI-Uzbek: An Optimized Language Model for Uzbek},
  author={NeuronAI Team},
  year={2025},
  publisher={Hugging Face},
  url={https://huggingface.co/NeuronUz/NeuronAI-Uzbek}
}

<div align="center">

Built with ❀️ in Uzbekistan by [NeuronUz](https://huggingface.co/NeuronUz)

</div>