Instructions to use RuiyingLiu/PsyCura-7B with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use RuiyingLiu/PsyCura-7B with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="RuiyingLiu/PsyCura-7B") messages = [ { "role": "user", "content": [ {"type": "image", "url": "https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/p-blog/candy.JPG"}, {"type": "text", "text": "What animal is on the candy?"} ] }, ] pipe(text=messages)# Load model directly from transformers import AutoTokenizer, AutoModelForMultimodalLM tokenizer = AutoTokenizer.from_pretrained("RuiyingLiu/PsyCura-7B") model = AutoModelForMultimodalLM.from_pretrained("RuiyingLiu/PsyCura-7B") messages = [ { "role": "user", "content": [ {"type": "image", "url": "https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/p-blog/candy.JPG"}, {"type": "text", "text": "What animal is on the candy?"} ] }, ] 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 RuiyingLiu/PsyCura-7B with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "RuiyingLiu/PsyCura-7B" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "RuiyingLiu/PsyCura-7B", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/RuiyingLiu/PsyCura-7B
- SGLang
How to use RuiyingLiu/PsyCura-7B 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 "RuiyingLiu/PsyCura-7B" \ --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": "RuiyingLiu/PsyCura-7B", "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 "RuiyingLiu/PsyCura-7B" \ --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": "RuiyingLiu/PsyCura-7B", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use RuiyingLiu/PsyCura-7B with Docker Model Runner:
docker model run hf.co/RuiyingLiu/PsyCura-7B
π§ PsyCura-7B
PsyCura-7B is a behavior-oriented large language model for multi-turn psychological counseling, built upon Qwen2.5-Omni-7B. The model is aligned through a progressive training framework consisting of Curriculum Supervised Fine-Tuning (SFT) and Two-Stage Group Relative Policy Optimization (GRPO).
Unlike general-purpose dialogue models that often produce emotionally elaborate but overly interpretive responses, PsyCura focuses on counseling behavior itself. It is trained to generate restrained, client-centered responses with low assumption load, contextual continuation, and cognitive exploration.
This repository contains the inference model associated with our work PsyCura: Behavior-Oriented Alignment for Multi-Turn Mental Health Dialogue.
π Overview
PsyCura formulates psychological counseling alignment as a behavioral optimization problem rather than an empathy-generation problem. The goal is not to maximize emotional expressiveness, but to encourage response patterns that better reflect real counseling practice: remaining concise, avoiding premature interpretation, preserving professional boundaries, and returning interpretive agency to the client.
The model follows a progressive alignment pipeline. Curriculum SFT first establishes role consistency, empathy, and continuation ability. GRPO-A then stabilizes basic counseling behavior on cleaner interaction samples, while GRPO-AB further refines the model on more complex counseling scenarios.
π§ͺ Training Pipeline
| Stage | Data | Objective |
|---|---|---|
| Curriculum SFT | MESC | Establish role consistency, empathy, and continuation |
| GRPO-A | MEDIC Bucket-A | Stabilize core counseling behavior |
| GRPO-AB | MEDIC Bucket-B | Refine behavior under complex counseling contexts |
The reward function contains six behavior-oriented dimensions:
| Dimension | Description |
|---|---|
| Safety Boundary | Maintains appropriate therapeutic and safety boundaries |
| Contextual Continuation | Encourages natural continuation of the counseling dialogue |
| Anti-template Specificity | Reduces generic or formulaic empathetic responses |
| Cognitive-Emotional Tension | Supports reflective exploration of underlying conflict |
| Empathy | Captures appropriate emotional understanding |
| Format Stability | Preserves counselor role and dialogue format |
π Evaluation
| Metric | PsyCura-7B | Best Baseline |
|---|---|---|
| BERTScore | 0.8728 | 0.8583 |
| AvgLen β | 27.79 | 37.52 |
| TTR β | 0.9156 | 0.9053 |
| Human Win Rate | 67% | 20% |
| Safety Score | 1.7345 | 1.6441 |
PsyCura achieves higher semantic similarity while producing shorter responses than the evaluated baselines, suggesting that semantic density and counseling restraint can be jointly improved. Detailed automatic, behavioral, and human evaluation protocols are provided in the accompanying paper.
π Quick Start
import torch
from transformers import AutoTokenizer, AutoModelForCausalLM
model_name = "YOUR_USERNAME/PsyCura-7B"
tokenizer = AutoTokenizer.from_pretrained(
model_name,
trust_remote_code=True
)
model = AutoModelForCausalLM.from_pretrained(
model_name,
torch_dtype=torch.bfloat16,
device_map="auto",
trust_remote_code=True
)
model.eval()
context = """
Client: My daughter has a boyfriend, and her grades are dropping. I want to talk to her about it, but I'm worried she'll shut me out if I push too hard.
Counselor: You're concerned about both her well-being and preserving the relationship between you.
Client: Exactly. I don't want to lose that connection.
"""
messages = [
{
"role": "user",
"content": context + "\n\nContinue the counseling conversation naturally."
}
]
inputs = tokenizer.apply_chat_template(
messages,
add_generation_prompt=True,
return_tensors="pt"
).to(model.device)
outputs = model.generate(
inputs,
max_new_tokens=128,
temperature=0.6,
do_sample=True
)
response = tokenizer.decode(
outputs[0][inputs.shape[1]:],
skip_special_tokens=True
)
print(response)
π¦ Model Files
| File | Size |
|---|---|
| model-00001-of-00004.safetensors | 4.99 GB |
| model-00002-of-00004.safetensors | 4.99 GB |
| model-00003-of-00004.safetensors | 4.99 GB |
| model-00004-of-00004.safetensors | 2.90 GB |
| tokenizer.json | 11.4 MB |
| config.json | 2.6 KB |
Total size: approximately 17.5 GB.
π― Intended Use
PsyCura-7B is intended for research on psychological dialogue systems, counseling behavior modeling, dialogue alignment, and reinforcement learning for large language models. It may be useful for studying how language models can learn restrained and client-centered interaction patterns in multi-turn counseling-like scenarios.
β οΈ Limitations
PsyCura-7B is a research prototype and should not be used as a substitute for professional mental health care. Although the model is trained on counseling-style dialogue data, it does not possess clinical reasoning, diagnostic ability, or crisis-intervention capability.
The model should not be used for psychiatric diagnosis, suicide risk assessment, emergency intervention, medical advice, or professional psychotherapy. Any real-world deployment should involve careful review by qualified professionals and appropriate safety mechanisms.
π Training Data
PsyCura uses the following datasets during training:
- MESC: used for Curriculum SFT.
- MEDIC: used for GRPO-based behavioral alignment.
All training data used in this work are anonymized. No raw patient records or personally identifiable information are included in the released model files.
π Citation
If you use PsyCura-7B in your research, please cite:
@misc{psycura2026,
title={PsyCura: Behavior-Oriented Alignment for Multi-Turn Mental Health Dialogue},
author={YOUR NAME},
year={2026},
note={Manuscript under review},
url={https://huggingface.co/YOUR_USERNAME/PsyCura-7B}
}
π License
PsyCura-7B is released under the Apache-2.0 License.
π Acknowledgements
This project was developed at Lanzhou University. We thank the Qwen2.5-Omni team, the MESC and MEDIC dataset contributors, and the open-source research community.
- Downloads last month
- 36


