What Is a KV Cache in Local LLMs and Why Does It Use So Much VRAM?
A KV cache stores the key and value tensors for every token already in the sequence, at every attention layer, so the model does not reprocess the…
TAGGED GUIDES
Explore the guides, ideas, and practical explanations in this topic.
21 published articlesA KV cache stores the key and value tensors for every token already in the sequence, at every attention layer, so the model does not reprocess the…
VRAM usage is not one number. Device-level tools such as nvidia-smi, per-process NVML queries, framework allocator stats, and breakdown tools like LLM Inspector each answer a different…
In llama.cpp, GPU layer offloading is controlled with -ngl, --gpu-layers, or --n-gpu-layers, which accepts an exact layer count, auto, or all. Ollama generally manages offloading automatically, so…
Model distillation trains a smaller student network to imitate a larger teacher, which makes it the only common compression technique that changes the architecture and requires a…
At 4-bit quantization, budget roughly 2 GB for a 3B model, 5 GB for a 7–8B model, 8 GB for a 13–14B model, and 40 GB for…
CUDA out of memory in local AI usually means weights, KV cache, and activations together exceed available VRAM. This guide gives a diagnostic order that starts with…
Quantization is a representation technique that stores weights at lower precision. QLoRA is a fine-tuning method that trains low-rank adapters on a frozen 4-bit base model. They…
Quantization stores a model's weights at lower precision to cut memory and speed up inference, at a small cost in quality. In practice, 4-bit builds are the…
GGUF, Safetensors and GPTQ are not three versions of the same thing. GGUF and Safetensors are container formats, while GPTQ is a quantisation method whose weights are…
Start with Q4_K_M, then let the model repository override that default. This guide explains what GGUF quantization actually changes, how to read the documented quality, size, and…
For local LLMs, dedicated VRAM capacity decides which models you can load at all — compute speed only decides how fast they answer. This guide explains how…
Local AI means running a language model on hardware you control instead of sending prompts to a hosted service. This guide explains how local inference works, how…