Work out how much GPU memory a local model actually needs. Weights and KV cache are arithmetic; overhead is an estimate, and this page tells you which is which.
Pick a model preset, or press Load sample to see an 8B model at 64k context on a 12 GiB card: it does not fit, and the page shows exactly what to change.
Read this before you trust a number off this page.
Both follow directly from numbers you supplied. Weights are parameters times bits per weight. KV cache is 2 (one key, one value) x layers x key/value heads x head dimension x context x batch x bytes per element. If your parameter count, bits per weight and architecture fields are right, these two are right to within a rounding error.
The caveats that remain: whole-file bits per weight for the mixed GGUF classes (anything ending in _K_M or _K_S) is an average, and the exact value moves a few percent between models. Bits per weight is exact for FP16, FP8, INT8, Q8_0 and Q4_0, where the block layout fixes it.
This is a rule of thumb, not a measurement, and this page never presents it as one. What actually lands in that bucket: attention and MLP scratch buffers, the logits buffer, CUDA graph memory, the allocator's fragmentation, and the CUDA context itself, which costs a few hundred MB per process before a single weight is loaded. It scales with how many tokens are processed at once far more than with context length.
That is why the result is a range. If you need a real number, load the model and read nvidia-smi.
gpu_memory_utilization, which currently defaults to 0.92, so it will look like it is using nearly the whole card no matter how small your model is. Check the default for your version, it has moved. Paged attention removes most of the waste from padding sequences to the max length.Flash attention removes the O(context squared) attention score matrix from memory, which matters most at long context and large batch. Paged attention changes how the KV pool is allocated, not how big one sequence's cache is.