To check for Ollama CPU offload, run ollama ps and read PROCESSOR. A CPU/GPU split means part of the model is loaded in system memory and part is on the GPU. Ollama FAQ
On Ollama v0.40.19’s llama-server backend, the runner uses available VRAM to decide how many layers to put on the GPU unless you request a specific count. Model scheduler · Runner integration
Read the split in ollama ps
ollama run runs a model, and ollama ps lists models currently loaded in memory. CLI reference · Ollama FAQ
Replace MODEL throughout with your local chat model’s name and tag. Run the first command in one terminal and send a short prompt. Run the second command in another terminal.
ollama run MODEL
ollama ps
PROCESSOR | What the model uses |
|---|---|
100% GPU | In v0.40.19, ollama ps shows this when reported VRAM is nonzero and equals the reported total. CLI implementation When post-load buffer sizes are available and add up to a positive total, the llama-server runner makes those values match if it offloads all model layers to the GPU without any layer overflow to the CPU. If buffer sizes are unavailable, the runner can report the model file size estimate for both. Runner integration |
48%/52% CPU/GPU | In this example, about 48% of the reported model memory is in system memory and about 52% is on the GPU. Ollama FAQ · CLI implementation |
100% CPU | System memory for the whole model. Ollama FAQ |
In Ollama v0.40.19, the CLI calculates the split from the reported memory sizes. The CONTEXT column shows the allocated context length. CLI implementation · Context length
Check for an explicit GPU layer count
At the interactive Ollama prompt, run /show parameters. Look for num_gpu under Model defined parameters and User defined parameters when those settings are listed. Interactive CLI
On the llama-server backend in Ollama v0.40.19, a positive num_gpu passes a layer count to the runner, and 0 requests CPU-only placement. If you find an explicit count, enter this at the interactive prompt to use automatic placement for the session. Interactive CLI · Runner integration
/set parameter num_gpu -1
The scheduler can reuse a loaded runner when you request automatic placement. Model scheduler
Use the fresh-load procedure below to compare the two layer settings.
The scheduler’s gpu memory log entries have free and available fields for the GPUs selected for the load. Model scheduler
Reduce context or parallelism
A longer context requires more memory. Context length
| Where | What to set |
|---|---|
Interactive ollama run session | Enter /set parameter num_ctx 4096 at the Ollama prompt. Ollama FAQ |
| Local API request | Set options.num_ctx in the request body, for example {"model":"llama3.2","prompt":"Why is the sky blue?","options":{"num_ctx":4096}} for /api/generate. Ollama FAQ |
| Manually started server | Set the server default when launching Ollama, for example OLLAMA_CONTEXT_LENGTH=8192 ollama serve. Ollama FAQ |
Parallel requests also increase the context memory needed for a model. The FAQ’s example is a 2K context with four parallel requests, which takes an effective 8K context allocation. OLLAMA_NUM_PARALLEL sets the maximum concurrent requests per model. Ollama FAQ
For a Linux systemd service, open the override with sudo systemctl edit ollama and set the environment variable under [Service]. Linux guide · Ollama FAQ
[Service]
Environment="OLLAMA_NUM_PARALLEL=1"
Save the override, then run systemctl daemon-reload and systemctl restart ollama. Ollama FAQ
Compare fresh loads
ollama stop MODEL unloads the named model. In an interactive session, /clear clears the conversation context. Ollama FAQ · Interactive CLI
- If
ollama pslists another idle model you can unload, runollama stop OTHER_MODELin the second terminal. Repeat the load as described below with your original settings to establish a baseline without the other model. - For an interactive change, set the parameter at the Ollama prompt and enter
/clear. If you restarted the server to change parallelism, runollama run MODELagain and reapply any session parameters from the baseline. For an API context change, setoptions.num_ctxin the next request. - If the target model is still listed, run
ollama stop MODELin the second terminal and checkollama psuntil its row disappears. - Send the same short prompt again. Run
ollama psand record the new values.
| Record | Baseline | After the change |
|---|---|---|
| Model tag | ||
| Requested context | ||
Allocated CONTEXT | ||
| Parallel limit | ||
PROCESSOR |
A higher GPU percentage means a larger share of the reported memory is on the GPU. CLI implementation
In Ollama v0.40.19, the llama-server startup log can also report the number of layers loaded onto the GPU. Runner integration
If automatic placement still produces a split at the context you need, check what fits in your available VRAM. OllamaLab’s VRAM sizing guide
Check the GPU runtime if the model loads entirely on CPU
If a fresh load under automatic placement shows 100% CPU, look for GPU initialization errors in the server logs. Ollama troubleshooting
In v0.40.19, Ollama’s discovery scans for backend libraries and validates devices that require initialization checks. GPU library discovery
- Linux systemd. Open the logs with
journalctl -e -u ollama. If you manually installed Ollama on x86-64 Linux for an AMD GPU and need the ROCm backend, the AMD installation instructions call for a separate ROCm package. Linux guide - NVIDIA on Docker. Read the server logs with
docker logs <container-name>. Ollama documentsdocker run --gpus all ubuntu nvidia-smias the runtime check. Ollama troubleshooting
Ollama’s Docker guide covers runtime setup with the NVIDIA Container Toolkit. Docker guide
Follow the platform-specific recovery steps in the GPU troubleshooting guide. Ollama Not Using GPU
Evidence and limits. Ollama’s public documentation and the v0.40.19 repository were checked on 28 November 2026. Layer placement details apply to the llama-server backend at that tag. Runner integration · Ollama v0.40.19 release
No hands-on testing was performed for this guide.