If Ollama is not using your GPU, run ollama ps and read the PROCESSOR column. For 100% CPU, check whether Ollama can access an eligible GPU. For the llama.cpp runner, check num_gpu for a zero-layer request when you see 100% CPU or a fixed layer cap when you see a split. For a split, also check whether the model and its context fit in available VRAM.
How to tell if Ollama is using the GPU
Load a model, then run:
ollama ps
Per the Ollama FAQ, the PROCESSOR column reports where the model landed:
100% GPUmeans full offload onto the GPU. Slow generation here is a different problem, covered in Ollama tokens per second.48%/52% CPU/GPUor similar means partial offload. Ollama loads part of the model onto the GPU and leaves the rest in system memory.100% CPUmeans the model loaded entirely in system memory. If Ollama detects no eligible GPU, it falls back to CPU inference. See Ollama without a GPU for that setup.
The same output carries a CONTEXT column reporting the window allocated for the loaded model, per the context length documentation. Read it alongside the split, because a larger context than you intended is a common reason a model does not fit.
On an NVIDIA system, you can corroborate GPU memory usage with nvidia-smi, which prints GPU details and VRAM used (see Ollama on Linux and Issue #16667). If ollama ps says 100% GPU while nvidia-smi shows no VRAM change, check whether you are querying another host or daemon.
The three outcomes have different causes and different fixes, so establish which one you have before touching a setting. Skipping this is how people spend an afternoon tuning sampling parameters on a model that was never on the GPU.
Troubleshoot CPU offload in the log
The server log records what Ollama found and what it decided, which is more reliable than guessing from symptoms. Turn on debug logging first, then load the model and read the log.
On Linux with the systemd service, edit the unit per Ollama on Linux and the Ollama FAQ:
sudo systemctl edit ollama.service
Under [Service], add:
Environment="OLLAMA_DEBUG=1"
Then restart, trigger a load, and read the log:
sudo systemctl daemon-reload
sudo systemctl restart ollama
ollama run <model> "hello"
journalctl -e -u ollama
To follow the log live while loading a model, run journalctl -u ollama --no-pager --follow --pager-end, per the troubleshooting guide.
On Windows the log is server.log in %LOCALAPPDATA%\Ollama, and OLLAMA_DEBUG=1 adds discovery detail there too; see Ollama not using GPU on Windows. For a container, read stdout/stderr with docker logs <container-name>; how to run Ollama in Docker covers that setup.
Three things to look for:
- Which GPUs were selected for the model load. The
gpu memoryentries cover the selected devices. For llama.cpp,num_gpu=0can leave that list empty. Check the layer setting for that runner and use the startup discovery messages to see whether Ollama found the GPU. Ollama scheduler · Troubleshooting guide - A line saying an integrated GPU was dropped. Ollama’s GPU discovery code logs
dropping integrated GPU; to enable, set OLLAMA_IGPU_ENABLE=1. - How many layers went to the GPU out of the model’s total. Fewer than the total is the split you saw in
ollama ps.
The exact wording of other device and layer lines varies between Ollama releases, per the troubleshooting guide.
Worked example: from a split to 100% GPU
This is the order to follow when ollama ps shows a CPU/GPU split. The commands are the whole example: your own ollama ps output decides whether each step is needed.
-
Note the
PROCESSORsplit and theCONTEXTvalue:ollama ps -
For a model using llama.cpp, check for a fixed
num_gpuvalue. In an interactive session, run/show parametersand look in the model and user parameters. For an API request, look inoptions. For a fixed cap, restore automatic placement and recheckollama ps. Ollama CLI help · Ollama runner options · Ollama scheduler -
If the split persists, free VRAM. If another model is listed, unload it with
ollama stop, then check NVIDIA GPU memory usage withnvidia-smi. Ollama FAQ · Ollama on Linuxollama stop <other-model> nvidia-smi -
Unload the split model and open an interactive session. Set a context window below the
CONTEXTyou noted, then send a prompt. The Ollama FAQ uses4096as an example.ollama stop <model> ollama run <model>>>> /set parameter num_ctx 4096 >>> hello -
In a second terminal, check again:
ollama ps100% GPUconfirms the model is fully offloaded with the lowerCONTEXTvalue. If a split remains, continue with the quantised cache, smaller model, and quantisation fixes under Fix a model that does not fit in VRAM.
Which GPUs does Ollama support?
Ollama supports NVIDIA cards with compute capability 5.0 or higher through CUDA, AMD Radeon and Instinct cards through ROCm v7, Apple Silicon through Metal, and a wider set of Windows and Linux GPUs through Vulkan, per the hardware support page.
| Hardware | Backend | Requirement (Ollama docs, checked 2026-11-25) |
|---|---|---|
| NVIDIA, compute 5.0+ | CUDA | Driver 550+ (570+ for compute 5.0 to 6.2); 551.61+ on Windows |
| AMD Radeon, Radeon PRO, Instinct | ROCm | ROCm v7 on Linux, HIP7-capable driver on Windows |
| Other Windows and Linux GPUs | Vulkan | On by default when the backend is installed. OLLAMA_VULKAN=0 disables it. |
| Integrated graphics on Windows and Linux | CUDA, ROCm or Vulkan | CUDA iGPUs and ROCm gfx1151 are eligible by default. Other iGPUs require OLLAMA_IGPU_ENABLE=1. |
| Apple Silicon | Metal | Built in; see Apple Silicon memory sizing |
Apple Silicon is exempt from the iGPU filter. On Windows and Linux, the filter can skip an iGPU while keeping another eligible GPU. CPU fallback can occur when no eligible GPU remains. Ollama GPU discovery code · Ollama scheduler
An AMD iGPU case report shows CPU fallback after an update caused the Vulkan iGPU to be skipped.
Check that the GPU is visible at all
If ollama ps reports 100% CPU, verify the driver with nvidia-smi for NVIDIA CUDA or list devices with rocminfo for AMD ROCm. Ollama on Linux · Hardware support
nvidia-smi # NVIDIA CUDA
rocminfo # AMD ROCm
If the command for your intended backend fails or lists no GPU, check the driver and device access for that backend. For AMD systems where ROCm is unavailable, try Vulkan with a compatible driver and check the server log for the selected backend. Ollama on Windows · Hardware support
Common causes of an invisible GPU:
-
Driver not loaded after an update. After installing or upgrading GPU drivers, reboot so the new driver loads. Ollama’s troubleshooting guide recommends rebooting for both NVIDIA discovery errors and AMD ROCm driver upgrades.
-
Running in Docker without GPU access. Install
nvidia-container-toolkiton the NVIDIA Docker host and configure the Docker runtime. Pass--gpus=allwhen launching the Ollama container. For AMD ROCm, use the ROCm image with--device /dev/kfd --device /dev/dri. Ollama Docker documentation · Troubleshooting guide · How to run Ollama in DockerIf Open WebUI cannot reach the Ollama container, check the network configuration. Open WebUI not connecting to Ollama
-
Unsupported compute capability or an NVIDIA driver below CUDA’s minimum. Ollama’s CUDA backend requires NVIDIA compute capability 5.0 or higher and driver version 550 or newer. For compute capability 5.0 through 6.2, the CUDA driver minimum rises to 570. Vulkan has separate driver requirements. Run
nvidia-smito verify that the installed NVIDIA driver reports GPU details. Hardware support · Ollama on Linux -
A device-visibility override hiding the card. Ollama’s GPU discovery code warns when
CUDA_VISIBLE_DEVICES,ROCR_VISIBLE_DEVICES,GGML_VK_VISIBLE_DEVICES, or related overrides are set, and advises unsetting them if GPUs are not discovered. Check the service environment as well as your shell. -
The service runs as a different user. On Linux, check whether the Ollama service user has access to
/dev/kfdthroughvideo,render, or both, depending on device permissions. Ollama logs permission errors during discovery. Troubleshooting guide
Fix a model that does not fit in VRAM
If ollama ps shows a split and the model uses llama.cpp, first check whether a fixed num_gpu is limiting the number of GPU layers. If the split persists with automatic placement, the model and its context may require more VRAM than is available. Ollama CLI help · Context length documentation · Ollama scheduler
When the model loads, look for gpu memory entries in the server log. The per-device available estimate subtracts the backend minimum and configured overhead from the device’s reported free memory, with a floor of zero. The placement calculation can also cap a shared-memory GPU’s availability at free system memory. Ollama scheduler
A desktop session, a browser with hardware acceleration, or another loaded model can hold gigabytes before Ollama starts. On a machine with a display attached, that overhead is often the difference between fitting and spilling to CPU.
Then check whether the model should fit. Compare the model’s size with free VRAM; ollama ps shows the loaded size in its SIZE column, per the context length documentation. The VRAM calculator will do that arithmetic for a specific model, quantisation, and context length, and how much VRAM you need to run local LLMs with Ollama explains each term.
Fixes, in the order that costs you the least quality:
- Close whatever else holds VRAM. Another resident model is the most common culprit.
ollama pslists them;ollama stop <model>unloads one, per the Ollama FAQ. - Reduce the context window. Setting a smaller context window reduces the memory required to run a model, per the context length documentation. Set
num_ctxper request, orOLLAMA_CONTEXT_LENGTHserver-wide, per the Ollama FAQ. - Quantise the KV cache. Per the Ollama FAQ,
OLLAMA_KV_CACHE_TYPE=q8_0uses roughly half the memory of thef16default with very small precision loss;q4_0uses roughly a quarter and can affect quality more at higher context sizes. This requires Flash Attention to be enabled. - Step down a model size. A smaller model that loads at
100% GPUavoids CPU offload overhead; best Ollama models for 8GB VRAM lists models sized for 8 GB cards. - Only then step down a quantisation level.
Context length as a hidden cause
Ollama sets num_ctx when it loads a model. For the llama.cpp runner, num_gpu also applies at load time. Ollama runner options · Ollama scheduler
Increasing the context length raises the memory required to run the model, per the context length documentation. A model that loads at 100% GPU with a 4k window can land in a CPU/GPU split if reloaded with a larger num_ctx or OLLAMA_CONTEXT_LENGTH.
Ollama’s default context length scales with available VRAM rather than staying fixed, so the same model can load differently across machines. The context length documentation lists three tiers: 4k tokens below 24 GiB of VRAM, 32k from 24 to 48 GiB, and 256k at 48 GiB and above. Ollama recommends setting at least 64,000 tokens for workloads such as web search, agents, and coding tools. A longer context can lead to a CPU/GPU split if the model and its context no longer fit in VRAM.
AMD-specific checks
AMD support runs through ROCm, with wider device coverage through Vulkan. The officially supported device list in the ROCm system requirements covers only selected Instinct, Radeon PRO, and Radeon cards. On Linux, unsupported cards with a close LLVM target can sometimes work by setting HSA_OVERRIDE_GFX_VERSION to an x.y.z string such as 10.3.0, per the hardware support page.
If an AMD GPU on Linux times out during discovery in the server log, check that the ROCm v7 driver is installed rather than ROCm 6.x or earlier, per the troubleshooting guide. If ROCm cannot be made to work on a given card, the Vulkan backend is the fallback and covers a wider range of devices. Confirm which backend is active from the server log rather than assuming.
Force Ollama to use the GPU with num_gpu
First make the device visible using the GPU visibility checks. For models using the llama.cpp runner, num_gpu controls how many layers are sent to the GPU. Ollama CLI help · Ollama scheduler
Open an interactive session:
ollama run <model>
Set the GPU layer count before sending a prompt. Choose a count for your model. 33 is an example:
>>> /set parameter num_gpu 33
>>> hello
Check ollama ps in a second terminal. To restore automatic placement, set /set parameter num_gpu -1 in the session or set num_gpu to -1 in your API request’s options. Unload the existing runner with ollama stop <model> in a second terminal, then send a fresh prompt and check ollama ps again. Ollama FAQ · Ollama runner options · Ollama scheduler
Server environment variables can also control memory usage and device selection:
OLLAMA_FLASH_ATTENTION=1forces Flash Attention on to reduce memory usage as context grows. Per the Ollama FAQ, Ollama enables it automatically when the selected backend and devices support it.CUDA_VISIBLE_DEVICES(NVIDIA),ROCR_VISIBLE_DEVICES(AMD ROCm), andGGML_VK_VISIBLE_DEVICES(Vulkan) restrict which GPUs Ollama sees on multi-GPU systems, per the hardware support page. Set them in the service environment rather than only in an interactive shell so the daemon inherits them.
Why Ollama is not using the full GPU
A split such as 48%/52% CPU/GPU shows that Ollama loaded the model into both GPU and system memory. For llama.cpp models, check for a fixed num_gpu layer count before troubleshooting available VRAM or context length. Ollama FAQ · Ollama CLI help · Ollama scheduler
Two related cases:
- Parallel requests. Per the FAQ, a 2K context serving 4 parallel requests allocates an 8K context, so raising
OLLAMA_NUM_PARALLELcan tip a model into a split. - An idle second GPU. For the llama.cpp runner, Ollama generally prefers one GPU with enough free memory and headroom, which reduces PCI bus transfers. When the scheduler skips the single-GPU check or finds no card with enough headroom, it can choose a group of GPUs that share a backend. Ollama FAQ · Ollama scheduler
100% GPU in ollama ps means every layer is on the GPU or GPUs, even when GPU utilisation is below 100%. Ollama FAQ
How to disable the GPU in Ollama
For a model using the llama.cpp runner, run /set parameter num_gpu 0 before sending a prompt in an interactive session to offload zero model layers. For that runner, the corresponding API option is "options": { "num_gpu": 0 }. Ollama CLI help · Ollama runner options · Ollama scheduler
To hide GPUs from a server backend, use the environment variable for that backend:
| Backend | Server setting |
|---|---|
| NVIDIA CUDA | CUDA_VISIBLE_DEVICES=-1 |
| AMD ROCm | ROCR_VISIBLE_DEVICES=-1 |
| Vulkan | OLLAMA_VULKAN=0 |
Apply the setting in the server environment and restart Ollama. Metal and any other enabled backend can still provide GPU access. Load the model and verify its placement in ollama ps. Hardware support · Ollama FAQ · Ollama without a GPU
Ollama not using GPU on Windows
Ollama requires Windows 10 22H2 or newer. On NVIDIA systems, the Windows driver requirement is 551.61 or newer. Ollama on Windows
- Read
server.login%LOCALAPPDATA%\Ollama. Its discovery lines name the GPU and library chosen, andOLLAMA_DEBUG=1adds detail, per the troubleshooting guide. - AMD through ROCm on Windows lists only the Radeon RX 7600, 7600 XT, 7700 XT, 7800 XT, 7900 GRE, 7900 XT, 7900 XTX, and Radeon PRO W7500 to W7900 on the hardware support page. For Radeon RX 6000 systems that lack ROCm v7 support in the Windows driver, Ollama recommends Vulkan. Ollama on Windows
- Hybrid graphics laptops. In a report for Ollama 0.30.7, Ollama selected the Intel iGPU for Vulkan inference and logged that it dropped the RTX 4080 Laptop GPU’s Vulkan device as integrated. Disabling Vulkan with
OLLAMA_VULKAN=0restored CUDA inference in that case. Issue #16667 - Set variables under “Edit environment variables for your account” with Ollama quit from the taskbar, then restart it from the Start menu, per the Ollama FAQ.
Ollama not using GPU on Ubuntu and other Linux
On standard Linux installs, the installer needs lspci or lshw before it checks for the nvidia-smi executable. If the executable exists, the GPU dependency checks stop there. The CPU-only warning appears when the executable check and both vendors’ PCI checks fail. Ollama Linux install script
If you see that warning, use the available PCI tool to check the card before rerunning the installer:
- NVIDIA: Run
lspci -d '10de:'and look for NVIDIA. Withlshw, look for display vendor ID10DE. - AMD: Run
lspci -d '1002:'and look for AMD. Withlshw, look for display vendor ID1002.
For either vendor, the script’s display inventory command is lshw -c display -numeric -disable network, run with elevated privileges when needed. For NVIDIA driver verification after installation, run nvidia-smi and check that it prints GPU details. Ollama Linux install script · Ollama on Linux
If the installer reaches the PCI checks and finds an AMD match, it downloads the ROCm package. On eligible Ubuntu and Debian NVIDIA installs, the script uses apt-get to install cuda-drivers if the CUDA repository supports that OS version and architecture. During systemd setup it adds the ollama user to each of render and video that exists. Ollama Linux install script
For a manual AMD ROCm install on x86-64, add the ollama-linux-amd64-rocm.tar.zst archive. Give the service user video and/or render group access according to the device permissions. Ollama on Linux · Troubleshooting guide
If NVIDIA GPU discovery fails after Linux suspend and resume, reload the UVM driver with sudo rmmod nvidia_uvm && sudo modprobe nvidia_uvm. Hardware support
To enable an iGPU that Ollama skipped, set the variable in the systemd service environment. Ollama FAQ · GPU discovery code
- Run
sudo systemctl edit ollama.service. - Under
[Service], add a line such asEnvironment="OLLAMA_IGPU_ENABLE=1". - Run
sudo systemctl daemon-reload, thensudo systemctl restart ollama. - Reload the model and check
ollama ps.
The diagnostic order that works
| Symptom | First check | Likely cause |
|---|---|---|
100% CPU in ollama ps | Check num_gpu for llama.cpp, then the server log. Use nvidia-smi for CUDA or rocminfo for ROCm. | Zero layers requested with llama.cpp, or a GPU discovery or access issue |
100% CPU on a laptop or mini PC | dropping integrated GPU in the log | iGPU skipped with no eligible GPU remaining |
| Partial split at load | Check num_gpu for llama.cpp, then SIZE and CONTEXT in ollama ps. | Fixed llama.cpp layer cap or insufficient available VRAM |
Partial split after raising num_ctx or OLLAMA_NUM_PARALLEL | CONTEXT column and parallel settings | Larger context or parallel slots exceed VRAM at load |
| Worked yesterday, not today | Driver version, nvidia_uvm, resident models | Update without reboot, suspend/resume, or memory held |
100% GPU and still slow | Memory bandwidth of the card | Not an offload problem at all |
That last row matters. Once the split reads 100% GPU, offloading is no longer the issue and the speed you are getting is the speed the hardware provides. What sets that number is covered in Ollama tokens per second, and which cards deliver what is compared in best GPU for Ollama.
Check placement first. For a split with llama.cpp, check the GPU layer setting before changing the model or context window.
Evidence and limits
The steps were checked against Ollama’s public documentation and main-branch source on 2026-11-25. The AMD requirements and the reported GPU regressions are linked in the relevant sections. Verification was limited to documentation and source code.
FAQ
what does num_gpu do in ollama
With the llama.cpp runner, num_gpu sets how many model layers Ollama sends to the GPU. The default -1 lets Ollama choose the count when the model loads. For this runner, use 0 for zero offloaded model layers or a positive number for a fixed layer count. Ollama runner options · Ollama CLI help · Ollama scheduler
what does ollama need to use cuda
You need a working NVIDIA driver and a card with compute capability 5.0 or higher. Ollama lists a driver minimum of 550, or 570 for compute 5.0 through 6.2. The Windows documentation lists 551.61 or newer. Hardware support · Ollama on Windows
On Ubuntu and Debian, the installer can install NVIDIA drivers on eligible systems with a supported CUDA repository. Verify the installed driver with nvidia-smi. Ollama Linux install script · Ollama on Linux
can ollama use an integrated gpu
Yes. On Windows and Linux, CUDA iGPUs and ROCm gfx1151 are eligible by default. If the log says Ollama dropped your iGPU, set OLLAMA_IGPU_ENABLE=1 in the server environment and restart. Apple Silicon uses Metal and is exempt from the iGPU filter. Confirm model placement with ollama ps. GPU discovery code · Hardware support · Ollama FAQ
why did ollama stop using my gpu after an update
Start with the driver. Reboot after a kernel or GPU driver update so the new driver loads. On Linux, a suspend and resume cycle can also stop NVIDIA GPU discovery; reload the UVM driver with sudo rmmod nvidia_uvm && sudo modprobe nvidia_uvm. In one reported case, an Ollama update caused the integrated AMD GPU to be skipped. Ollama troubleshooting guide · Hardware support · AMD iGPU case report