[GH-ISSUE #7917] option to change the model loading device (CPU/GPU) #51578

Closed
opened 2026-04-28 20:36:04 -05:00 by GiteaMirror · 1 comment
Owner

Originally created by @ansilmbabl on GitHub (Dec 3, 2024).
Original GitHub issue: https://github.com/ollama/ollama/issues/7917

it would be great if we can mention the device the model to be loaded (CPU/GPU).

Originally created by @ansilmbabl on GitHub (Dec 3, 2024). Original GitHub issue: https://github.com/ollama/ollama/issues/7917 it would be great if we can mention the device the model to be loaded (CPU/GPU).
GiteaMirror added the feature request label 2026-04-28 20:36:04 -05:00
Author
Owner

@rick-github commented on GitHub (Dec 3, 2024):

With GPUs, you can select the device by setting CUDA_VISIBLE_DEVICES. If you want to load a model on CPU and avoid GPU, set num_gpu to zero (https://github.com/ollama/ollama/issues/6950#issuecomment-2373663650). If you want all models to avoid GPU, set OLLAMA_LLM_LIBRARY=cpu.

<!-- gh-comment-id:2514712162 --> @rick-github commented on GitHub (Dec 3, 2024): With GPUs, you can select the device by setting `CUDA_VISIBLE_DEVICES`. If you want to load a model on CPU and avoid GPU, set `num_gpu` to zero (https://github.com/ollama/ollama/issues/6950#issuecomment-2373663650). If you want all models to avoid GPU, set `OLLAMA_LLM_LIBRARY=cpu`.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/ollama#51578