医疗大模型01

我要开发同款
匿名用户2024年07月31日
43阅读
所属分类ai、baichuan
开源地址https://modelscope.cn/models/chinapkulxh/MedLLM01

作品详情

医疗问诊大模型【中文】

1. 项目声明

  • 原始项目归属:复旦大学数据智能与社会计算实验室
  • 原始项目地址:点这里
  • 本项目是对原始项目的 搬迁和改造,向原项目团队致敬!感谢他们的工作!

2. 项目改造

  • 原始项目存放于国外平台,国内很难下载,本项目做了国内搬迁,现在可以高速下载;
  • 原始项目运行环境复杂,很难配置成功,本项目做了适当修改,现在可以平稳运行;
  • 对原始项目的 WebUI Demo 做了优化,修复了小的 Bug,现在更美观和更稳定;
  • 再次向原项目团队致敬,感谢他们的工作!

3. 基本示例

>>> import torch
>>> from transformers import AutoModelForCausalLM, AutoTokenizer
>>> from transformers.generation.utils import GenerationConfig
>>> tokenizer = AutoTokenizer.from_pretrained("chinapkulxh/MedLLM01", use_fast=False, trust_remote_code=True)
>>> model = AutoModelForCausalLM.from_pretrained("chinapkulxh/MedLLM01", device_map="auto", torch_dtype=torch.float16, trust_remote_code=True)
>>> model.generation_config = GenerationConfig.from_pretrained("chinapkulxh/MedLLM01")
>>> messages = []
>>> messages.append({"role": "user", "content": "我感觉自己颈椎非常不舒服,每天睡醒都会头痛"})
>>> response = model.chat(tokenizer, messages)
>>> print(response)

4. 落地应用

  • 视频教程:

  • B站

  • 技术咨询:

  • 李晓华 博士

  • 微信:13810832668

  • 邮箱:chinapkulxh@pku.edu.cn

5. 项目许可

  • Apache 2.0 License

6. 项目引用

请引用原作者:

@misc{bao2023discmedllm,
      title={DISC-MedLLM: Bridging General Large Language Models and Real-World Medical Consultation}, 
      author={Zhijie Bao and Wei Chen and Shengze Xiao and Kuang Ren and Jiaao Wu and Cheng Zhong and Jiajie Peng and Xuanjing Huang and Zhongyu Wei},
      year={2023},
      eprint={2308.14346},
      archivePrefix={arXiv},
      primaryClass={cs.CL}
}
声明:本文仅代表作者观点,不代表本站立场。如果侵犯到您的合法权益,请联系我们删除侵权资源!如果遇到资源链接失效,请您通过评论或工单的方式通知管理员。未经允许,不得转载,本站所有资源文章禁止商业使用运营!
下载安装【程序员客栈】APP
实时对接需求、及时收发消息、丰富的开放项目需求、随时随地查看项目状态

评论