Views
No views yet
| Property | Value |
|---|---|
| Base model | answerdotai/ModernBERT-large |
| Task | Multi-label text classification |
| Labels | 516 total / 478 active |
| Max input length | 8,192 tokens |
| Languages | Multilingual (trained on EN-translated text) |
| Training epochs | 15 |
| Learning rate | 2e-5 |
| Batch size | 16 |
| Warmup ratio | 0.1 |
| Positive weight cap | 100.0 |
| Threshold strategy | Macro F1 | Micro F1 | Macro Precision |
|---|---|---|---|
| Raw (0.5) | 0.6497 | 0.6130 | — |
| F1-optimized per-label thresholds | 0.7017 | 0.6409 | — |
| Precision-biased thresholds (F-beta=0.5, floor=0.5) | 0.6589 | 0.6287 | 0.7578 |
thresholds.json — per-label thresholds that maximize F1thresholds_precision.json — per-label thresholds tuned for F-beta (β=0.5, precision floor=0.5)thresholds_precision.json is recommended: it suppresses 38 low-precision labels
entirely and raises thresholds on the remaining 478, trading a small F1 reduction for substantially
higher precision (~75.8% macro precision).large language models, computer vision, reinforcement learning,
cybersecurity, semiconductor industry, natural language processing,
autonomous vehicles, quantum computing, blockchain technology, robotics, ...label_list.json in this repository.transformers1import json
2import torch
3from transformers import AutoTokenizer, AutoModelForSequenceClassification
4
5model_id = "metacurate/topic-classifier-v13"
6
7tokenizer = AutoTokenizer.from_pretrained(model_id)
8model = AutoModelForSequenceClassification.from_pretrained(model_id)
9model.eval()
10
11# Load labels and precision thresholds
12with open("label_list.json") as f:
13 labels = json.load(f)
14
15with open("thresholds_precision.json") as f:
16 thresh_data = json.load(f)
17thresholds = dict(zip(thresh_data["labels"], thresh_data["thresholds"]))
18
19text = "OpenAI released GPT-5 with improved reasoning and coding capabilities."
20
21inputs = tokenizer(text, return_tensors="pt", truncation=True, max_length=4096)
22with torch.no_grad():
23 logits = model(**inputs).logits
24probs = torch.sigmoid(logits).squeeze().tolist()
25
26active = [
27 (label, round(score, 4))
28 for label, score in zip(labels, probs)
29 if score >= thresholds.get(label, 1.0)
30]
31print(active)
32# e.g. [('large language models', 0.9123), ('AI startups', 0.8741), ...]