Open main menu
首页
专栏
课程
分类
归档
Chat
Sci-Hub
谷歌学术
Libgen
GitHub镜像
登录/注册
搜索
搜索
关闭
Previous
Previous
Next
Next
ChatDoctor(LLM大模型用于医疗对话)
sockstack
/
189
/
2023-12-20 00:02:40
<p><span style="color: red; font-size: 18px">ChatGPT 可用网址,仅供交流学习使用,如对您有所帮助,请收藏并推荐给需要的朋友。</span><br><a href="https://ckai.xyz/?sockstack§ion=detail" target="__blank">https://ckai.xyz</a><br><br></p> <article class="baidu_pl"><div id="article_content" class="article_content clearfix"> <link rel="stylesheet" href="https://csdnimg.cn/release/blogv2/dist/mdeditor/css/editerView/kdoc_html_views-1a98987dfd.css"> <link rel="stylesheet" href="https://csdnimg.cn/release/blogv2/dist/mdeditor/css/editerView/ck_htmledit_views-25cebea3f9.css"> <div id="content_views" class="markdown_views prism-atom-one-light"> <svg xmlns="http://www.w3.org/2000/svg" style="display: none;"><path stroke-linecap="round" d="M5,0 0,2.5 5,5z" id="raphael-marker-block" style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0);"></path></svg><p><strong>ChatDoctor: A Medical Chat Model Fine-tuned on LLaMA Model using Medical Domain Knowledge</strong></p> <ul><li>paper:https://arxiv.org/pdf/2303.14070.pdf</li></ul> <p>通用领域中最近的大型语言模型 (LLM),例如 ChatGPT,在遵循指令和产生类似人类的响应方面取得了显着的成功。 但是语言模型并未针对医学领域量身定制,导致答案准确性较差,无法为医学诊断、药物治疗等提供合理的建议。</p> <p>因此这篇文章收集了一些关于医学领域的数据集,然后基于Meta的LLaMA进行微调(毕竟chatGPT非开源)。不仅是医学领域,这篇文章的做法可以扩展到很多其他的专有领域中。</p> <p>在医疗领域,通过利用医患对话数据对大模型进行微调,可以显著促进该模型在医学领域的应用。特别是在医疗资源匮乏的地区,可以使用聊天医生来支持患者的初步诊断和分诊,可以显著提高现有医疗系统的效率。</p> <p><img referrerpolicy="no-referrer" src="https://img-blog.csdnimg.cn/1bca29cd427c4d16b46c0b318f169c1a.png" alt="在这里插入图片描述"></p> <p><strong>数据集</strong><br> 由通用数据集(掌握对话能力)和医患对话数据集(保障领域质量)组成。</p> <ul> <li>通用数据集自然是Stanford Alpaca,52K instruction-following的数据。</li> <li>作者们收集的InstructorDoctor-205k数据集,其中包含5000个生成的医患对话和20万个真实的医患对话,以保障准确性和多样性,以用于对大型语言模型进行微调。</li> <li> <ul><li>5000 次医患对话。包括700多种疾病及其相应的症状、所需的医学检查和推荐的药物。同时,为了提高数据和模型质量,疾病数据库中的元组(疾病的名称、相应的症状等等)将被输入到ChatGPT API中以自动生成指令和对话数据,即生成患者和医生之间的对话。</li></ul> </li> <li> <ul><li>20万个真实的医患对话。5000 次医患对话虽然确保了准确性,但对话的多样性很低。因此作者们从在线医疗问答网站"Health Care Magic.”中收集了约20万份真实的医患对话(会删除医生和患者的名字,并使用语言工具来纠正回答中的语法错误等操作)。</li></ul> </li> </ul> <p>通过使用这些 205k 医患对话对 LLMs 进行微调的模型,能够更好理解患者需求、提供建议。</p> <p>一些例子如下,<br> <img referrerpolicy="no-referrer" src="https://img-blog.csdnimg.cn/909d09957c664275a6307df739f98774.png" alt="在这里插入图片描述"></p> <p><strong>训练过程</strong><br> 基于InstructorDoctor-205k的微调过程,有如下几个关键点</p> <ul> <li>使用6个A100训练18小时</li> <li>batch size为192,learning rate为2×10−5,训练3个epoch</li> <li>最大长度为512个token,warmup为0.03,没有weight decay</li> </ul> <p>ChatDoctor的代码已经开源了:</p> <ul><li>https://github.com/Kent0n-Li/ChatDoctor</li></ul> <p>包括数据集!看一眼数据长这样(维持Alpaca的数据格式):</p> <pre><code> {"instruction": "If you are a doctor, please answer the medical questions based on the patient's description.","input": "Doctor, I have been experiencing sudden and frequent panic attacks. I don't know what to do.","output": "Well, based on what you're telling me, it sounds like you may be suffering from panic disorder. The best course of action is to start with psychotherapy and mental health counseling. Additionally, we should conduct an electrocardiogram to make sure that there are no physical issues causing your panic attacks. We will also need to perform a depression screen and a toxicology screen to rule out any other underlying causes. Finally, I would recommend a comprehensive psychological and psychiatric evaluation and therapy to help manage your symptoms."},{"instruction": "If you are a doctor, please answer the medical questions based on the patient's description.","input": "Doctor, I have been experiencing a hoarse voice for a few weeks now and it's not getting any better despite taking medication. What could be the problem?","output": "It's possible that you have a vocal cord polyp. To confirm this, we need to conduct tracheoscopy and laryngoscopy with a biopsy. We may also need to conduct an occupational therapy assessment such as speech therapy, other diagnostic procedures like an interview or consultation, physical therapy exercises, as well as diagnostic procedures on your nose, mouth, and pharynx to rule out any other underlying conditions. Additionally, we may need to evaluate your eyes and ears for any related conditions, such as ophthalmologic and otologic diagnosis and treatment."},{"instruction": "If you are a doctor, please answer the medical questions based on the patient's description.","input": "Hi, Doctor. I think I might have Turner syndrome. ","output": "Okay, in that case, you will need to undergo a complete physical skin exam, an ultrasonography, and some other diagnostic procedures such as an interview, evaluation, and consultation. Additionally, we'll need to perform an echocardiography, examine your breast, and check your eyes and ears for any issues. We'll also do a depression screening to assess your mental health."} </code></pre> </div> <link href="https://csdnimg.cn/release/blogv2/dist/mdeditor/css/editerView/markdown_views-0407448025.css" rel="stylesheet"> <link href="https://csdnimg.cn/release/blogv2/dist/mdeditor/css/style-c216769e99.css" rel="stylesheet"> </div> <div id="treeSkill"></div> </article>
ChatDoctor(LLM大模型用于医疗对话)
作者
sockstack
许可协议
CC BY 4.0
发布于
2023-12-20
修改于
2024-11-20
上一篇:软件:常用 Linux 软件汇总,值得收藏
下一篇:用OpeAI API打造ChatGPT桌面端应用
尚未登录
登录 / 注册
文章分类
博客重构之路
5
Spring Boot简单入门
4
k8s 入门教程
0
MySQL 知识
1
NSQ 消息队列
0
ThinkPHP5 源码分析
5
使用 Docker 从零开始搭建私人代码仓库
3
日常开发汇总
3
标签列表
springboot
hyperf
swoole
webman
php
多线程
数据结构
docker
k8s
thinkphp
mysql
tailwindcss
flowbite
css
前端