medAlpaca  by kbressem

LLM finetuned for medical question answering

created 2 years ago
532 stars

Top 60.3% on sourcepulse

GitHubView on GitHub
Project Summary

MedAlpaca provides open-source large language models fine-tuned for medical question answering and dialogue. It aims to facilitate the development of medical chatbot solutions by leveraging curated medical datasets. The project is primarily for researchers and developers in the medical AI space.

How It Works

MedAlpaca builds upon the Stanford Alpaca and AlpacaLoRA methodologies, fine-tuning LLaMA and OPT models on a diverse collection of medical texts. This includes medical flashcards, wikis, and dialogue datasets, collectively termed "Medical Meadow." The fine-tuning process supports various configurations, including 8-bit training and LoRA, to optimize for memory usage and training efficiency.

Quick Start & Requirements

  • Install dependencies: pip install -r requirements.txt
  • Training requires access to LLaMA or Alpaca weights.
  • Training LLaMA 7b with LoRA and 8-bit training requires ~8.9 GB VRAM. Full fine-tuning with bf16 requires ~79.5 GB VRAM.
  • Data: Medical Meadow dataset (~1.5 million data points) is available.
  • Models are available on Hugging Face: https://huggingface.co/medalpaca

Highlighted Details

  • Fine-tuned on the "Medical Meadow" dataset, comprising ~1.5 million medical data points.
  • Supports 8-bit training and LoRA for reduced memory footprint during fine-tuning.
  • Benchmarks show competitive performance on USMLE self-assessment questions compared to base Alpaca models.
  • Offers fine-tuned models for LLaMA 7b, 13b, and 30b parameter sizes.

Maintenance & Community

The project is associated with kbressem and has a published paper: arXiv:2304.08247. Further community interaction channels are not explicitly mentioned in the README.

Licensing & Compatibility

The models are provided for research purposes only and are not intended for healthcare applications. The README does not explicitly state a license for the code or data, but the models are hosted on Hugging Face, which typically uses Apache 2.0 for code and specific licenses for models.

Limitations & Caveats

The models are experimental, have not undergone extensive validation, and their reliability cannot be guaranteed. They are not multimodal and cannot process image-based questions. The project notes that the benchmark table is subject to change as training and evaluation methods improve.

Health Check
Last commit

1 year ago

Responsiveness

Inactive

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

Explore Similar Projects

Feedback? Help us improve.