Instructions to use JamieYCR/qwen25-7b-empathy with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- PEFT
How to use JamieYCR/qwen25-7b-empathy with PEFT:
from peft import PeftModel from transformers import AutoModelForCausalLM base_model = AutoModelForCausalLM.from_pretrained("unsloth/Qwen2.5-7B-Instruct-bnb-4bit") model = PeftModel.from_pretrained(base_model, "JamieYCR/qwen25-7b-empathy") - Transformers
How to use JamieYCR/qwen25-7b-empathy with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="JamieYCR/qwen25-7b-empathy") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("JamieYCR/qwen25-7b-empathy", dtype="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps
- vLLM
How to use JamieYCR/qwen25-7b-empathy with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "JamieYCR/qwen25-7b-empathy" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "JamieYCR/qwen25-7b-empathy", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/JamieYCR/qwen25-7b-empathy
- SGLang
How to use JamieYCR/qwen25-7b-empathy with SGLang:
Install from pip and serve model
# Install SGLang from pip: pip install sglang # Start the SGLang server: python3 -m sglang.launch_server \ --model-path "JamieYCR/qwen25-7b-empathy" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "JamieYCR/qwen25-7b-empathy", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker images
docker run --gpus all \ --shm-size 32g \ -p 30000:30000 \ -v ~/.cache/huggingface:/root/.cache/huggingface \ --env "HF_TOKEN=<secret>" \ --ipc=host \ lmsysorg/sglang:latest \ python3 -m sglang.launch_server \ --model-path "JamieYCR/qwen25-7b-empathy" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "JamieYCR/qwen25-7b-empathy", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Unsloth Studio
How to use JamieYCR/qwen25-7b-empathy with Unsloth Studio:
Install Unsloth Studio (macOS, Linux, WSL)
curl -fsSL https://unsloth.ai/install.sh | sh # Run unsloth studio unsloth studio -H 0.0.0.0 -p 8888 # Then open http://localhost:8888 in your browser # Search for JamieYCR/qwen25-7b-empathy to start chatting
Install Unsloth Studio (Windows)
irm https://unsloth.ai/install.ps1 | iex # Run unsloth studio unsloth studio -H 0.0.0.0 -p 8888 # Then open http://localhost:8888 in your browser # Search for JamieYCR/qwen25-7b-empathy to start chatting
Using HuggingFace Spaces for Unsloth
# No setup required # Open https://huggingface.co/spaces/unsloth/studio in your browser # Search for JamieYCR/qwen25-7b-empathy to start chatting
Load model with FastModel
pip install unsloth from unsloth import FastModel model, tokenizer = FastModel.from_pretrained( model_name="JamieYCR/qwen25-7b-empathy", max_seq_length=2048, ) - Docker Model Runner
How to use JamieYCR/qwen25-7b-empathy with Docker Model Runner:
docker model run hf.co/JamieYCR/qwen25-7b-empathy
qwen25-7b-empathy
qwen25-7b-empathy is a LoRA adapter fine-tuned from unsloth/Qwen2.5-7B-Instruct-bnb-4bit for emotionally supportive conversation. The goal is to make Qwen2.5-7B respond less like a generic daily chatbot and more like an empathetic support assistant: validating feelings first, reflecting the user's emotional state, and offering gentle next steps when appropriate.
This repository contains the PEFT adapter weights, tokenizer files, chat template, and model card. It is not a merged full-weight model.
Model Details
- Developed by: JamieYCR
- Model type: Qwen2.5-7B Instruct LoRA adapter
- Base model:
unsloth/Qwen2.5-7B-Instruct-bnb-4bit - Library: PEFT / Transformers / TRL / Unsloth
- Language: English
- Task: text generation, emotional-support conversation
- Adapter size: about 154 MB
Intended Use
This adapter is intended for research, demos, and experiments around empathetic dialogue generation. It can be used for:
- emotionally supportive chatbot responses
- empathy-focused response generation
- comparison with a base Qwen2.5 instruction model
- classroom or portfolio demonstrations of LoRA fine-tuning
It should not be used as a replacement for professional mental health care, medical advice, legal advice, or emergency support. For crisis or self-harm situations, route users to qualified human help and local emergency resources.
Training Data
The final training mix emphasized empathy-focused and harder emotional-support examples rather than ordinary small talk. The mix included:
- EmpatheticDialogues
- ESConv emotional-support conversations
- CounselChat-style counseling QA examples
- locally generated hard-case domain examples from difficult emotional scenarios
- handwritten empathy-boost examples
- safety-oriented examples
Daily small-talk data was removed from the boosted run so the model would learn deeper validation and emotional reflection instead of casual chatbot replies.
Training Procedure
The adapter was trained with supervised fine-tuning using QLoRA/LoRA on Qwen2.5-7B Instruct.
Key settings from the final boosted run:
- LoRA rank: 16
- LoRA alpha: 16
- LoRA dropout: 0.0
- Target modules:
q_proj,k_proj,v_proj,o_proj,gate_proj,up_proj,down_proj - Training epochs: 3
- Learning rate: 7.5e-5
- PEFT version: 0.19.1
- Final local adapter path:
outputs/qwen25-7b-empathy-boosted/final_lora
Example Behavior
Prompt:
Emotion: sadness 0.62, disappointment 0.28
Message: I keep telling everyone I'm just tired, but honestly I don't remember the last time I felt excited for anything.
Example response:
That sounds really painful, like the absence of hope feels harsh and physical. It makes sense that you feel discouraged; you deserve support around how hard this has been, not just pressure to feel better quickly.
How to Load
from peft import AutoPeftModelForCausalLM
from transformers import AutoTokenizer
import torch
adapter_id = "JamieYCR/qwen25-7b-empathy"
tokenizer = AutoTokenizer.from_pretrained(adapter_id)
model = AutoPeftModelForCausalLM.from_pretrained(
adapter_id,
device_map="auto",
torch_dtype=torch.bfloat16,
)
messages = [
{
"role": "system",
"content": "You are a deeply empathetic emotional-support assistant. Validate feelings first, reflect the user's emotional state, and avoid generic small talk.",
},
{
"role": "user",
"content": "I keep telling everyone I'm just tired, but honestly I don't remember the last time I felt excited for anything.",
},
]
inputs = tokenizer.apply_chat_template(
messages,
return_tensors="pt",
add_generation_prompt=True,
).to(model.device)
outputs = model.generate(
inputs,
max_new_tokens=220,
temperature=0.7,
top_p=0.9,
)
print(tokenizer.decode(outputs[0][inputs.shape[-1]:], skip_special_tokens=True))
Limitations and Risks
- The model can sound emotionally supportive, but it does not understand a user's full real-world context.
- It may over-validate, miss clinical risk, or give advice that is too general.
- It may produce unsafe or incomplete answers in crisis situations.
- It inherits limitations and biases from the base model and training data.
- It should be evaluated carefully before use in any user-facing support setting.
Recommended Safeguards
- Add crisis detection and human escalation for self-harm, abuse, violence, or emergency situations.
- Make it clear to users that the system is not a therapist or medical professional.
- Test responses across different emotional states and user backgrounds.
- Monitor for generic, dismissive, overly directive, or unsafe responses.
Citation
If you use this adapter, cite the base Qwen2.5 model and the datasets used in your training/evaluation notes where applicable.
Contact
For questions about this fine-tuned adapter, contact the repository owner on Hugging Face: JamieYCR.
- Downloads last month
- 45
Model tree for JamieYCR/qwen25-7b-empathy
Base model
Qwen/Qwen2.5-7B