Text Generation
Transformers
Safetensors
qwen2
qwen
therapy
mental-health
counseling
fine-tuned
LoRA
r64
conversational
text-generation-inference
Instructions to use ArkMaster123/qwen2.5-7b-therapist-v2 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use ArkMaster123/qwen2.5-7b-therapist-v2 with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="ArkMaster123/qwen2.5-7b-therapist-v2") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoTokenizer, AutoModelForMultimodalLM tokenizer = AutoTokenizer.from_pretrained("ArkMaster123/qwen2.5-7b-therapist-v2") model = AutoModelForMultimodalLM.from_pretrained("ArkMaster123/qwen2.5-7b-therapist-v2") messages = [ {"role": "user", "content": "Who are you?"}, ] inputs = tokenizer.apply_chat_template( messages, add_generation_prompt=True, tokenize=True, return_dict=True, return_tensors="pt", ).to(model.device) outputs = model.generate(**inputs, max_new_tokens=40) print(tokenizer.decode(outputs[0][inputs["input_ids"].shape[-1]:])) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use ArkMaster123/qwen2.5-7b-therapist-v2 with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "ArkMaster123/qwen2.5-7b-therapist-v2" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "ArkMaster123/qwen2.5-7b-therapist-v2", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/ArkMaster123/qwen2.5-7b-therapist-v2
- SGLang
How to use ArkMaster123/qwen2.5-7b-therapist-v2 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 "ArkMaster123/qwen2.5-7b-therapist-v2" \ --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": "ArkMaster123/qwen2.5-7b-therapist-v2", "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 "ArkMaster123/qwen2.5-7b-therapist-v2" \ --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": "ArkMaster123/qwen2.5-7b-therapist-v2", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use ArkMaster123/qwen2.5-7b-therapist-v2 with Docker Model Runner:
docker model run hf.co/ArkMaster123/qwen2.5-7b-therapist-v2
Qwen2.5-7B-Instruct Therapist v2
Fine-tuned version of Qwen/Qwen2.5-7B-Instruct for therapeutic conversations.
Model Details
- Base Model: Qwen/Qwen2.5-7B-Instruct
- Fine-tuning Method: LoRA (Rank 64) + merged into full model
- Training Dataset: Jyz1331/therapist_conversations (250 conversations)
- Training Infrastructure: Modal A100 GPU
- Training Time: ~10 min on A100
Training Pipeline
Phase 1: SFT (LoRA r=64)
- Learning rate: 2e-4, cosine schedule, 10% warmup
- Effective batch size: 32 (4×8 gradient accumulation)
- Epochs: 3
- bf16 training, gradient checkpointing
- Trainable params: ~340M (4.5% of total)
Phase 2: Merged
- LoRA adapter merged into base model for single-file deployment
Usage
from transformers import AutoModelForCausalLM, AutoTokenizer
model = AutoModelForCausalLM.from_pretrained("ArkMaster123/qwen2.5-7b-therapist-v2")
tokenizer = AutoTokenizer.from_pretrained("ArkMaster123/qwen2.5-7b-therapist-v2")
messages = [{"role": "user", "content": "I'm feeling anxious about work"}]
text = tokenizer.apply_chat_template(messages, tokenize=False, add_generation_prompt=True)
inputs = tokenizer([text], return_tensors="pt").to(model.device)
outputs = model.generate(**inputs, max_new_tokens=512, temperature=0.7)
response = tokenizer.decode(outputs[0], skip_special_tokens=True)
print(response)
Safety Limitations
This model is not a replacement for professional mental health services. For crises, please contact emergency services or a crisis helpline.
Citation
@misc{therapist-v2,
author = {ArkMaster123},
title = {Qwen2.5-7B-Instruct Therapist v2},
year = {2026},
publisher = {Hugging Face},
howpublished = {\url{https://huggingface.co/ArkMaster123/qwen2.5-7b-therapist-v2}}
}
- Downloads last month
- 98