From 2bffdf60a33269dd6d2b283c55e9b46fc8a6327e Mon Sep 17 00:00:00 2001 From: chg0901 Date: Wed, 17 Jul 2024 10:26:09 +0800 Subject: [PATCH 1/6] webV3 opt --- web_internlm2_5.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/web_internlm2_5.py b/web_internlm2_5.py index 0fc39cf..b31b33d 100644 --- a/web_internlm2_5.py +++ b/web_internlm2_5.py @@ -223,7 +223,7 @@ cur_query_prompt = '<|im_start|>user\n{user}<|im_end|>\n\ def combine_history(prompt): messages = st.session_state.messages - meta_instruction = ('你是EmoLLM心理咨询师, 由EmoLLM团队打造, 是一个研究过无数具有心理咨询者与顶级专业心理咨询师对话的心理学教授, 在心理方面拥有广博的知识储备和丰富的研究咨询经验。你旨在通过专业心理咨询, 协助来访者完成心理诊断, 利用专业心理学知识与咨询技术一步步帮助来访者解决心理问题。') + meta_instruction = ('你是EmoLLM心理咨询师, 由EmoLLM团队打造, 是一个研究过无数具有心理咨询者与顶级专业心理咨询师对话的心理学教授, 在心理方面拥有广博的知识储备和丰富的研究咨询经验。你旨在通过专业心理咨询, 协助来访者完成心理诊断, 利用专业心理学知识与咨询技术一步步帮助来访者解决心理问题。如果有必要,请用“咨询者”称呼对话咨询的用户。') total_prompt = f'<|im_start|>system\n{meta_instruction}<|im_end|>\n' for message in messages: cur_content = message['content'] @@ -239,7 +239,7 @@ def combine_history(prompt): def main(): - st.markdown("我在这里,准备好倾听你的心声了。", unsafe_allow_html=True) + # st.markdown("我在这里,准备好倾听你的心声了。", unsafe_allow_html=True) # torch.cuda.empty_cache() print('load model begin.') model, tokenizer = load_model() From aed7c7aac394a54883af20f959684d8ff987cc86 Mon Sep 17 00:00:00 2001 From: chg0901 Date: Wed, 17 Jul 2024 10:35:57 +0800 Subject: [PATCH 2/6] =?UTF-8?q?=E5=85=A8=E9=87=8F=E5=BE=AE=E8=B0=832=20ful?= =?UTF-8?q?l=20fine-tuing?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README_EN.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README_EN.md b/README_EN.md index 4ef247a..4932b33 100644 --- a/README_EN.md +++ b/README_EN.md @@ -48,7 +48,7 @@ | Model | Type | File Links | Model Links | | :-------------------: | :------: | :------------------------------------------------------------------------------------------------------: |:------: | -| InternLM2_5_7B_chat | 全量微调 | [internlm2_chat_7b_full.py](./xtuner_config/internlm2_chat_7b_full.py) | [OpenXLab](https://openxlab.org.cn/models/detail/chg0901/EmoLLM_V3.0), [ModelScope](https://modelscope.cn/models/chg0901/EmoLLMV3.0) | +| InternLM2_5_7B_chat | full fine-tuing | [internlm2_chat_7b_full.py](./xtuner_config/internlm2_chat_7b_full.py) | [OpenXLab](https://openxlab.org.cn/models/detail/chg0901/EmoLLM_V3.0), [ModelScope](https://modelscope.cn/models/chg0901/EmoLLMV3.0) | | InternLM2_5_7B_chat | QLORA | [internlm2_5_chat_7b_qlora_oasst1_e3.py](./xtuner_config/internlm2_5_chat_7b_qlora_oasst1_e3.py) |[ModelScope](https://www.modelscope.cn/models/z342994309/emollm_interlm2_5/) | | InternLM2_7B_chat | QLORA | [internlm2_7b_chat_qlora_e3.py](./xtuner_config/internlm2_7b_chat_qlora_e3.py) | [ModelScope](https://modelscope.cn/models/aJupyter/EmoLLM/files) | | InternLM2_7B_chat | full fine-tuing | [internlm2_chat_7b_full.py](./xtuner_config/internlm2_chat_7b_full.py) | [OpenXLab](https://openxlab.org.cn/models/detail/ajupyter/EmoLLM_internlm2_7b_full) | From 65f6b4a2226a0cd8d27e625dee8b3ab0a3bd2eec Mon Sep 17 00:00:00 2001 From: chg0901 Date: Wed, 17 Jul 2024 14:25:44 +0800 Subject: [PATCH 3/6] ./xtuner_config/internlm2_5_chat_7b_full.py link update --- README.md | 2 +- README_EN.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 92ccc73..a852e6b 100644 --- a/README.md +++ b/README.md @@ -46,7 +46,7 @@ | 模型 | 类型 | 链接 | 模型链接 | | :-------------------: | :------: | :------------------------------------------------------------------------------------------------------: |:------: | -| InternLM2_5_7B_chat | 全量微调 | [internlm2_chat_7b_full.py](./xtuner_config/internlm2_chat_7b_full.py) | [OpenXLab](https://openxlab.org.cn/models/detail/chg0901/EmoLLM_V3.0), [ModelScope](https://modelscope.cn/models/chg0901/EmoLLMV3.0) | +| InternLM2_5_7B_chat | 全量微调 | [internlm2_5_chat_7b_full.py](./xtuner_config/internlm2_5_chat_7b_full.py) | [OpenXLab](https://openxlab.org.cn/models/detail/chg0901/EmoLLM_V3.0), [ModelScope](https://modelscope.cn/models/chg0901/EmoLLMV3.0) | | InternLM2_5_7B_chat | QLORA | [internlm2_5_chat_7b_qlora_oasst1_e3.py](./xtuner_config/internlm2_5_chat_7b_qlora_oasst1_e3.py) |[ModelScope](https://www.modelscope.cn/models/z342994309/emollm_interlm2_5/) | | InternLM2_7B_chat | QLORA | [internlm2_7b_chat_qlora_e3.py](./xtuner_config/internlm2_7b_chat_qlora_e3.py) | [ModelScope](https://modelscope.cn/models/aJupyter/EmoLLM/files) | | InternLM2_7B_chat | 全量微调 | [internlm2_chat_7b_full.py](./xtuner_config/internlm2_chat_7b_full.py) | [OpenXLab](https://openxlab.org.cn/models/detail/ajupyter/EmoLLM_internlm2_7b_full) | diff --git a/README_EN.md b/README_EN.md index 4932b33..c70fd2f 100644 --- a/README_EN.md +++ b/README_EN.md @@ -48,7 +48,7 @@ | Model | Type | File Links | Model Links | | :-------------------: | :------: | :------------------------------------------------------------------------------------------------------: |:------: | -| InternLM2_5_7B_chat | full fine-tuing | [internlm2_chat_7b_full.py](./xtuner_config/internlm2_chat_7b_full.py) | [OpenXLab](https://openxlab.org.cn/models/detail/chg0901/EmoLLM_V3.0), [ModelScope](https://modelscope.cn/models/chg0901/EmoLLMV3.0) | +| InternLM2_5_7B_chat | full fine-tuing | [internlm2_5_chat_7b_full.py](./xtuner_config/internlm2_5_chat_7b_full.py)| [OpenXLab](https://openxlab.org.cn/models/detail/chg0901/EmoLLM_V3.0), [ModelScope](https://modelscope.cn/models/chg0901/EmoLLMV3.0) | | InternLM2_5_7B_chat | QLORA | [internlm2_5_chat_7b_qlora_oasst1_e3.py](./xtuner_config/internlm2_5_chat_7b_qlora_oasst1_e3.py) |[ModelScope](https://www.modelscope.cn/models/z342994309/emollm_interlm2_5/) | | InternLM2_7B_chat | QLORA | [internlm2_7b_chat_qlora_e3.py](./xtuner_config/internlm2_7b_chat_qlora_e3.py) | [ModelScope](https://modelscope.cn/models/aJupyter/EmoLLM/files) | | InternLM2_7B_chat | full fine-tuing | [internlm2_chat_7b_full.py](./xtuner_config/internlm2_chat_7b_full.py) | [OpenXLab](https://openxlab.org.cn/models/detail/ajupyter/EmoLLM_internlm2_7b_full) | From f62f2d293370ebc3c7ef627779ac94e1a04a2779 Mon Sep 17 00:00:00 2001 From: HongCheng Date: Wed, 17 Jul 2024 15:29:45 +0900 Subject: [PATCH 4/6] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index a852e6b..f8ca392 100644 --- a/README.md +++ b/README.md @@ -100,7 +100,7 @@ ## 🎇最近更新 -- 【2024.07.16】欢迎大家体验 EmoLLM V3.0 ,改模型是基于InternLM2.5-7B-Chat模型的全量微调,微调配置文件地址:[internlm2_chat_7b_full.py](./xtuner_config/internlm2_chat_7b_full.py) ,模型权重链接:[OpenXLab](https://openxlab.org.cn/models/detail/chg0901/EmoLLM_V3.0), [ModelScope](https://modelscope.cn/models/chg0901/EmoLLMV3.0) ,WebDemo地址: [OpenXLab apps](https://openxlab.org.cn/apps/detail/chg0901/EmoLLMV3.0), [配套全量微调知乎教程](https://zhuanlan.zhihu.com/p/708931911)。 +- 【2024.07.16】欢迎大家体验 EmoLLM V3.0 ,该模型是基于InternLM2.5-7B-Chat模型的全量微调,微调配置文件地址:[internlm2_chat_7b_full.py](./xtuner_config/internlm2_chat_7b_full.py) ,模型权重链接:[OpenXLab](https://openxlab.org.cn/models/detail/chg0901/EmoLLM_V3.0), [ModelScope](https://modelscope.cn/models/chg0901/EmoLLMV3.0) ,WebDemo地址: [OpenXLab apps](https://openxlab.org.cn/apps/detail/chg0901/EmoLLMV3.0), [配套全量微调知乎教程](https://zhuanlan.zhihu.com/p/708931911)。 - 【2024.07】欢迎大家使用稳定版 EmoLLM V2.0 进行日常使用和学术研究,模型权重链接:[OpenXLab](https://openxlab.org.cn/models/detail/ajupyter/EmoLLM_internlm2_7b_full/tree/main)。 - 【2024.07】新增基于InternLM2_5_7B_chat[微调配置](./xtuner_config/internlm2_5_chat_7b_qlora_oasst1_e3.py)、模型文件发布在 [ModelScope](https://www.modelscope.cn/models/z342994309/emollm_interlm2_5/)。 - 【2024.06】新增基于[LLaMA-Factory](https://github.com/hiyouga/LLaMA-Factory)[GLM4-9B-chat微调指南](./doc/GLM-4-9B-chat%20Lora%20微调(llama-factory).md)、新增[基于swift的微调指南](./swift/)、论文[ESC-Eval: Evaluating Emotion Support Conversations in Large Language Models](https://arxiv.org/abs/2406.14952)引用了EmoLLM且EmoLLM取得了较好的效果。 From 4da0ea8bcf0a4585611009ea6d1cf157e3d88d88 Mon Sep 17 00:00:00 2001 From: HongCheng Date: Wed, 17 Jul 2024 15:30:49 +0900 Subject: [PATCH 5/6] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index f8ca392..293464a 100644 --- a/README.md +++ b/README.md @@ -100,7 +100,7 @@ ## 🎇最近更新 -- 【2024.07.16】欢迎大家体验 EmoLLM V3.0 ,该模型是基于InternLM2.5-7B-Chat模型的全量微调,微调配置文件地址:[internlm2_chat_7b_full.py](./xtuner_config/internlm2_chat_7b_full.py) ,模型权重链接:[OpenXLab](https://openxlab.org.cn/models/detail/chg0901/EmoLLM_V3.0), [ModelScope](https://modelscope.cn/models/chg0901/EmoLLMV3.0) ,WebDemo地址: [OpenXLab apps](https://openxlab.org.cn/apps/detail/chg0901/EmoLLMV3.0), [配套全量微调知乎教程](https://zhuanlan.zhihu.com/p/708931911)。 +- 【2024.07.16】欢迎大家体验 EmoLLM V3.0 ,该模型是基于InternLM2.5-7B-Chat模型的全量微调,微调配置文件地址:[internlm2_5_chat_7b_full.py](./xtuner_config/internlm2_5_chat_7b_full.py) ,模型权重链接:[OpenXLab](https://openxlab.org.cn/models/detail/chg0901/EmoLLM_V3.0), [ModelScope](https://modelscope.cn/models/chg0901/EmoLLMV3.0) ,WebDemo地址: [OpenXLab apps](https://openxlab.org.cn/apps/detail/chg0901/EmoLLMV3.0), [配套全量微调知乎教程](https://zhuanlan.zhihu.com/p/708931911)。 - 【2024.07】欢迎大家使用稳定版 EmoLLM V2.0 进行日常使用和学术研究,模型权重链接:[OpenXLab](https://openxlab.org.cn/models/detail/ajupyter/EmoLLM_internlm2_7b_full/tree/main)。 - 【2024.07】新增基于InternLM2_5_7B_chat[微调配置](./xtuner_config/internlm2_5_chat_7b_qlora_oasst1_e3.py)、模型文件发布在 [ModelScope](https://www.modelscope.cn/models/z342994309/emollm_interlm2_5/)。 - 【2024.06】新增基于[LLaMA-Factory](https://github.com/hiyouga/LLaMA-Factory)[GLM4-9B-chat微调指南](./doc/GLM-4-9B-chat%20Lora%20微调(llama-factory).md)、新增[基于swift的微调指南](./swift/)、论文[ESC-Eval: Evaluating Emotion Support Conversations in Large Language Models](https://arxiv.org/abs/2406.14952)引用了EmoLLM且EmoLLM取得了较好的效果。 From 05faabeef72f8b7c9a9fc729644580d1e5777d6e Mon Sep 17 00:00:00 2001 From: HongCheng Date: Wed, 17 Jul 2024 15:31:53 +0900 Subject: [PATCH 6/6] Update README_EN.md --- README_EN.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README_EN.md b/README_EN.md index c70fd2f..65cf840 100644 --- a/README_EN.md +++ b/README_EN.md @@ -104,7 +104,7 @@ The Model aims to fully understand and promote the mental health of individuals, ## Recent Updates -- 【2024.07.16】 Welcome everyone to experience EmoLLM V3.0. This model is a fully fine-tuned version based on the InternLM2.5-7B-Chat model. The fine-tuning configuration file can be found at: [internlm2_chat_7b_full.py](./xtuner_config/internlm2_chat_7b_full.py). Model weights are available at: [OpenXLab](https://openxlab.org.cn/models/detail/chg0901/EmoLLM_V3.0), [ModelScope](https://modelscope.cn/models/chg0901/EmoLLMV3.0). WebDemo is available at: [OpenXLab apps](https://openxlab.org.cn/apps/detail/chg0901/EmoLLMV3.0), [Full fine-tuning tutorial on Zhihu](https://zhuanlan.zhihu.com/p/708931911). +- 【2024.07.16】 Welcome everyone to experience EmoLLM V3.0. This model is a fully fine-tuned version based on the InternLM2.5-7B-Chat model. The fine-tuning configuration file can be found at: [internlm2_5_chat_7b_full.py](./xtuner_config/internlm2_5_chat_7b_full.py). Model weights are available at: [OpenXLab](https://openxlab.org.cn/models/detail/chg0901/EmoLLM_V3.0), [ModelScope](https://modelscope.cn/models/chg0901/EmoLLMV3.0). WebDemo is available at: [OpenXLab apps](https://openxlab.org.cn/apps/detail/chg0901/EmoLLMV3.0), [Full fine-tuning tutorial on Zhihu](https://zhuanlan.zhihu.com/p/708931911). - 【2024.07】Welcome to use the stable version of EmoLLM V2.0 for daily use and academic research. Model weight link: [OpenXLab](https://openxlab.org.cn/models/detail/ajupyter/EmoLLM_internlm2_7b_full/tree/main). - 【2024.07】Added InternLM2_5_7B_chat[fine-tuning configuration](./xtuner_config/internlm2_5_chat_7b_qlora_oasst1_e3.py)、model file [ModelScope](https://www.modelscope.cn/models/z342994309/emollm_interlm2_5/)。 - 【2024.06】 Added [LLaMA-Factory](https://github.com/hiyouga/LLaMA-Factory)[GLM4-9B-chat fine-tuning guide](./doc/GLM-4-9B-chat%20Lora%20微调(llama-factory).md), added [swift-based fine-tuning guide](./swift/), the paper [ESC-Eval: Evaluating Emotion Support Conversations in Large Language Models](https://arxiv.org/abs/2406.14952) cited EmoLLM and EmoLLM achieved good results.