OllamaLab
Illustrated title card for the guide: Ollama CPU Offload and How to Diagnose the Split
troubleshooting

Ollama CPU Offload and How to Diagnose the Split

See why Ollama splits a model between CPU and GPU. Read ollama ps, check the layer setting, and compare loads after changing context or parallelism.

By OllamaLab Editorial · · 5 min read

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
PROCESSORWhat the model uses
100% GPUIn 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/GPUIn 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% CPUSystem 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

WhereWhat to set
Interactive ollama run sessionEnter /set parameter num_ctx 4096 at the Ollama prompt. Ollama FAQ
Local API requestSet 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 serverSet 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

  1. If ollama ps lists another idle model you can unload, run ollama stop OTHER_MODEL in the second terminal. Repeat the load as described below with your original settings to establish a baseline without the other model.
  2. For an interactive change, set the parameter at the Ollama prompt and enter /clear. If you restarted the server to change parallelism, run ollama run MODEL again and reapply any session parameters from the baseline. For an API context change, set options.num_ctx in the next request.
  3. If the target model is still listed, run ollama stop MODEL in the second terminal and check ollama ps until its row disappears.
  4. Send the same short prompt again. Run ollama ps and record the new values.
RecordBaselineAfter 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 documents docker run --gpus all ubuntu nvidia-smi as 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.

Sources

  1. Ollama Local FAQ
  2. Ollama Context Length
  3. Ollama CLI Reference
  4. Ollama Troubleshooting
  5. Ollama on Linux
  6. Ollama in Docker
  7. Ollama v0.40.19 Release
  8. Ollama v0.40.19 CLI Model Placement Display
  9. Ollama v0.40.19 Interactive CLI
  10. Ollama v0.40.19 Llama Server Integration
  11. Ollama v0.40.19 Model Scheduler
  12. Ollama v0.40.19 GPU Library Discovery

Related