Downloads · 30 days
15
37% of all-time downloads
IIchukissII/enhanced-bert-coqa-multilabel-classifier
enhanced-bert-coqa-multilabel-classifier is a text classification model from IIchukissII. Use it when you need a label for a piece of text. The card lists the license as apache-2.0.
- Micro F1: 0.7779 - Macro F1: 0.7098 - Optimal Threshold: 0.20 (CRITICAL - not 0.5!)
Downloads · 30 days
15
37% of all-time downloads
All-time downloads
41
Public
Parameters
110M
442 MB on disk
Likes
0
Public
Click a slice to open those files.
.safetensors442 MB · 100%
From the Hugging Face model README
| Label | F1 Score | Status |
|---|---|---|
| questioning | 0.933 | Excellent |
| responsive | 0.756 | Good |
| interactive | 0.613 | Good (breakthrough!) |
| collaborative | 0.537 | Acceptable |
from transformers import AutoTokenizer, AutoModelForSequenceClassification
import torch
model = AutoModelForSequenceClassification.from_pretrained("IIchukissII/enhanced-bert-coqa-multilabel-classifier")
tokenizer = AutoTokenizer.from_pretrained("IIchukissII/enhanced-bert-coqa-multilabel-classifier")
text = "context [SEP] question [SEP] answer"
inputs = tokenizer(text, return_tensors="pt", truncation=True, max_length=512)
with torch.no_grad():
outputs = model(**inputs)
probs = torch.sigmoid(outputs.logits)
# IMPORTANT: Use threshold 0.20, not 0.5!
LABELS = ["interactive", "responsive", "questioning", "collaborative"]
predictions = {label: int(probs[0, i] >= 0.20) for i, label in enumerate(LABELS)}