Downloads · 30 days
0
itsLu/mentalbert-v5-quick-vibe-v2
mentalbert-v5-quick-vibe-v2 is a text classification model from itsLu. Use it when you need a label for a piece of text. The card lists the license as mit.
Calibrated, safety-aware mental health text classifier with abstention. Post-hoc upgrade to itsLu/mentalbert-v5-source-aware — encoder weights are unchanged.
Downloads · 30 days
0
Access
Public
Updated May 9, 2026
Repo size
1.9 KB
Likes
0
Public
Click a slice to open those files.
.py5.2 KB · 40%
From the Hugging Face model README
Calibrated, safety-aware mental health text classifier with abstention.
Post-hoc upgrade toitsLu/mentalbert-v5-source-aware— encoder weights are unchanged.
Quick Vibe v2 wraps the cooperative source-aware MentalBERT encoder with three post-hoc layers:
ABSTAIN rather than a low-confidence guess.SourceAwareMentalBERT (frozen):
bert: mental/mental-bert-base-uncased
cls_head: nn.Linear(768, 8) ← loaded from itsLu/mentalbert-v5-source-aware
Post-hoc stack (this repo):
Per-class temperature T ∈ ℝ⁸ ← calibration.pt
Asymmetric safety margin ← decision_thresholds.json
Abstention threshold ← decision_thresholds.json
Trained and calibrated on mohamedasem318/mental-health-dataset-extended-v5
(stratified 70/10/20 split, random_state=42).
| Run | Coverage | Acc (covered) | F1 Macro | Sui→Dep | Dep→Sui | Total Bleed |
|---|---|---|---|---|---|---|
| v1 (deployed) | 100.0% | 83.23% | 0.8381 | 544 | 715 | 1,259 |
| v2 (this) | 89.8% | 87.48% | 0.8763 | 354 | 553 | 907 |
Intended for mental health screening as a second-tier triage component
(Vibecheck deployment). Not a diagnostic instrument.
All outputs require human clinical review before action.
This model is a research prototype. Predictions, including Suicidal classifications,
are probabilistic and will contain errors. Do not use as the sole basis for
clinical decisions. Always involve a qualified mental health professional.
from huggingface_hub import hf_hub_download
import runpy, sys
# Download inference.py and run it in your environment
path = hf_hub_download(repo_id='itsLu/mentalbert-v5-quick-vibe-v2', filename='inference.py')
# Or: import directly once the file is on your path
# from inference import predict
# result = predict("I feel hopeless and empty.")
# print(result)
# {
# 'label': 'Depression',
# 'confidence': 0.72,
# 'all_probs': {...},
# # 'abstained': False, 'safety_flipped': False
# }
| File | Description |
|---|---|
calibration.pt | Per-class temperature tensors |
decision_thresholds.json | abstain_thresh, dep_sui_margin, metrics |
inference.py | Self-contained load + predict script |
@misc{mentalbert-quickvibe-v2,
author = {Mohamed Asem},
title = {MentalBERT Quick Vibe v2: Calibrated Safety-Aware Mental Health Classifier},
year = {2025},
url = {https://huggingface.co/itsLu/mentalbert-v5-quick-vibe-v2}
}