x-d-lab / mindchat Goto Github PK
View Code? Open in Web Editor NEW🐋MindChat(漫谈)——心理大模型:漫谈人生路, 笑对风霜途
License: GNU General Public License v3.0
🐋MindChat(漫谈)——心理大模型:漫谈人生路, 笑对风霜途
License: GNU General Public License v3.0
想了解下你们怎么获取的原始文本和怎么构建自动化流程生成对话
ab/flash-attention
Loading checkpoint shards: 100%|████████████████████████████████████████████████████| 8/8 [00:12<00:00, 1.61s/it]
Traceback (most recent call last):
File "/data/code/MindChat/webui_demo.py", line 58, in
demo = gr.ChatInterface(predict,
File "/data/jt_conda/mindchat/lib/python3.9/site-packages/gradio/chat_interface.py", line 273, in init
client_utils.synchronize_async(self.examples_handler.cache)
AttributeError: 'ChatInterface' object has no attribute 'examples_handler'
你好,可以披露一下模型的训练细节么?
希望能提供个接口调用,谢谢
Feb 20, 2024: 提供MindChat-Qwen2-0_5B、MindChat-Qwen2-4B、MindChat-Qwen2-7B、MindChat-Qwen2-14B对应的gguf模型。
(my-env) root@autodl-container-072d119c3c-81e484cb:~/autodl-tmp/Qwen# python web_demo.py
Warning: import flash_attn rms_norm fail, please install FlashAttention layer_norm to get better performance https://github.com/Dao-AILab/flash-attention/tree/main/csrc/layer_norm
Warning: import flash_attn fail, please install FlashAttention https://github.com/Dao-AILab/flash-attention
Loading checkpoint shards: 100%|███████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 2/2 [00:16<00:00, 8.21s/it]
WARNING:root:Some parameters are on the meta device device because they were offloaded to the cpu.
Running on local URL: http://127.0.0.1:6006
To create a public link, set share=True
in launch()
.
User: nihao
Traceback (most recent call last):
File "/root/miniconda3/envs/my-env/lib/python3.10/site-packages/gradio/routes.py", line 488, in run_predict
output = await app.get_blocks().process_api(
File "/root/miniconda3/envs/my-env/lib/python3.10/site-packages/gradio/blocks.py", line 1431, in process_api
result = await self.call_function(
File "/root/miniconda3/envs/my-env/lib/python3.10/site-packages/gradio/blocks.py", line 1117, in call_function
prediction = await utils.async_iteration(iterator)
File "/root/miniconda3/envs/my-env/lib/python3.10/site-packages/gradio/utils.py", line 350, in async_iteration
return await iterator.anext()
File "/root/miniconda3/envs/my-env/lib/python3.10/site-packages/gradio/utils.py", line 343, in anext
return await anyio.to_thread.run_sync(
File "/root/miniconda3/envs/my-env/lib/python3.10/site-packages/anyio/to_thread.py", line 33, in run_sync
return await get_asynclib().run_sync_in_worker_thread(
File "/root/miniconda3/envs/my-env/lib/python3.10/site-packages/anyio/_backends/_asyncio.py", line 877, in run_sync_in_worker_thread
return await future
File "/root/miniconda3/envs/my-env/lib/python3.10/site-packages/anyio/_backends/_asyncio.py", line 807, in run
result = context.run(func, *args)
File "/root/miniconda3/envs/my-env/lib/python3.10/site-packages/gradio/utils.py", line 326, in run_sync_iterator_async
return next(iterator)
File "/root/miniconda3/envs/my-env/lib/python3.10/site-packages/gradio/utils.py", line 695, in gen_wrapper
yield from f(*args, **kwargs)
File "/root/autodl-tmp/Qwen/web_demo.py", line 124, in predict
for response in model.chat_stream(tokenizer, _query, history=_task_history, generation_config=config):
File "/root/miniconda3/envs/my-env/lib/python3.10/site-packages/torch/nn/modules/module.py", line 1614, in getattr
raise AttributeError("'{}' object has no attribute '{}'".format(
AttributeError: 'QWenLMHeadModel' object has no attribute 'chat_stream'
感谢作者提供的心理学大模型,其中有一点小疑问,还望赐教
关于数据集示例:data/dataset_example.json
其中部分数据output为空比如:
{
"instruction": "非常感谢您的帮助和理解,我期待着与您共同开启这段治疗之旅,为自己的成长和心理健康而努力。",
"input": "通过指导,我相信您可以逐渐建立起更清晰、更积极的自我认知,降低对他人评价的过度依赖,并且培养更强大的内在自信。",
"output": "",
"history": [
["我太过在乎别人看法", "是在乎一些重要人的看法呢?还是对于每个人的看法都很在乎呢?"],
["我对所有人的看法都很在乎,我害怕被别人拒绝或批评,觉得自己不配和别人交往。", "你对他人看法的在乎和害怕被拒绝或批评,以及对自己价值的质疑,可能表现为社交焦虑和自尊问题。"],
["我不会打招呼,不敢面对现实。", "我理解你目前感到的困扰和不安。面对社交和现实中的挑战可能会让我们感到不自信和害怕。但请记住,每个人都有自己的不足和紧张时刻,这是正常的。"],
["我不知道要怎么改变这一现状", "在乎别人看法,是不确定自己是怎样的,对自己没有清晰的认识。可以通过咨询客观的认识自己。"]
]
},
请问这么设计的原因是什么呢?
rt
大佬们什么时候有开源计划?
我是 InternLM 的社区开发者,看到您的项目觉得非常不错,希望能够加您的微信,我的微信号是mzm312,我们希望您的项目能够部署到社区,我们将提供算力部署。
MindChat-Qwen-7B-v2 的模型是基于qwen-7b 吗?我看qwen-7b 训练前会把数据预处理成下边格式:
<|im_start|>system\nYou are a helpful assistant.<|im_end|>\n
<|im_start|>user\n你好<|im_end|>\n
<|im_start|>assistant\n你好!很高兴为你提供帮助。<|im_end|>\n
<|im_start|>user\n给我讲一个年轻人奋斗创业最终取得成功的故事。<|im_end|>\n
<|im_start|>assistant\n
请问咱们会对数据也做一样处理吗?
我看提供的推理代码也没有做数据前处理。https://github.com/X-D-Lab/MindChat/tree/main/scripts
所以我想确认下最终咱们训练数据是做成什么格式?
大佬们,什么时候可以先搞个 openai_api文件 就可以接接口了呀
看了下直播回放,内容还是在讲纯技术实现,即类似lora的原理;请问是否可以在readme放出微调应用示例呢?或是给个参考之类的
项目readme貌似只有相关介绍,并未提供模型使用方式?
在机器之心的直播地址能发一下么?应该还有录播吧
报错是
AttributeError: 'BaichuanTokenizer' object has no attribute 'sp_model'
大佬您好!我也想微调个这种心理咨询的聊天模型,想请教下您的对话数据是怎么来的?
非常感谢!
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.