--- license: apache-2.0 --- # MindGLM: A Fine-tuned Language Model for Chinese Psychological Counseling 1. Introduction MindGLM is a large language model fine-tuned and aligned for the task of psychological counseling in Chinese. Developed from the foundational model ChatGLM2-6B, MindGLM is designed to resonate with human preferences in psychological inquiries, offering a reliable and safe tool for digital psychological counseling. 2. Key Features - Fine-tuned for Counseling: MindGLM has been meticulously trained to understand and respond to psychological inquiries, ensuring empathetic and accurate responses. - Aligned with Human Preferences: The model underwent a rigorous alignment process, ensuring its responses are in line with human values and preferences in the realm of psychological counseling. - High Performance: MindGLM has demonstrated superior performance in both quantitative and qualitative evaluations, making it a leading choice for digital psychological interventions. 3. Usage To use MindGLM with the Hugging Face Transformers library: ' from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("ZhangCNN/MindGLM") model = AutoModelForCausalLM.from_pretrained("ZhangCNN/MindGLM") input_text = "Your input text here" input_ids = tokenizer.encode(input_text, return_tensors="pt") output = model.generate(input_ids) decoded_output = tokenizer.decode(output[0], skip_special_tokens=True) print(decoded_output) ' 4. Training Data MindGLM was trained using a combination of open-source datasets and self-constructed datasets, ensuring a comprehensive understanding of psychological counseling scenarios. The datasets include SmileConv, comparison_data_v1, psychology-RLAIF, rm_labelled_180, and rm_gpt_375. 5. Training Process The model underwent a three-phase training approach: Supervised Fine-tuning: Using the ChatGLM2-6B foundational model, MindGLM was fine-tuned with a dedicated dataset for psychological counseling. Reward Model Training: A reward model was trained to evaluate and score the responses of the fine-tuned model. Reinforcement Learning: The model was further aligned using the PPO (Proximal Policy Optimization) algorithm to ensure its responses align with human preferences. 6. Limitations While MindGLM is a powerful tool, users should be aware of its limitations: It is designed for psychological counseling but should not replace professional medical advice or interventions. The model's responses are based on the training data, and while it's aligned with human preferences, it might not always provide the most appropriate response. 7. License Please refer to the licensing terms of the datasets used for training. Usage of MindGLM should be in compliance with these licenses.license: apache-2.0 8. Contact Information For any queries, feedback, or collaboration opportunities, please reach out to: - Name: [Congmian Zhang] - Email: [zcm200605@163.com] - wechat: [Zhang_CNN] - Affiliation: [university of glasgow] - We hope MindGLM proves to be a valuable asset in the realm of digital psychological counseling for the Chinese-speaking community. Your feedback and contributions are always welcome!