Views
No views yet
alabnii/jmedroberta-base-manbyo-wordpiece1from transformers import AutoModelForSequenceClassification, AutoTokenizer
2import torch
3
4model_name = "alabnii/jmedroberta-base-manbyo-wordpiece"
5model = AutoModelForSequenceClassification.from_pretrained(
6 model_name,
7 num_labels=18,
8 problem_type="multi_label_classification"
9)
10tokenizer = AutoTokenizer.from_pretrained(model_name)
11
12def infer(texts):
13 inputs = tokenizer(texts, padding=True, truncation=True, return_tensors="pt")
14 with torch.no_grad():
15 logits = model(**inputs).logits
16 return torch.sigmoid(logits)
17
18texts = ["両肺に淡い浸潤影を認めます。"]
19probs = infer(texts)@misc{yamagishi2024ctrep,
title={Development of a Large-scale Dataset of Chest Computed Tomography Reports in Japanese and a High-performance Finding Classification Model},
author={Yosuke Yamagishi et al.},
year={2024},
eprint={2412.15907},
archivePrefix={arXiv},
primaryClass={cs.CL}
}
@misc{yamagishi2025modernber,
title={ModernBERT is More Efficient than Conventional BERT for Chest CT Findings Classification in Japanese Radiology Reports},
author={Yosuke Yamagishi et al.},
year={2025},
eprint={2503.05060},
archivePrefix={arXiv},
primaryClass={cs.CL}
}