DISC-MedLLM  by FudanDISC

Medical LLM for conversational healthcare services

created 1 year ago
545 stars

Top 59.3% on sourcepulse

GitHubView on GitHub
Project Summary

DISC-MedLLM is a large language model specifically designed for conversational healthcare, aiming to provide accurate and truthful medical responses. It targets medical professionals and researchers seeking to improve end-to-end conversational healthcare services by bridging the gap between general LLMs and real-world medical dialogues.

How It Works

DISC-MedLLM is built upon the Baichuan-13B-Base model and fine-tuned using a multi-faceted data construction mechanism. This includes an "LLM in the loop" approach for generating conversational samples from medical knowledge graphs and a "Human in the loop" strategy for incorporating human-preferred responses. The model leverages a large dataset (DISC-Med-SFT) of over 470,000 samples, derived from sources like MedDialog, cMedQA2, and CMeKG, to enhance its professional knowledge, multi-turn dialogue capabilities, and alignment with human preferences in medical consultations.

Quick Start & Requirements

  • Install: pip install -r requirements.txt
  • Prerequisites: Python, Hugging Face Transformers.
  • Usage: Load model and tokenizer via Hugging Face Transformers. Inference example provided.
  • Demos: Online demo available at http://med.fudan-disc.com. CLI and web demos included in the repository.
  • Fine-tuning: Requires specific data format and DeepSpeed for full parameter fine-tuning.

Highlighted Details

  • Achieves 39.79% average accuracy on single-turn QA benchmarks (MLEC-QA, Kaoyan 306), outperforming Baichuan-13b-Chat and Huatuo(13B).
  • Outperforms other models in multi-turn dialogue evaluation on the CMB-clin dataset, achieving an average score of 4.69 across initiative, accuracy, helpfulness, and language quality.
  • Utilizes a 470k+ sample dataset (DISC-Med-SFT) incorporating reconstructed AI-patient dialogues, knowledge graph Q&A pairs, and human-curated preference data.
  • Based on Baichuan-13B-Base, allowing for potential int8/int4 quantization for deployment, though performance may degrade.

Maintenance & Community

  • Developed by Fudan University's Data Intelligence and Social Computing Lab (Fudan-DISC).
  • Project is based on and thanks MedDialog, cMeKG, cMedQA, Baichuan-13B, and FireFly.
  • Technical report available on arXiv: https://arxiv.org/abs/2308.14346.

Licensing & Compatibility

  • License: MIT License.
  • Compatibility: Generally permissive for commercial use and integration into closed-source projects.

Limitations & Caveats

The developers state that due to inherent LLM limitations, they cannot guarantee the accuracy or reliability of the model's output. The model is intended for research and testing, and users are urged to critically evaluate all information and not blindly trust medical advice provided.

Health Check
Last commit

1 year ago

Responsiveness

1 week

Pull Requests (30d)
0
Issues (30d)
0
Star History
18 stars in the last 90 days

Explore Similar Projects

Feedback? Help us improve.