Downloads · 30 days
5
5% of all-time downloads
Dmitry43243242/icd10-ru-subgroup-s
icd10-ru-subgroup-s 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 S. Fine-tuned from ai-forever/ruBert-base on Russian clinical text.
Downloads · 30 days
5
5% of all-time downloads
All-time downloads
91
Public
Parameters
178M
713 MB 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 S.
Fine-tuned from ai-forever/ruBert-base on Russian clinical text.
datasets/subgroups/group_S.csv9c986818c4b97058e6f088821cd3d84a9c96b26327dd5d6de375b2b7389c4b4cml/build_subgroup_datasets.ipynb (iterative multi-label stratification by parse_id).S_OTHER for rare codes collapsed during dataset build).| metric | value |
|---|---|
| macro_f1 | 0.6207 |
| micro_f1 | 0.6403 |
| weighted_f1 | 0.6724 |
| subset_accuracy | 0.3846 |
| hit@1 | 0.9038 |
| hit@3 | 0.9423 |
| recall@3 | 0.9038 |
| mrr | 0.9284 |
Full per-label breakdown in metrics.json.
*ДАТА*, *ГОРОД*, ...); model may behave differently on non-redacted input.label_map.json → rare_label_ids) for interface stability but will effectively never fire.from transformers import AutoTokenizer, AutoModelForSequenceClassification
import torch
repo = "Dmitry43243242/icd10-ru-subgroup-s"
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]
top3 = sorted(
[(mdl.config.id2label[i], p) for i, p in enumerate(probs.tolist())],
key=lambda x: -x[1],
)[:3]
print(preds, top3)
Built as part of the ai-app ICD-10 classification pipeline. Upstream model: ai-forever/ruBert-base (ai-forever).