What problem does it solve?
This Skill addresses critical GPU memory issues, including CUDA Out-of-Memory (OOM) errors and training crashes, by providing strategies to optimize memory usage within BayesFlow training pipelines.
Core Features & Use Cases
- OOM Detection & Recovery: Automatically detects and recovers from CUDA OOM errors by adjusting batch sizes or employing other memory-saving techniques.
- Gradient Checkpointing: Trades compute for memory by recomputing activations during the backward pass, significantly reducing peak memory requirements.
- Memory Probing: Intelligently probes a grid of memory configurations to find the optimal settings before training begins.
- Use Case: When your BayesFlow training job fails with a CUDA OOM error, this skill can automatically retry with a smaller batch size or enable gradient checkpointing to allow the training to complete successfully.
Quick Start
Use the bayesflow-memory skill to automatically retry training with a halved batch size when an OOM error occurs.