Skip to content

About

No description, website, or topics provided.

Resources

Stars

1 star

Watchers

0 watching

Forks

Repository files navigation

Medical-LLM

Medical-LLM is an open-source framework for building medical-domain large language model (LLM) applications — including data preparation, retrieval-augmented generation (RAG), fine-tuning, and inference.

⚠️ Disclaimer: This project is for research and educational purposes only.
It must not be used for clinical decision-making or as medical advice.


🚀 Quick Start

1. Environment Setup

Conda (Recommended)

conda env create -f environment.yml
conda activate medical-llm

or with pip

python -m venv .venv
source .venv/bin/activate       # Windows: .venv\Scripts\activate
pip install -r requirements.txt

2. Download Medical Corpus

python download_medical_corpus.py --out_dir ./data

3. Build Retrieval Index (RAG)

python main.py rag --config configs/rag_default.yaml

4. Fine-tune the Model

python main.py finetune --config configs/finetune_default.yaml

5. Run Inference

python main.py infer --config configs/infer_default.yaml --query "What are the first-line treatments for hypertension?"

📁 Project Structure

Medical-LLM/
├─ configs/          # Model, training, and inference configs
├─ demo/             # Demo scripts or notebooks
├─ finetune/         # Fine-tuning modules
├─ inference/        # Inference and serving modules
├─ retrieval/        # RAG pipeline (indexing, embedding, reranking)
├─ utils/            # Common utilities
├─ models/           # Local model checkpoints
├─ main.py           # Main entry point
├─ download_medical_corpus.py
├─ requirements.txt
└─ environment.yml

⚙️ Features

  • RAG pipeline for evidence-grounded responses
  • Fine-tuning with SFT and LoRA support
  • Config-driven architecture for modular experiments
  • Unified CLI via main.py

📄 License & Citation

License: MIT

If you use this project, please cite:

@software{medical_llm_2025,
  title  = {Medical-LLM},
  author = {54younger},
  year   = {2025},
  url    = {https://github.com/54younger/Medical-LLM}
}

Author: 54younger Repository: Medical-LLM

About

No description, website, or topics provided.

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages