Downloads · 30 days
0
TajikNLPWorld/tajik-pos-rubert-lora
tajik-pos-rubert-lora is a token classification model from TajikNLPWorld. Use it when you need labels on individual words, such as names. It is set up for transformers. The card lists the license as apache-2.0.
This model is a fine-tuned version of DeepPavlov/rubert-base-cased with LoRA adapters for Tajik part-of-speech tagging. It achieves 61.4% accuracy and 57.2% weighted F1 on the test set.
Downloads · 30 days
0
Access
Public
Updated Mar 12, 2026
Repo size
1.2 MB
Likes
0
Public
Click a slice to open those files.
.json3.6 MB · 75%
From the Hugging Face model README
This model is a fine-tuned version of DeepPavlov/rubert-base-cased with LoRA adapters for Tajik part-of-speech tagging. It achieves 61.4% accuracy and 57.2% weighted F1 on the test set.
DeepPavlov/rubert-base-casedThis model can be used for automatic part-of-speech tagging of Tajik text. It takes a sentence as input and outputs a sequence of POS tags corresponding to each token.
Example:
from transformers import AutoTokenizer, AutoModelForTokenClassification
import torch
model = AutoModelForTokenClassification.from_pretrained("TajikNLPWorld/tajik-pos-rubert-lora")
tokenizer = AutoTokenizer.from_pretrained("TajikNLPWorld/tajik-pos-rubert-lora")
text = "Ин ҷумла барои санҷиш аст."
inputs = tokenizer(text, return_tensors="pt", padding=True, truncation=True)
with torch.no_grad():
outputs = model(**inputs).logits
predictions = torch.argmax(outputs, dim=-1)
# Convert predictions to tags
id2label = model.config.id2label
tokens = tokenizer.convert_ids_to_tokens(inputs["input_ids"][0])
pred_tags = [id2label[p.item()] for p in predictions[0]]
print(list(zip(tokens, pred_tags)))
The model can be integrated into larger NLP pipelines for Tajik, such as machine translation, information extraction, or syntactic analysis.
The model is trained on literary examples from the TajPersParallelLexicalCorpus. It may not perform well on highly domain‑specific texts (e.g., social media, legal documents) without further adaptation.
Users should evaluate the model on their own data before deployment. For applications where rare POS tags are critical, consider collecting more annotated examples or applying data augmentation.
Use the code snippet above. For batch processing, you can use the Hugging Face pipeline:
from transformers import pipeline
pipe = pipeline("token-classification", model="TajikNLPWorld/tajik-pos-rubert-lora")
result = pipe("Ин ҷумла барои санҷиш аст.")
print(result)
The model was fine‑tuned on the training split of the TajPersParallelLexicalCorpus (34,529 sentences). The sentences were extracted from the examples field of the dataset. For words that were not found in the POS dictionary, they were ignored (label -100) during training.
-100).r=8, lora_alpha=16, target modules: ["query", "value"]The test set consists of 4,317 sentences held out from the original dataset (10% of the data).
| Metric | Value |
|---|---|
| Accuracy | 0.614 |
| F1 Macro | 0.101 |
| F1 Weighted | 0.572 |
Per‑class F1 scores are as follows (only tags with non‑zero support in test set):
| Tag (Tajik) | English | F1 |
|---|---|---|
| исм | noun | 0.722 |
| сифат | adjective | 0.489 |
All other tags have zero F1 due to extreme class imbalance (very few test examples). More details can be found in the paper (to be published).
The model achieves a weighted F1 of 57.2%, which is a strong baseline for the first Tajik POS tagger. The macro F1 is low because rare tags are not correctly predicted.
We analyzed the most common confusions: nouns and adjectives are often misclassified for each other, reflecting the flexible nature of these categories in Tajik.
Base model: DeepPavlov/rubert-base-cased (12 layers, 768 hidden size, 12 heads). LoRA adapters are added to the query and value projection matrices in each self‑attention layer. The classification head is randomly initialized and trained jointly with the adapters.
Single NVIDIA GPU (CUDA 11.8).
BibTeX:
@misc{tajik_pos_rubert_2026,
title = {Tajik POS Tagger – ruBERT + LoRA},
author = {Arabov, Mullosharaf Kurbonovich},
year = {2026},
publisher = {Hugging Face},
url = {https://huggingface.co/TajikNLPWorld/tajik-pos-rubert-lora}
}
APA:
Arabov, M. K. (2026). Tajik POS Tagger – ruBERT + LoRA [Model]. Hugging Face. https://huggingface.co/TajikNLPWorld/tajik-pos-rubert-lora
The dataset used for training and evaluation is available at TajPersParallelLexicalCorpus. The complete experimental code will be released upon publication.
Mullosharaf K. Arabov
For questions or collaborations, please contact TajikNLPWorld or open an issue on the repository.