MedGemma ECG Training Metrics
Training metrics and visualization plots from fine-tuning MedGemma-4B on ECG datasets.
Overview
This repository contains training metrics, loss curves, and performance visualizations from fine-tuning Google's MedGemma-4B-it model on ECG interpretation tasks using the PTB-XL subset of the ECGInstruct dataset.
Training Details
Model: google/medgemma-4b-it (fine-tuned with LoRA)
Dataset: PULSE-ECG/ECGInstruct (PTB-XL subset)
Infrastructure: AIRAWAT (C-DAC) - 8x NVIDIA A100 40GB GPUs
Training Duration: ~16.5 hours (2 epochs)
Final Metrics
| Metric | Value |
|---|---|
| Token Accuracy | 89.62% |
| Training Loss | 0.99 |
| Entropy | 0.985 |
| Total Tokens | 103,301,284 |
Visualization Plots
Training Dashboard
Combined view of all training metrics including loss, accuracy, learning rate, gradient norm, and entropy.
Individual Plots
Training Configuration
# LoRA Settings
lora_r: 32
lora_alpha: 64
lora_dropout: 0.05
# Training Hyperparameters
epochs: 2
learning_rate: 2e-4
batch_size: 192 (effective)
optimizer: AdamW (fused)
lr_scheduler: cosine
precision: bfloat16
gradient_checkpointing: true
Key Observations
- Loss Convergence: Training loss decreased smoothly from ~10 to ~1.6
- Accuracy Improvement: Token accuracy improved from 50% (random) to 89.6%
- Stable Training: Gradient norms remained stable (0.7-0.9)
- Entropy Reduction: Model became more confident over training
Related Resources
- Fine-tuned Model: convaiinnovations/medgemma-4b-ptbxl
- Base Model: google/medgemma-4b-it
- Dataset: PULSE-ECG/ECGInstruct
Acknowledgments
- Infrastructure: AIRAWAT AI Innovation Challenge by C-DAC
- Base Model: Google MedGemma team
- Dataset: PULSE-ECG team
License
Apache 2.0
Inference Providers
NEW
This model isn't deployed by any Inference Provider.
๐
Ask for provider support





