Downloads · 30 days
10
16% of all-time downloads
maliksaad/empathLM-v2
empathLM-v2 is a machine learning model from maliksaad. Use it for the machine learning task on the model card, and read the license before you ship it in a product. The card lists the license as mit.
Fine-tuned for Psychologically Safe & Persuasive Emotional Support
Downloads · 30 days
10
16% of all-time downloads
All-time downloads
61
Public
Parameters
135M
538 MB on disk
Likes
0
Public
Click a slice to open those files.
.safetensors538 MB · 99%
From the Hugging Face model README
Fine-tuned for Psychologically Safe & Persuasive Emotional Support
EmpathLM is a fine-tuned version of SmolLM2-135M-Instruct trained to generate responses that combine Motivational Interviewing (MI) and Cognitive Behavioral Therapy (CBT) principles.
Unlike general-purpose language models, EmpathLM is specifically optimized to:
EmpathLM was benchmarked against GPT-4o-mini and a Groq baseline on 20 unseen test situations, scored across: emotional_validation, advice_avoidance, perspective_shift, and overall_empathy.
See the GitHub repository for full benchmark results.
from transformers import AutoTokenizer, AutoModelForCausalLM
tokenizer = AutoTokenizer.from_pretrained("maliksaad/empathLM")
model = AutoModelForCausalLM.from_pretrained("maliksaad/empathLM")
SYSTEM_PROMPT = """You are EmpathLM — an emotionally intelligent AI trained in Motivational Interviewing
and Cognitive Behavioral Therapy. When someone shares emotional pain:
- Validate their feelings without judgment
- Reflect their emotions back to them
- Ask one powerful open-ended question
- NEVER give unsolicited advice"""
messages = [
{"role": "system", "content": SYSTEM_PROMPT},
{"role": "user", "content": "I failed my exam again. I feel like I'm just not smart enough."},
]
inputs = tokenizer.apply_chat_template(messages, return_tensors="pt", add_generation_prompt=True)
outputs = model.generate(inputs, max_new_tokens=200, temperature=0.7)
print(tokenizer.decode(outputs[0][inputs.shape[1]:], skip_special_tokens=True))
| Parameter | Value |
|---|---|
| Base Model | SmolLM2-135M-Instruct |
| Training Examples | ~180 (90% of 200) |
| Epochs | 3 |
| Batch Size | 8 |
| Learning Rate | 2e-5 |
| Max Sequence Length | 512 |
| Training Platform | Kaggle (Free GPU) |
Trained on maliksaad/empathLM-dataset
@model{saad2025empathLM,
title = {EmpathLM: A Psychologically-Grounded Empathetic Response Model},
author = {Muhammad Saad},
year = {2025},
url = {https://huggingface.co/maliksaad/empathLM}
}