Accelerator Memory Estimator

Use this to ESTIMATE GPU/TPU memory for an ML workload and DECIDE what fits and what parallelism is needed. Trigger whenever someone asks "will this model fit", "do I have enough VRAM/HBM", "OOM / CUDA out of memory", "how many H100s / how much TPU HBM do I need", "what batch size fits", "can I fine-tune a 7B/70B on one GPU", "how big is the KV cache". Performs the actual arithmetic: training memory (weights + gradients + optimizer states + activations + overhead), sharding math (FSDP/ZeRO-1/2/3, tensor parallel, pipeline parallel), and inference KV-cache memory (with GQA/MQA). Given a model + config, it computes per-device memory, compares to capacity (H100 80GB, A100 40/80GB, TPU v5e/v5p HBM), and RECOMMENDS a fitting strategy (fits / FSDP / TP=k / activation checkpointing / quantization / QLoRA). All outputs are ESTIMATES (±) — verify against a real run.

sanjeevrg89 0314b1b 5 files · 35.1 KB Updated

File contents

sanjeevrg89/arete/tree/main/skills/accelerator-memory-estimator commit 0314b1bff7

Frequently asked questions

npx skillmds@latest add sanjeevrg89/accelerator-memory-estimator