How rishi-1482/finetuning-medgemma-27b works
This repository is a notebook-based guide to fine-tuning MedGemma into an empathetic medical assistant. Its documented workflow prepares conversational data, configures a quantized base model and LoRA adapters, performs supervised fine-tuning, then uses the trained adapter for inference. The README also highlights paged optimization and gradient checkpointing. No notebook source was available, so the graph reflects documented stages and data flow rather than verified implementation-level calls.
Main entry points: finetuning_LoRA-2.ipynb Supervised fine-tuning
Components 14
Data preparation
- Medical conversations
- Data loading
finetuning_LoRA-2.ipynb - Prompt formatting
finetuning_LoRA-2.ipynb
Model training
- MedGemma 27B
- 4-bit quantization
finetuning_LoRA-2.ipynb - LoRA adapters
finetuning_LoRA-2.ipynb - Paged optimizer
finetuning_LoRA-2.ipynb - Gradient checkpointing
finetuning_LoRA-2.ipynb - Supervised fine-tuning
finetuning_LoRA-2.ipynb - Trained adapter
Inference
- Adapter inference
finetuning_LoRA-2.ipynb - Medical assistant response
Other components
- Researcher
- Fine-tuning notebook
finetuning_LoRA-2.ipynb
Connections 16
- Researcher → Fine-tuning notebook: runs
- Fine-tuning notebook → Data loading: orchestrates
- Medical conversations → Data loading: loads
- Data loading → Prompt formatting: formats data
- Fine-tuning notebook → 4-bit quantization: configures
- MedGemma 27B → 4-bit quantization: quantizes
- 4-bit quantization → LoRA adapters: prepares model
- Fine-tuning notebook → Supervised fine-tuning: runs
- Prompt formatting → Supervised fine-tuning: provides examples
- LoRA adapters → Supervised fine-tuning: provides adapters
- Supervised fine-tuning → Paged optimizer: uses
- Supervised fine-tuning → Gradient checkpointing: uses
- Supervised fine-tuning → Trained adapter: produces
- Fine-tuning notebook → Adapter inference: runs
- Trained adapter → Adapter inference: loads
- Adapter inference → Medical assistant response: generates