[GH-ISSUE #3891] not clear what the options are for OLLAMA_LLM_LIBRARY #64448

Closed
opened 2026-05-03 17:43:05 -05:00 by GiteaMirror · 2 comments
Owner

Originally created by @FlorinAndrei on GitHub (Apr 24, 2024).
Original GitHub issue: https://github.com/ollama/ollama/issues/3891

Originally assigned to: @dhiltgen on GitHub.

What is the issue?

This document https://github.com/ollama/ollama/blob/main/docs/troubleshooting.md says:

You can set OLLAMA_LLM_LIBRARY to any of the available LLM libraries to bypass autodetection, so for example, if you have a CUDA card, but want to force the CPU LLM library with AVX2 vector support, use:

OLLAMA_LLM_LIBRARY="cpu_avx2" ollama serve

What is not clear is: what are all the possible values I could give to OLLAMA_LLM_LIBRARY?

I ended up here trying to figure out how to force the model to run on the CPU even when there is a GPU present in the system. But I would like to see the more general answer, and it should be in the project documentation.

OS

macOS

GPU

Apple

CPU

Apple

Ollama version

0.1.32

Originally created by @FlorinAndrei on GitHub (Apr 24, 2024). Original GitHub issue: https://github.com/ollama/ollama/issues/3891 Originally assigned to: @dhiltgen on GitHub. ### What is the issue? This document https://github.com/ollama/ollama/blob/main/docs/troubleshooting.md says: ``` You can set OLLAMA_LLM_LIBRARY to any of the available LLM libraries to bypass autodetection, so for example, if you have a CUDA card, but want to force the CPU LLM library with AVX2 vector support, use: OLLAMA_LLM_LIBRARY="cpu_avx2" ollama serve ``` What is not clear is: what are all the possible values I could give to OLLAMA_LLM_LIBRARY? I ended up here trying to figure out how to force the model to run on the CPU even when there is a GPU present in the system. But I would like to see the more general answer, and it should be in the project documentation. ### OS macOS ### GPU Apple ### CPU Apple ### Ollama version 0.1.32
GiteaMirror added the bug label 2026-05-03 17:43:05 -05:00
Author
Owner

@dhiltgen commented on GitHub (May 1, 2024):

https://github.com/ollama/ollama/blob/main/docs/troubleshooting.md#llm-libraries

The exact list of LLM libraries varies from release to release, and is reported in the server log, as described with an example in the troublshooting doc Dynamic LLM libraries [rocm_v6 cpu cpu_avx cpu_avx2 cuda_v11 rocm_v5]

It sounds like you're running on an ARM Mac, in which case, there's exactly 1 runner, "metal" so this override isn't particularly useful. On Intel Macs, it can be useful to toggle which of the CPU variants, and there is work going on to potentially support metal on x86 macs for older GPUs.

If you're trying to force CPU inference, you can set NumGPU to zero which will force zero layers to be loaded into the GPU. An example showing a different optional parameter is shown here https://github.com/ollama/ollama/blob/main/docs/faq.md#how-can-i-specify-the-context-window-size

% ollama run llama2
>>> /set parameter num_gpu 0
Set parameter 'num_gpu' to '0'
>>> Why is the sky blue
...
<!-- gh-comment-id:2089264210 --> @dhiltgen commented on GitHub (May 1, 2024): https://github.com/ollama/ollama/blob/main/docs/troubleshooting.md#llm-libraries The exact list of LLM libraries varies from release to release, and is reported in the server log, as described with an example in the troublshooting doc `Dynamic LLM libraries [rocm_v6 cpu cpu_avx cpu_avx2 cuda_v11 rocm_v5]` It sounds like you're running on an ARM Mac, in which case, there's exactly 1 runner, "metal" so this override isn't particularly useful. On Intel Macs, it can be useful to toggle which of the CPU variants, and there is work going on to potentially support metal on x86 macs for older GPUs. If you're trying to force CPU inference, you can set NumGPU to zero which will force zero layers to be loaded into the GPU. An example showing a different optional parameter is shown here https://github.com/ollama/ollama/blob/main/docs/faq.md#how-can-i-specify-the-context-window-size ``` % ollama run llama2 >>> /set parameter num_gpu 0 Set parameter 'num_gpu' to '0' >>> Why is the sky blue ... ```
Author
Owner

@CL415 commented on GitHub (Jan 21, 2026):

I do not see any LLM library list in the logs in version 0.14.2...

<!-- gh-comment-id:3776925583 --> @CL415 commented on GitHub (Jan 21, 2026): I do not see any LLM library list in the logs in version 0.14.2...
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/ollama#64448