Offloading – explained simply
Offloading means that parts of a model are stored in normal RAM instead of VRAM, so it can run at all, even if more slowly.
Also: CPU offloading, GPU offloading, n-gpu-layers, num_gpu
If a model does not fit entirely in VRAM, the program can split it up: part stays in VRAM, the rest in RAM. llama.cpp calls this hybrid CPU+GPU computation to partially speed up models that are larger than VRAM. Image programs can also move model parts that are not currently needed into RAM.
Put simply: the workbench (VRAM) is too small, so part of the tool is on the shelf (RAM). Every time you need it, you have to walk over there. That is why speed often drops noticeably as soon as even a small part is offloaded.
In Ollama, the ollama ps command shows you in the PROCESSOR column how the model is split up, for example 100% GPU or 48%/52% CPU/GPU.
What does that mean for you? If a language model suddenly responds very slowly, check with ollama ps whether it has been partially offloaded, and otherwise choose a smaller quantization or context length.
Related terms
Errors where that matters
- Allocation on device (ComfyUI reports too little VRAM)
- CUDA out of memory (VRAM full)
- HostBuffer.read_file_slice failed (crash caused by the new Dynamic VRAM memory management)
- llama.cpp (Vulkan): vk::Device::allocateMemory: ErrorOutOfDeviceMemory (graphics memory block too large or VRAM full)
- llama.cpp: CUDA error: out of memory
- LM Studio: Error loading model. (Exit code: …) Unknown error (model won’t load)
- LM Studio: Model loading was stopped due to insufficient system resources
- Ollama uses the CPU instead of the graphics card
- Ollama: model requires more system memory
- Ollama: POST predict … /completion: EOF / wsarecv: An existing connection was forcibly closed by the remote host (model process crashed in the middle of the response)
- Open WebUI: Ollama: 500, message='Internal Server Error' (Ollama reached, but model cannot respond)
- Very slow responses because the model does not fit in VRAM
- Wan2GP: CUDA out of memory