How Much GPU Memory to Fine-Tune a 7B Model?
The interviewer asksA team wants to fine-tune a 7B model. How much GPU memory does full fine-tuning need, and what are the alternatives?
AI Infrastructure PMModel PMForward Deployed Engineer (secondary)AdvancedTechnical roundRepresentative5–7 min
On this page
The 30-second version
- Full fine-tuning with a standard optimiser needs weights, gradients and optimiser state.
- Rule of thumb in mixed precision: ~16 bytes per parameter → 7B × 16 ≈ 112 GB, before activations.
- So full fine-tuning needs several GPUs.
- Adapter methods train a small add-on and freeze the base: far less memory.
- With the base model quantised to 4-bit (~3.5 GB), adapter training fits on one consumer-grade GPU.
What it's really testing
- Training memory breakdown
- Adapter alternatives
- Practical recommendations
How to structure your answer
- Break down memory.
- Estimate.
- Alternatives.
- Recommend.
The interview, played out
- InterviewerA team wants to fine-tune a 7B model. How much GPUGraphics processing unit. The chips most AI models are trained and served on. Read the full explanation memory does full fine-tuning need?
- CandidateTraining holds more than the weights: the weights, their gradients, and the optimiser's state, which for the usual optimiser is two extra values per parameter, typically kept at higher precision. The common rule of thumb is about 16 bytes per parameter in mixed precision.
- Strong moveBreaks memory into its parts.
- Candidate7 billion × 16 bytes ≈ 112 GB, plus activations, so several 80 GB GPUs.
- InterviewerAlternatives?
- CandidateAdapter methods: freeze the base model and train a small add-on, a fraction of a percent of the parameters. Gradients and optimiser state are only needed for the add-on. With the base model loaded at 4-bit, about 3.5 GB, it can fit on a single 24 GB GPU.
- Missed signalShould mention activations grow with sequence length and batch size.
- CandidateActivations still grow with sequence length and batch size, so long examples need more memory.
The strong answer, distilled
- Breakdown: weights + gradients + optimiser state (+ activations).
- Estimate: ~16 bytes/param → ~112 GB for 7B, plus activations: multi-GPU.
- Adapters: freeze base, train small add-on; tiny optimiser state.
- Quantised base: 4-bit (~3.5 GB) + adapters fits on one 24 GB GPU.
- Watch: activations scale with sequence length and batch.
This is one strong answer, not the only one.
How it's scored
| Dimension | Weak (2) | Passable (3) | Strong (5) |
|---|---|---|---|
| Breakdown | Weights only | Weights and gradients | Weights, gradients, optimiser, activations |
| Estimate | None | Rough | ~16 bytes/param applied |
| Alternatives | None | Smaller model | Adapters with quantised base |
Round scorecard: AI Infrastructure PM: technical round, filled in for the mock candidate
| Dimension | Weak | Passable | Strong | The mock candidate |
|---|---|---|---|---|
| Structure | Jumps to a number. | Some steps. | Formula first, steps said out loud. | Strong. Broke memory into weights, gradients and optimiser state. |
| Assumptions | Hidden or wrong. | Stated. | Stated, reasonable, and the sensitive ones identified. | Strong. Used ~16 bytes per parameter for mixed-precision Adam. |
| Technical depth | Weights only. | Weights and throughput. | Weights, KV cache, batching and latency targets. | Strong. Knew adapter methods change the picture. |
| Product judgment | Stops at the number. | Mentions cost. | Turns the estimate into a capacity and cost decision. | Passable. Mentioned activations only when asked. |
How the answer changes by role
| Role | What to emphasise |
|---|---|
| AI Infrastructure PMProduct Manager. Decides what a product should do, for whom, and why. Read the full explanation | Hardware planning |
| Model PM | When full fine-tuning is worth it |
| Forward Deployed EngineerForward Deployed Engineer. An engineer embedded with customers who scopes, builds and ships AI solutions into production. Read the full explanation | Fine-tuning options for customers |
Common mistakes
- Counting only weights
- Assuming full fine-tuning is the only option
- Ignoring sequence length
More follow-ups to practise
- "Is adapter quality as good?" Hint: often close for narrow tasks; test it.
- "Should they fine-tune at all?" Hint: check prompting and retrieval first.
Go deeper
- Module: AI numbers: memory and compute
- Framework: Back-of-Envelope Method for AI Numbers
- Framework: Explain a Concept Framework
- Framework: Opening Any Interview Answer
- Lesson: How much memory a model needs
- Lesson: Fine-tuning, RLHF and reinforcement learning
- Also tests: Training and the model lifecycle
Sources
Representative question: written to match technical rounds for AI product roles, not a specific reported interview.