gd007/MediSimplifier

Jupyter Notebook

0

0 commits

updated Jan 31, 2026

See the code

README

MediSimplifier

LoRA Fine-Tuning for Medical Discharge Summary Simplification

Hugging Face Models Hugging Face Dataset License

Overview

MediSimplifier fine-tunes open-source LLMs using LoRA to simplify medical discharge summaries to a 6th-grade reading level, improving patient comprehension of their medical documents.

Course Project: Technion DS25 Deep Learning
Authors: Guy Dor, Shmulik Avraham


🚀 Getting Started

Try the Models Now

👉 Open notebooks/MediSimplifier_Inference_Demo.ipynb to get started!

The demo notebook provides everything you need:

  • ✅ Load all three fine-tuned models from HuggingFace
  • ✅ Correct prompt formats for each model architecture
  • ✅ Run inference on medical discharge summaries
  • ✅ Compare outputs across models

Installation

git clone https://github.com/gd007/MediSimplifier.git
cd MediSimplifier
pip install -r requirements.txt

Then open the inference demo notebook and run the cells.


Key Results

ModelROUGE-LSARIBERTScoreFK-GradeImprovement
OpenBioLLM-8B 🏆0.674974.640.94987.16+157.3%
Mistral-7B0.649173.790.94646.91+65.9%
BioMistral-7B-DARE0.631873.010.94396.95+53.3%

Achievement: ~50% readability reduction (FK 14.5 → ~7.0)

Project Structure

├── notebooks/
│   ├── MediSimplifier_Inference_Demo.ipynb  # 👈 START HERE
│   ├── MediSimplifier_Part1.ipynb           # Data prep & ground truth generation
│   ├── MediSimplifier_Part2.ipynb           # Baseline evaluation
│   ├── MediSimplifier_Part3.ipynb           # LoRA fine-tuning & ablation
│   └── MediSimplifier_Part4.ipynb           # Evaluation & analysis
├── results/
│   ├── ablation/                            # Ablation study results
│   ├── baseline/                            # Zero-shot baseline metrics
│   ├── evaluation/                          # Final evaluation metrics
│   ├── training/                            # Training logs
│   └── figures/                             # All visualizations
├── MediSimplifier_IEEE_Paper.pdf            # 📄 Final report
├── MediSimplifier_Final_Presentation.pdf    # 📊 Presentation
└── MediSimplifier_Master_Document.md

Methodology

Dataset

Models Compared

ModelTypeArchitecturePrompt Format
OpenBioLLM-8BMedicalLlama3ChatML
BioMistral-7B-DAREMedicalMistralMistral
Mistral-7B-Instruct-v0.2GeneralMistralMistral

LoRA Configuration (Optimal)

ParameterValue
Rank (r)32
Alpha (α)64
Target Modulesq, k, v, o projections
rsLoRATrue
Trainable Params27.3M (0.38%)

Ablation Study Findings

PhaseFinding
Rankr=32 optimal (contradicts Hu et al. 2021)
Modulesall_attn best despite 2x parameters
Data SizeMore data = better (+5.5-6.6% ROUGE-L)
rsLoRAAdopted based on literature

Key Research Findings

  1. Ranking Reversal: Worst zero-shot model (OpenBioLLM) achieved best fine-tuned performance (+157%)
  2. Medical Pretraining: Advantage disappears after task-specific fine-tuning
  3. Consistent Success: All models achieve ~50% readability reduction
  4. Statistical Significance: All pairwise ROUGE-L differences significant (p < 0.001)

Resources

Citation

@misc{medisimplifier2026,
  author = {Dor, Guy and Avraham, Shmulik},
  title = {MediSimplifier: LoRA Fine-Tuning for Medical Discharge Summary Simplification},
  year = {2026},
  publisher = {GitHub},
  howpublished = {\url{https://github.com/gd007/MediSimplifier}}
}

License

Apache 2.0 - See LICENSE for details.

Acknowledgments

  • Technion DS25 Deep Learning Course
  • Base model teams: OpenBioLLM, Mistral, BioMistral
  • Asclepius dataset creators (starmpcc)

gd007/MediSimplifier

Jupyter Notebook

0

0 commits

updated Jan 31, 2026

See the code

README

MediSimplifier

LoRA Fine-Tuning for Medical Discharge Summary Simplification

Hugging Face Models Hugging Face Dataset License

Overview

MediSimplifier fine-tunes open-source LLMs using LoRA to simplify medical discharge summaries to a 6th-grade reading level, improving patient comprehension of their medical documents.

Course Project: Technion DS25 Deep Learning
Authors: Guy Dor, Shmulik Avraham


🚀 Getting Started

Try the Models Now

👉 Open notebooks/MediSimplifier_Inference_Demo.ipynb to get started!

The demo notebook provides everything you need:

  • ✅ Load all three fine-tuned models from HuggingFace
  • ✅ Correct prompt formats for each model architecture
  • ✅ Run inference on medical discharge summaries
  • ✅ Compare outputs across models

Installation

git clone https://github.com/gd007/MediSimplifier.git
cd MediSimplifier
pip install -r requirements.txt

Then open the inference demo notebook and run the cells.


Key Results

ModelROUGE-LSARIBERTScoreFK-GradeImprovement
OpenBioLLM-8B 🏆0.674974.640.94987.16+157.3%
Mistral-7B0.649173.790.94646.91+65.9%
BioMistral-7B-DARE0.631873.010.94396.95+53.3%

Achievement: ~50% readability reduction (FK 14.5 → ~7.0)

Project Structure

├── notebooks/
│   ├── MediSimplifier_Inference_Demo.ipynb  # 👈 START HERE
│   ├── MediSimplifier_Part1.ipynb           # Data prep & ground truth generation
│   ├── MediSimplifier_Part2.ipynb           # Baseline evaluation
│   ├── MediSimplifier_Part3.ipynb           # LoRA fine-tuning & ablation
│   └── MediSimplifier_Part4.ipynb           # Evaluation & analysis
├── results/
│   ├── ablation/                            # Ablation study results
│   ├── baseline/                            # Zero-shot baseline metrics
│   ├── evaluation/                          # Final evaluation metrics
│   ├── training/                            # Training logs
│   └── figures/                             # All visualizations
├── MediSimplifier_IEEE_Paper.pdf            # 📄 Final report
├── MediSimplifier_Final_Presentation.pdf    # 📊 Presentation
└── MediSimplifier_Master_Document.md

Methodology

Dataset

Models Compared

ModelTypeArchitecturePrompt Format
OpenBioLLM-8BMedicalLlama3ChatML
BioMistral-7B-DAREMedicalMistralMistral
Mistral-7B-Instruct-v0.2GeneralMistralMistral

LoRA Configuration (Optimal)

ParameterValue
Rank (r)32
Alpha (α)64
Target Modulesq, k, v, o projections
rsLoRATrue
Trainable Params27.3M (0.38%)

Ablation Study Findings

PhaseFinding
Rankr=32 optimal (contradicts Hu et al. 2021)
Modulesall_attn best despite 2x parameters
Data SizeMore data = better (+5.5-6.6% ROUGE-L)
rsLoRAAdopted based on literature

Key Research Findings

  1. Ranking Reversal: Worst zero-shot model (OpenBioLLM) achieved best fine-tuned performance (+157%)
  2. Medical Pretraining: Advantage disappears after task-specific fine-tuning
  3. Consistent Success: All models achieve ~50% readability reduction
  4. Statistical Significance: All pairwise ROUGE-L differences significant (p < 0.001)

Resources

Citation

@misc{medisimplifier2026,
  author = {Dor, Guy and Avraham, Shmulik},
  title = {MediSimplifier: LoRA Fine-Tuning for Medical Discharge Summary Simplification},
  year = {2026},
  publisher = {GitHub},
  howpublished = {\url{https://github.com/gd007/MediSimplifier}}
}

License

Apache 2.0 - See LICENSE for details.

Acknowledgments

  • Technion DS25 Deep Learning Course
  • Base model teams: OpenBioLLM, Mistral, BioMistral
  • Asclepius dataset creators (starmpcc)