Step 1: find your real free VRAM (and avoid the Windows 4 GB bug)

Two Windows traps mislead people before they even download a model. First, Task Manager shows “Shared GPU memory” next to “Dedicated GPU memory”: shared memory is ordinary system RAM, so spilling into it slows generation down to CPU speeds. Second, querying Win32_VideoController.AdapterRAM in PowerShell returned 4293918720 (4 GB) on our 16 GB RTX 5060 Ti because Microsoft defines AdapterRAM as an unsigned 32-bit integer.

Subtract what your open apps already use from Dedicated GPU memory. That remainder must hold three things at once: model weights + KV cache for your context + compute margin.

Check real dedicated and free VRAM on Windows (PowerShell)
  1. NVIDIA cards (exact total and used MiB): nvidia-smi --query-gpu=name,memory.total,memory.used,memory.free --format=csv
  2. Any GPU in Windows registry (64-bit value, avoids the 4 GB uint32 cap): Get-ItemProperty "HKLM:\SYSTEM\ControlSet001\Control\Class\{4d36e968-e325-11ce-bfc1-08002be10318}\0*" -Name "HardwareInformation.qwMemorySize" -ErrorAction SilentlyContinue
  3. Confirm after loading a model in Ollama: ollama ps # PROCESSOR must say 100% GPU at your target CONTEXT

On our test PC, nvidia-smi reported 15.9 GB total and 3.3 GB in use with desktop apps open, leaving 12.6 GB for models.

Measured GPU memory and speed, and what to try at 8, 12, 16 and 24 GB

Below is what Ollama’s load log reserved on the GPU (weights + context + compute) and how fast each model generated on a 524-token prompt on GPU vs CPU-only.

  • qwen3.5:4b (Q4_K_M): 2.7 GiB at 4,096 tokens, 3.7 GiB at 32,768 tokens; generated 92 to 95 tokens/s on GPU vs 11.9 tokens/s on CPU only.
  • qwen3.5:9b (Q4_K_M): 5.0 GiB at 4,096 tokens, 6.0 GiB at 32,768 tokens; generated 56 to 58 tokens/s on GPU vs 5.7 tokens/s on CPU only.
  • gemma4:12b (Q4_K_M, including auxiliary component): 7.9 GiB at 4,096 tokens, 8.7 GiB at 32,768 tokens (100% GPU on 16 GB).
  • 8 GB card (~5 to 6.5 GB free): start with qwen3.5:4b up to 32,768 context; qwen3.5:9b only fits at 4,096 to 8,192 if the desktop uses very little VRAM.
  • 12 GB card (~9 to 10.5 GB free): qwen3.5:9b up to 32,768 context, or gemma4:12b at 4,096 to 16,384 (at 32,768 it sits right at the limit).
  • 16 GB card (~12.5 to 14 GB free): gemma4:12b or qwen3.5:9b up to 32,768 context; qwen3.6:35b did not fit.

Why context breaks 8 GB and 12 GB cards differently depending on the model

Context memory depends on attention architecture, not parameter count. Going from 4,096 to 32,768 tokens added under 1 GiB on qwen3.5:9b and gemma4:12b, whereas a classic 32-layer dense model like Llama 3.1 8B needs around 4 GiB just for a 32,768-token cache by the formula (pushing a 4.6 GiB model past an 8 GB card). Full breakdown in How much VRAM context uses in Ollama.

If a model spills into RAM or refuses to load, see Ollama error 500 “unable to load model”, Ollama not using the GPU on Windows and How to unload a model in Ollama and free VRAM.

Frequently asked questions

Can an 8 GB GPU run a 9B or 8B model in Ollama?At 4,096 tokens with few apps open, often yes, right at the limit. Raise the context to 32,768 on a classic 8B model and the KV cache pushes it into system RAM.

Why does PowerShell Win32_VideoController say my 12 GB or 16 GB GPU has 4 GB?AdapterRAM is a 32-bit unsigned integer capped near 4.29 GB. Use nvidia-smi or HardwareInformation.qwMemorySize in the registry.

Does Windows Shared GPU Memory let me run bigger models fast?No. Shared GPU memory is system RAM over PCIe; once layers spill there, generation drops toward CPU speeds.

Is Q8_0 worth the extra VRAM over Q4_K_M?Only if weights plus your full context still stay 100% on the GPU. Otherwise a larger model in Q4_K_M or a wider context usually wins.