CoolFace
Modelpublic

ardakshalkar/kazakh-trilingual-gliner

sourceHugging Faceapache-2.0updated 7d agoView on Hugging Face
0likes26downloads
Model Card

Kazakh & Trilingual (Kazakh / Russian / English) GLiNER

A generalist and lightweight Named Entity Recognition (GLiNER) model fine-tuned for Kazakh, Russian, and English. It provides open-vocabulary / zero-shot entity extraction across both general domain text (news, literature, government) and university administrative communications (student inquiries, academic requests, code-switching).

Model Overview

  • —Backbone: Multilingual DeBERTa-v3 (urchade/gliner_multi-v2.1)
  • —Parameters: ~209M
  • —Training Data: 34,000+ blended sentences from KazNERD and academic inquiries.
  • —Key Capability: Zero-shot extraction of arbitrary entity types without retraining.

Test Set Benchmark (Held-out Test Split)

  • —Overall Micro F1: 90.0%
  • —Overall Recall: 92.5%
  • —Overall Precision: 87.6%
Entity ClassPrecisionRecallF1-Score
person97.0%99.0%98.0%
gpe (locations / cities)94.5%96.3%95.4%
date91.9%93.2%92.6%
cardinal (numbers)91.4%98.8%94.9%
money100.0%100.0%100.0%
percentage100.0%100.0%100.0%
position (job titles)85.7%96.8%90.9%
organisation71.4%85.1%77.7%

Installation

bash
pip install gliner

Quick Start / Inference

python
from gliner import GLiNER

# Load the model directly from Hugging Face Hub
model = GLiNER.from_pretrained("ardakshalkar/kazakh-trilingual-gliner")

# Example 1: Kazakh student inquiry with domain entities
text_kk = "Сәлеметсіз бе! Мен Батыр Төремұратов, Платонус жүйесінен анықтама ала алмай жатырмын."
labels = ["student_name", "academic_system", "document_type"]

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
text_news = "Қасым-Жомарт Тоқаев Астана қаласында жиын өткізді."
entities_news = model.predict_entities(text_news, ["person", "location"], threshold=0.5)
for ent in entities_news:
    print(f"{ent['label']}: {ent['text']} ({ent['score']:.2%})")