Fill in the full-FT memory contributions for a 7B model
Same topic, related formats. Practice these next.
Same topic, related formats. Practice these next.
Weights 14 GB, gradients 14 GB, Adam states 56 GB: about 84 GB baseline before activations, which is why full FT of a 7B model needs multiple data-center GPUs.
Picture each of the 7 billion knobs in the model. To train it with Adam, you keep four copies of every knob. One copy is the knob itself, one is the nudge you want to apply this step, and two are running averages Adam keeps to smooth the nudges. The knob and the nudge are stored compactly at 2 bytes each, but the two averages are stored at full 4-byte precision so the math stays stable. Add it up across all 7 billion knobs and you get roughly 84 gigabytes of memory, before you even feed in any data. That is why a model that sounds small still does not fit on one gaming GPU when you train it the full way.
Everything you need to truly understand this topic: intuition, mechanics, step by step explanation, code, formulas, and worked example. Click to expand.
Everything you need to truly understand this topic: intuition, mechanics, step by step explanation, code, formulas, and worked example.
Everything important, quickly.
5 min: assign bytes per parameter to weights, grads, and the two Adam moments, multiply by 7e9, sum to 84 GB, then discuss why optimizer states dominate and how LoRA, 8-bit Adam, and ZeRO attack them.
| Component | Bytes/param | 7B footprint |
|---|---|---|
| Weights (bf16) | 2 | 14 GB |
| Gradients (bf16) | 2 | 14 GB |
| Adam moments (2 x fp32) | 8 | 56 GB |
| Baseline before activations | 12 | ~84 GB |
Real products, models, and research that use this idea.
What an interviewer would ask next. Try answering before peeking at the approach.
Red flags and common mistakes that signal junior thinking. Click to expand.
Counting only the weights and forgetting that Adam keeps two extra fp32 moments per parameter. Those optimizer states are the largest single term, four times the weight footprint.
The night-before-the-interview bullets. Scan these on the way to the call.
Primary sources. Skim if you want the original framing.