Adam stores two fp32 buffers per trainable parameter: what does that imply for LoRA vs full FT on a 7B?
Same topic, related formats. Practice these next.
Same topic, related formats. Practice these next.
Adam holds two fp32 buffers (first moment m, second moment v) per trainable parameter. Use that single fact to compute the optimizer-state memory for a full fine-tune of a 7B model versus a LoRA fine-tune at r=16 over a few hundred million trainable parameters. State the headline number for each case and explain why most of LoRA's memory win lives here.
Adam costs 8 bytes per trainable parameter; full FT of a 7B model needs about 56 GB of optimizer state, LoRA r=16 needs about 0.8 GB, and that gap is the bulk of the LoRA win.
Imagine every worker on a construction site needs two clipboards to track their work. If a thousand workers are on the job, that is two thousand clipboards. If you instead let a small specialist crew of ten people make the actual changes while the rest of the site just observes, you only need twenty clipboards. The clipboards are the bookkeeping the optimiser keeps for each parameter it is changing. Full fine-tuning changes every parameter and pays the cost for all of them. LoRA changes only a small specialist crew of tiny adapter matrices on top of a frozen base model. The base parameters do not move, so they need no clipboards. The big memory saving is the bookkeeping you skipped, not the weights you stored.
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: compute 8 bytes per trainable parameter, derive 56 GB for full FT vs 0.8 GB for LoRA r=16, and explain that the saving scales with trainable count not total count.
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.
Claiming LoRA saves memory because the adapters are small. The dominant saving is the optimizer state you no longer maintain for the frozen base, not the size of the adapter weights themselves.
The night-before-the-interview bullets. Scan these on the way to the call.
Primary sources. Skim if you want the original framing.