Running a Large Language Model (LLM) on your own hardware frees you from API costs, rate limits, and cloud privacy concerns. Before downloading gigabytes of model weights, however, you run straight into the primary bottleneck of local AI: memory.
Unlike traditional software that relies mostly on CPU clock speed, LLMs are overwhelmingly bound by memory capacity and memory bandwidth. Whether you use a discrete graphics card (VRAM), standard system memory (RAM), or unified memory on Apple Silicon, knowing how memory gets consumed lets you predict what your machine can run before you start.
The Core Equation: Parameters and Precision
Every LLM consists of billions of numerical weights called parameters. To load a model, your hardware must hold all of these parameters in memory simultaneously. How much space they occupy depends on two factors: the parameter count and the numerical precision (bit depth) used to store each parameter.
In uncompressed 16-bit floating-point format (
Uncompressed Memory (GB) ≈ Parameter Count (in Billions) × 2
Under this baseline, a 7-billion-parameter (7B) model requires roughly 14 GB of memory just to load its weights, while a 70B model demands 140 GB—far beyond what consumer graphics cards offer.
How Quantization Shrinks the Footprint
To make massive models fit on everyday hardware, developers use quantization. Quantization reduces the precision of the model’s weights—converting 16-bit numbers into 8-bit, 4-bit, or even lower-bit integers—trading a tiny fraction of accuracy for dramatic memory savings.
| Precision Format | Bytes per Parameter | 8B Model Weights | 32B Model Weights | 70B Model Weights | Typical Use Case |
| :— | :— | :— | :— | :— | :— |
| FP16 / BF16 (16-bit) | 2.0 bytes | ~16 GB | ~64 GB | ~140 GB | Native baseline, fine-tuning, zero precision loss |
| Q8_0 (8-bit) | ~1.0 byte | ~8.5 GB | ~34 GB | ~74 GB | Virtually indistinguishable from FP16 quality |
| Q4_K_M (4-bit) | ~0.55 bytes | ~4.9 GB | ~19.5 GB | ~42 GB | The local AI sweet spot for speed and quality |
| IQ3_XXS (3-bit) | ~0.4 bytes | ~3.5 GB | ~14 GB | ~30 GB | Squeezing larger models onto tighter VRAM limits |
At 4-bit quantization (such as GGUF’s popular Q4_K_M or EXL2 formats), each parameter drops to roughly half a byte. Suddenly, a 70B model shrinks from 140 GB down to ~42 GB, making it runnable on a dual-GPU workstation or a Mac Studio.
The Hidden Memory Consumers: KV Cache and Overhead
A common mistake is buying an 8 GB graphics card and assuming it can comfortably run an 8 GB model file. In practice, loading the model weights is only part of the memory budget. You must also reserve room for two additional consumers:
- The KV Cache (Context Window): As you chat with an LLM or feed it long documents, it stores intermediate attention calculations in a
Key-Value cache; memory allocated to store attention states for previous tokens so the model does not recalculate them on every step. . The longer your context window (
Leave a Reply