π§ DistilBERT Response Type Classifier
This is a fine-tuned DistilBERT model designed to classify patient messages into one of four mental health support categories:
- advice
- information
- question
- validation
It is used as part of the Mental Health Counselor Assistant app to help generate helpful, therapeutic responses.
πΌ Use Case
Given a short text input from a patient, this model predicts the most appropriate type of response a mental health counselor might provide.
Example:
from transformers import DistilBertForSequenceClassification, DistilBertTokenizerFast
import torch
model = DistilBertForSequenceClassification.from_pretrained("scdong/distilbert-response-type")
tokenizer = DistilBertTokenizerFast.from_pretrained("scdong/distilbert-response-type")
text = "I just feel so overwhelmed lately"
inputs = tokenizer(text, return_tensors="pt")
with torch.no_grad():
logits = model(**inputs).logits
predicted_label = torch.argmax(logits, dim=1).item()
print(predicted_label) # Maps to: 0=advice, 1=information, 2=question, 3=validation
The model is used to route text to custom prompt templates like:
- Advice prompt: βYou are a licensed counselor. What supportive advice would you give to someone who said: {msg}?β
- Validation prompt: βYou are an empathetic therapist. Validate the clientβs emotions in response to: {msg}β
π Files
This repo includes:
config.jsonβ model architecture configmodel.safetensorsβ trained model weightstokenizer_config.json,tokenizer.json,vocab.txtβ tokenizer filesspecial_tokens_map.jsonβ optional token mappingstraining_args.binβ training metadata (optional)
π§ͺ Training Details
The model was fine-tuned using a balanced dataset labeled with response types based on:
The final model was validated on a held-out test set and integrated into the counselor assistant tool.
π License
This model is released under an open license for research and educational purposes. Please use responsibly and do not deploy for unsupervised clinical use.
- Downloads last month
- 5