Home Knowledge Base Layer-wise Activation Checkpointing

Layer-wise Activation Checkpointing is a memory optimization technique that treats each transformer block as a checkpoint boundary, saving activations at layer boundaries and recomputing within-layer activations during the backward pass — providing a simple, tunable knob where adjusting the checkpoint frequency (every 1, 2, or 4 layers) directly controls the tradeoff between memory savings and recomputation overhead, making it the most widely used memory reduction technique for training large transformer models.

What Is Layer-wise Checkpointing?

Checkpoint Frequency Tradeoffs

FrequencyMemory UsageSpeed OverheadBest For
No checkpointing100% (baseline)0%Small models that fit in memory
Every 4 layers~70%~10%Moderate memory pressure
Every 2 layers~50%~20%Balanced speed/memory
Every 1 layer~30%~30%Maximum memory savings
Selective (per-op)~50%~10-15%Optimal but complex

Implementation

Why Layer Boundaries Work

Layer-wise activation checkpointing is the standard memory optimization for large model training — providing a simple, tunable checkpoint frequency that directly controls the speed-memory tradeoff at natural transformer layer boundaries, enabling training of models 2-3× larger than available GPU memory would otherwise allow.

layer-wise checkpointingcheckpoint frequencymemory trade-off

Explore 500+ Semiconductor & AI Topics

From EUV lithography to CUDA optimization — search the full knowledge base or chat with our AI assistant.