EmoLLM: Fine-Tuning Open LLMs for Mental Health Counseling Conversations
心理健康大模型 (LLM x Mental Health), Pre & Post-training & Dataset & Evaluation & Depoly & RAG, with InternLM / Qwen / Baichuan / DeepSeek / Mixtral / LLama / GLM series models
At a glance
- What is it?
- EmoLLM is a collection of fine-tuning configurations, curated datasets, evaluation tools, and inference demos for building mental health AI assistants on top of open LLMs including InternLM, Qwen, LLaMA3, Baichuan2, and DeepSeek. The project covers the full pipeline from data generation through RAG-backed deployment.
- Who is it for?
- EmoLLM is a practical starting point for researchers and application developers who want a mental health fine-tuned LLM without building a training pipeline from scratch. It is not a clinically validated system and the README does not describe any formal safety evaluation or crisis intervention protocol, so it should not be deployed in a context where users may be in acute distress without additional safeguards.
- Can I use it commercially?
- Yes. MIT is a permissive licence: you can use, modify and sell software built on it, as long as you keep its copyright and licence notices.
- Is it still maintained?
- Yes. The repository last received commits 103 days ago.
- What is it written in?
- Mainly Python, according to GitHub's language statistics.
Answers come from the project's GitHub data, last synced on September 29, 2026, and from our analysis. They are not legal advice.
Editorial analysis
The Problem EmoLLM Addresses
General-purpose instruction-tuned LLMs are not optimized for the specific conversational patterns that mental health counseling requires: sustained empathetic listening, identification of distress signals, and guiding a user through a structured support chain rather than providing direct answers. EmoLLM targets this gap by providing fine-tuning artifacts that reshape the response style of popular open models toward a counseling register.
The project README frames the goal as enabling a model to understand a user, support a user, and help a user through a counseling chain, treating these as three distinct capabilities that require separate attention during fine-tuning. It is designed for both ML researchers who want to study mental health NLP and application developers who want to ship a mental health assistant without starting from a raw base model.
Supported Models and Training Configurations
The repository ships XTuner configuration files for a wide range of model families. The table in the README lists configurations for InternLM2_5-7B-chat (both full fine-tuning and QLoRA), InternLM2-7B-chat (QLoRA and full), InternLM2-1_8B-chat (full), InternLM2-20B-chat (LoRA), Qwen-7B-chat (QLoRA), Qwen1_5-0_5B-Chat (full), Baichuan2-13B-chat (QLoRA), ChatGLM3-6B (LoRA), DeepSeek MoE_16B_chat (QLoRA), Mixtral-8x7B_instruct (QLoRA), LLaMA3-8B-instruct (QLoRA, two variants), and Qwen2-7B-Instruct (LoRA).
The configuration filenames follow a consistent pattern and are stored in the xtuner_config/ directory. For example, the QLoRA configuration for InternLM2_5-7B-chat is at xtuner_config/internlm2_5_chat_7b_qlora_oasst1_e3.py and the full fine-tune variant is at xtuner_config/internlm2_5_chat_7b_full.py. Pre-trained model weights for several of these configurations are linked on OpenXLab and ModelScope, so training from scratch is not required to test the downstream behavior.
More recent work includes a deep-thinking variant called Careyou, based on Deepseek-R1_14b_int4 with QLoRA, which added reasoning, RAG, web search, and TTS capabilities. This was merged into the EmoLLM repository in May 2025 and is available at the careyou/ subdirectory.
Getting the Repository and Running a Demo
The repository does not publish a pip package for the training infrastructure; contributors use the top-level setup.py to install a minimal emollm package with find_packages. The requirements.txt lists the primary dependencies:
pip install transformers==4.36.2 streamlit==1.24.0 sentencepiece==0.1.99 accelerate==0.24.1Several web demo scripts are included directly in the repository root. web_internlm2_5.py, web_internlm2.py, app.py, and Gradio-based scripts for LLaMA3 (app_Llama3_Gradio.py) cover the main supported models. A command-line demo entry point for each model family lives under demo/: for example, demo/cli_internlm2.py and demo/cli_qwen.py. These scripts require a locally downloaded or ModelScope-cached model.
The quick_start/ directory provides onboarding materials for new contributors. The README links a download_model.py script for fetching model weights, though the specific download commands are not reproduced in the README itself.
Datasets, Evaluation, and the RAG Component
Dataset generation tooling lives in generate_data/ and the datasets/ directory. The README lists a first mental health R1 distillation dataset released in February 2025. The project maintainers use a planned paper list (linked from the README via a Google Sheets document) to track which research findings to incorporate, with an open invitation for pull requests to add configurations for new models.
The evaluate/ directory contains evaluation scripts for measuring counseling quality metrics. The README does not describe the specific metrics or benchmarks in the truncated portion available; it refers readers to the full documentation rather than summarizing them inline.
The rag/ directory implements a retrieval-augmented generation layer. The README mentions that the Careyou variant supports RAG and web search, suggesting that the retrieval component can be enabled on top of the fine-tuned model rather than running inference against the base model alone. The deploy/ directory covers deployment configurations and scripts/ holds additional automation.
For Python environments, the requirements.txt installs from a private Gitee-hosted meta-gpt-tianji package in addition to the standard PyPI dependencies, which means network access to gitee.com is needed during setup.
Limitations and Cases Where EmoLLM Is the Wrong Choice
EmoLLM is a research and prototyping resource, not a production-ready clinical tool. The README does not include any clinical validation, safety review, or description of crisis detection logic. Deploying this in a live mental health application where users may present with active suicidal ideation or psychiatric emergencies would require additional safety scaffolding that this repository does not provide.
The training configurations are tightly coupled to the XTuner library. Teams using other fine-tuning frameworks (such as LLaMA Factory or standard Hugging Face Trainer) would need to translate the configurations manually, and the README does not address this.
The requirements.txt pins specific versions of transformers (4.36.2) and streamlit (1.24.0) that may conflict with newer packages, particularly if the target deployment environment runs other ML workloads on the same Python installation. The Careyou configuration targets Deepseek-R1_14b_int4, a 14-billion-parameter model that requires substantial GPU memory even at 4-bit precision.
Alternative projects such as mental-health fine-tunes on Hugging Face Hub take a narrower approach: they provide a single model checkpoint for direct download without the training scaffolding, which suits teams that want inference only rather than the full training-to-deployment pipeline.
Maintenance, Releases, and License
The repository is licensed under MIT, which permits commercial use, modification, and redistribution. The last push was on 2026-06-18. Recent releases include v0.6 (2025-05-18), v0.5 (2025-03-23), and v0.4 (2024-10-21). The cadence suggests semi-annual minor releases with ongoing commits between them.
The README notes that a deepwiki.com integration exists for AI-assisted navigation of the project documentation, and a Discord community invitation is included. Contributors are encouraged to pick papers from the planned list and submit pull requests. The xtuner_config/ directory and model weight links are the most actively maintained parts of the repository based on the update log entries.
Editorial conclusion
EmoLLM is a practical starting point for researchers and application developers who want a mental health fine-tuned LLM without building a training pipeline from scratch. It is not a clinically validated system and the README does not describe any formal safety evaluation or crisis intervention protocol, so it should not be deployed in a context where users may be in acute distress without additional safeguards. The last published release was v0.6 in May 2025; the most recent push was on 2026-06-18, roughly three months before this review.
Frequently asked questions
Which base models does EmoLLM provide fine-tuning configurations for?
The README table lists configurations for InternLM2_5, InternLM2, Qwen, Qwen1_5, Qwen2, Baichuan2, ChatGLM3, DeepSeek MoE, Mixtral-8x7B, and two LLaMA3-8B variants. All configuration files are stored in the xtuner_config/ directory.
What fine-tuning methods does EmoLLM support?
The README lists full fine-tuning, QLoRA, and LoRA. Which method is used depends on the specific model and configuration file; for example, the InternLM2_5-7B-chat model has separate files for full fine-tuning and QLoRA.
Where can I find pre-trained EmoLLM model weights without training from scratch?
The README links pre-trained weights for several configurations on OpenXLab and ModelScope. The InternLM2_5-7B full fine-tune is available on both platforms, and the LLaMA3-8B variants are linked on OpenXLab and ModelScope as well.
Official sources
Add this badge to your README
If you maintain this project, the badge below links readers to this analysis and shows its maintenance status from the daily GitHub snapshot. Paste the markdown into your README; add ?metric=license or ?metric=stars to the image URL for a different field.
[](https://hysenlabs.com/projects/smartflowai-emollm)