Downloads · 30 days
10
6% of all-time downloads
Dmitry43243242/icd10-ru-subgroup-d
icd10-ru-subgroup-d is a text classification model from Dmitry43243242. Use it when you need a label for a piece of text. The card lists the license as apache-2.0.
Multi-label classifier over 3-character ICD-10 subgroups inside chapter D. This specialist was distilled from local BERT teacher models into alexyalunin/RuBioBERT. Teacher weights are not uploaded to Hugging Face.
Downloads · 30 days
10
6% of all-time downloads
All-time downloads
164
Public
Parameters
178M
1.4 GB on disk
Likes
0
Public
Click a slice to open those files.
.safetensors713 MB · 99%
From the Hugging Face model README
Multi-label classifier over 3-character ICD-10 subgroups inside chapter D.
This specialist was distilled from local BERT teacher models into alexyalunin/RuBioBERT. Teacher weights are not uploaded to Hugging Face.
datasets/subgroups/group_D.csv10c1c6d836234bbd276eca3443a555ca9dfd77bab22f6ec5afcb6b938252fbc3label_map.json.direct_hard_training_no_distillationalexyalunin/RuBioBERT0.92035398230088490.9[]None, hard_loss_weight=None| metric | final specialist | teacher ensemble / fallback |
|---|---|---|
| macro_f1 | 0.6698 | |
| micro_f1 | 0.7299 | |
| weighted_f1 | 0.7358 | |
| subset_accuracy | 0.4732 | |
| hit@1 | 0.8571 | |
| hit@3 | 0.9286 | |
| recall@3 | 0.9286 | |
| mrr | 0.8996 |
Full per-label breakdown is available in metrics.json.
from transformers import AutoTokenizer, AutoModelForSequenceClassification
import torch
repo = "Dmitry43243242/icd10-ru-subgroup-d"
tok = AutoTokenizer.from_pretrained(repo)
mdl = AutoModelForSequenceClassification.from_pretrained(repo)
mdl.eval()
text = "жалобы пациента..."
inp = tok(text, return_tensors="pt", truncation=True, max_length=512)
with torch.no_grad():
probs = torch.sigmoid(mdl(**inp).logits)[0]
preds = [mdl.config.id2label[i] for i, p in enumerate(probs.tolist()) if p >= 0.5]
top5 = sorted(
[(mdl.config.id2label[i], p) for i, p in enumerate(probs.tolist())],
key=lambda x: -x[1],
)[:5]
print(preds, top5)