← All lessonsLOCAL AI · LESSON 2 OF 5 · 8 MIN

Give the whole workload room to fit

Distinguish memory capacity from usable memory and speed.

Three things need memory: model weights, conversation state and the runtime’s working space. Dedicated GPUs use VRAM; unified-memory computers share memory with the system and other apps. The planner subtracts a reserve before deciding what fits.

Storage is not working memory

Disk storage holds downloaded files when they are not running. Working memory holds the values and temporary state used during a run. A computer can have enough free disk space for a model and still fail to load it into memory.

On a dedicated graphics card, VRAM is separate from system RAM. Some runtimes can keep part of a model in system RAM and use the CPU, but that is a different execution plan. Do not add the two capacities and treat them as one fast GPU.

A unified-memory computer lets the CPU and GPU share a pool. The operating system, display and other apps use that pool too. Begin with the calculator’s reserve, then replace the assumption with an observed usable budget if you have one.

Add three costs, then leave some room

The calculator adds model weights, conversation memory and a runtime allowance. Weights are loaded from the model file. Conversation memory saves state while a response is generated. The runtime needs additional working buffers. A download size is therefore only part of a run’s memory budget.

Suppose a hypothetical setup has 16 GiB of physical capacity and reserves 2 GiB for other uses. The available budget is 14 GiB. A workload with 5 GiB of weights, 2 GiB of conversation state and a 1 GiB allowance needs 8 GiB, leaving 6 GiB of headroom. These round numbers teach the arithmetic; they are not a measured model result.

GiB and GB are different units. One GiB is 1,073,741,824 bytes; one GB is 1,000,000,000 bytes. Compare figures in the same unit. The calculator displays GiB and states what it reserves.

What a fit result can tell you

“Room to spare” describes estimated capacity after allowances. It does not measure tokens per second, time before the first answer, or answer quality. Memory bandwidth, computation and software all influence performance.

“Tight fit” means there is little room for estimation error or extra activity. “Not verified” means the full estimate is incomplete. A conditional result needs the runtime or hardware arrangement described in its assumptions. Read those notes before relying on a close result.

  1. Select your actual hardware and inspect physical capacity, reserve and available memory.
  2. Compare the three workload components. If it exceeds capacity, identify which adjustable component is largest.
  3. Try a smaller model or lower weight precision for large weights; try less context or fewer simultaneous requests for large conversation state.
TRY IT YOURSELF

Put the idea to work

Choose your hardware, then compare “Memory needed” with available memory. Notice the room left after weights, conversation memory and the runtime allowance.

Check your understanding

Does a 24 GB GPU plus 64 GB of system RAM make an 88 GB GPU?

Reveal the explanation

No. Dedicated VRAM and system RAM are separate. Some runtimes can move part of the workload to the CPU, but that changes performance and is not the same as fitting entirely on the GPU.

Keep this in mind: Fit means weights + conversation state + runtime working space stay within usable memory. Capacity, speed and quality require separate checks.