VRAM – explained simply
VRAM is the graphics card’s dedicated memory; it determines how large AI models can run quickly on your PC.
Also: graphics memory, video memory, video RAM, GPU memory
For the graphics card to calculate a model quickly, it has to fit in its own memory, VRAM. Think of VRAM as a workbench: Anything that fits on it is immediately within reach. Anything that doesn’t fit has to be fetched from the slower shelf (the normal RAM).
Roughly speaking, a model needs about as much memory as parameters times bytes per parameter. So a model with 7 billion parameters uses around 14 GB at 16-bit precision, and about 7 GB at 8-bit. An 8B language model in the Q4_K_M quantization is about 4.6 GiB in size according to the llama.cpp documentation. On top of that, there is memory for the context length or image resolution.
If the VRAM is not enough, many programs offload part of the model to normal RAM. This works, but it makes the calculation noticeably slower.
What does that mean for you? Before downloading, check a model’s file size: If it is significantly smaller than your VRAM, it will usually run entirely on the graphics card.
Related terms
Errors where that matters
- A1111/Forge: A tensor with NaNs was produced (black image)
- Allocation on device (ComfyUI reports too little VRAM)
- AMD graphics card not being used (ROCm or Vulkan)
- Black images or NaN values (VAE precision)
- CUDA out of memory (VRAM full)
- DefaultCPUAllocator: not enough memory: you tried to allocate (RAM full)
- Expected all tensors to be on the same device (data partly on GPU, partly on CPU)
- HostBuffer.read_file_slice failed (crash caused by the new Dynamic VRAM memory management)
- KoboldCpp closes immediately while loading
- llama-server: the request exceeds the available context size, try increasing it (request longer than the context length)
- llama.cpp (Vulkan): vk::Device::allocateMemory: ErrorOutOfDeviceMemory (graphics memory block too large or VRAM full)
- llama.cpp: CUDA error: out of memory
- LM Studio: Model loading was stopped due to insufficient system resources
- LM Studio: This message contains no content. The AI has nothing to say. (Reply remains empty)
- LM Studio: Trying to keep the first … tokens when context the overflows (Input is longer than the configured context length)
- Model forgets the beginning or ignores long texts (context length too small)
- Ollama uses the CPU instead of the graphics card
- Ollama: llama runner process has terminated: exit status 0xc0000409 (model process crashed)
- 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)
- Reconnecting / Failed to connect to server
- Stable diffusion model failed to load (model can’t be loaded — the real cause is above)
- Very slow responses because the model does not fit in VRAM
- vLLM: The model's max seq len is larger than the maximum number of tokens that can be stored in KV cache / No available memory for the cache blocks (context does not fit in the VRAM)
- Wan2GP: CUDA out of memory
- Warning: Ran out of memory when regular VAE decoding, retrying with tiled VAE decoding (VAE decoding falls back to tiles)