Downloads · 30 days
10
3% of all-time downloads
Yehor/ual-topics-classifier
ual-topics-classifier is a machine learning model from Yehor. 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 cc-by-nc-sa-4.0.
- Epochs: 25 (batch size: 128) - Train loss: 0.13934 - Validation loss: 1.61486 - Test accuracy: 0.64375 - F1 (MACRO): 0.42084
Downloads · 30 days
10
3% of all-time downloads
All-time downloads
286
Public
Parameters
52.6M
421 MB on disk
Likes
2
Public
Click a slice to open those files.
.safetensors210 MB · 100%
From the Hugging Face model README
import torch
from transformers import AutoTokenizer, AutoModelForSequenceClassification, pipeline
tokenizer = AutoTokenizer.from_pretrained("Yehor/ual-topics-classifier")
model = AutoModelForSequenceClassification.from_pretrained("Yehor/ual-topics-classifier")
device = torch.device('cuda' if torch.cuda.is_available() else 'cpu')
topic_classifier = pipeline(task='text-classification', model=model, tokenizer=tokenizer, device=device, top_k=5)
question = """
Що мені робити на ВЛК
"""
print(topic_classifier(question))
question = """
Які мої дії для отримання аліментів на дитину
"""
print(topic_classifier(question))
Results:
[[{'label': 'viiskovie_pravo', 'score': 0.9837057590484619}, {'label': 'inshe', 'score': 0.006433702539652586}, {'label': 'pratsevlashtuvvannya', 'score': 0.0026765114162117243}, {'label': 'sotsialnyj_zakhist', 'score': 0.0007523931562900543}, {'label': 'tsivilne_pravo', 'score': 0.000704631267581135}]]
[[{'label': 'simejne_pravo', 'score': 0.9449325799942017}, {'label': 'sotsialnyj_zakhist', 'score': 0.03451702371239662}, {'label': 'sudova_praktika', 'score': 0.0030595543794333935}, {'label': 'kriminalnie_pravo', 'score': 0.0024321323726326227}, {'label': 'viiskovie_pravo', 'score': 0.0022115600295364857}]]
@misc {smoliakov_2025,
author = { {Smoliakov} },
title = { ual-topics-classifier (Revision 9bd3227) },
year = 2025,
url = { https://huggingface.co/Yehor/ual-topics-classifier },
doi = { 10.57967/hf/4553 },
publisher = { Hugging Face }
}