ardakshalkar/kazakh-trilingual-gliner-small
013
Kazakh & Trilingual (Kazakh / Russian / English) GLiNER — Small (Pruned + FP16)
This is the ultra-compact, high-speed Small Edition of the fine-tuned Kazakh & Trilingual GLiNER model.
By combining Vocabulary Pruning (stripping 104,000+ non-target multilingual tokens) and FP16 Half-Precision, the model footprint has been reduced by 63.8% (from 1.1 GB down to 398 MB) while maintaining 100% accuracy parity (89.6% Micro F1) and delivering 40% faster inference.
Benchmark & Compression Comparison
Evaluated on held-out test split (dual NVIDIA RTX 5080 & Intel CPU):
Optimization Highlights
- Targeted Vocabulary: Stripped out non-target scripts (Chinese, Japanese, Korean, Arabic, Thai, Devanagari, etc.), preserving 100% of Latin, Cyrillic, Kazakh Cyrillic (
әіңғүұқөһ), digits, and currency symbols (₸,₽,€,$,£). - Zero Degradation: Retains identical 89.6% Micro F1 score across all target entities.
- Fast & Light: Ideal for edge deployment, microservices, mobile backends, and CPU-only cloud environments.
Installation
pip install glinerQuick Start / Inference
from gliner import GLiNER
# Loads weights directly from Hugging Face Hub (only ~398 MB download!)
model = GLiNER.from_pretrained("ardakshalkar/kazakh-trilingual-gliner-small")
# Example 1: Kazakh student inquiry with domain entities
text_kk = "Сәлеметсіз бе! Мен Батыр Төремұратов, «Ақпараттық жүйелер» мамандығында оқимын. Платонус жүйесінен анықтама ала алмай жатырмын."
labels = ["student_name", "academic_system", "document_type", "major_or_program"]
entities = model.predict_entities(text_kk, labels, threshold=0.4)
for ent in entities:
print(f"[{ent['label']}] -> {ent['text']} ({ent['score']:.2%})")
# Example 2: General Kazakh news & entities
text_news = "Қасым-Жомарт Тоқаев Астана қаласында «Самұрық-Қазына» қорының 500 млрд теңгелік жаңа жобасын талқылады."
labels_news = ["person", "location", "organization", "money"]
entities_news = model.predict_entities(text_news, labels_news, threshold=0.5)
for ent in entities_news:
print(f"[{ent['label']}] -> {ent['text']} ({ent['score']:.2%})")Target Entity Classes
Trained and evaluated on 29 entity categories, including:
- General Named Entities:
person,location/gpe,organisation,date,time,cardinal,money,percentage,position, etc. - University / Administrative Entities:
student_name,staff_name,major_or_program,academic_system,document_type,academic_term,department_or_office,contact_info.
Citation & Base Model
- Base Model: `urchade/gliner_multi-v2.1`
- Training Benchmark: Issai KazNERD
