The Open Model EcosystemLesson 53 of 71

Module 6 · Adapting a model to your work

Fitting a fine-tune in 16 GB

In this lesson

  • 9 min read
  • 5 reading sections
  • Knowledge check
  • Lesson 3 of 11 in this chapter

This chapter’s goalDecide with evidence whether a task needs fine-tuning at all; if it does, build the dataset, size a LoRA to fit free hardware, run it, and demonstrate on a held-out set and a regression suite that the adapted model is better at the task and no worse at everything else.

This chapter’s media

The film explains chapter ideas. The audiobook narrates the complete teaching text.

FormatEnglishहिंदी
Chapter filmNot availableNot available
Full audiobookNot availableNot available
Full fine-tune of a 7B: where the memory goesOptimiser state, about 12bytes per parameter84 GBActivations, at batch 8and 2,048 tokens20 GBWeights at 2 bytes14 GBGradients at 2 bytes14 GBAbout 110 GB, which is why almost nobody full-tunes a 7B. QLoRA freezes a 4-bit base at 3.5 GB andtrains an adapter, taking the first, third and fourth bars to under five in total, leavingactivations, the one bar you control, with sequence length, batch size and gradient checkpointing.
About 110 GB, which is why almost nobody full-tunes a 7B. QLoRA freezes a 4-bit base at 3.5 GB and trains an adapter, taking the first, third and fourth bars to under five in total, leaving activations, the one bar you control, with sequence length, batch size and gradient checkpointing.

Figure

A little at a time

Explore an idea, try it, then check what stays.

Step 1 of 6Free · no account needed
Lesson steps

Where the memory goes in training

Inference needs weights plus a cache. Training needs considerably more, and knowing the four components tells you exactly which dial to turn when it will not fit.

For a full fine-tune of a 7B model in mixed precision:

  • Weights, 2 bytes each: 14 GB
  • Gradients, one per weight, 2 bytes: 14 GB
  • Optimiser state, Adam keeps two moments in 32-bit plus a master copy: roughly 12 bytes per parameter, 84 GB
  • Activations, everything saved for the backward pass: depends on batch size and sequence length, often tens of GB

That is 110 GB or more, which means several datacentre GPUs. It is why almost nobody full-tunes a 7B model.

Your place and first choices stay on this browser. Classroom credit is recorded separately.

Every lesson here is open. Your progress is recorded once you pass the Maths You Actually Need exam.

Stuck on something?Ask Anjali, your AI tutor

How to cite: Addaly (2026) ‘Fitting a fine-tune in 16 GB’, in The Open Model Ecosystem. Edited by M. Mun. Addaly. Available at: https://addaly.com/learn/open-models/qlora-and-memory (Accessed: 29 November 2026).