[GH-ISSUE #5635] ollama not use all GPUs #3514

Closed
opened 2026-04-12 14:13:02 -05:00 by GiteaMirror · 2 comments
Owner

Originally created by @mavershang on GitHub (Jul 11, 2024).
Original GitHub issue: https://github.com/ollama/ollama/issues/5635

Originally assigned to: @dhiltgen on GitHub.

What is the issue?

I ran ollama on a server with 4x A100. It only uses 1 of them. Is there some setting need to be changed? Thanks

image

OS

Linux

GPU

Nvidia

CPU

Intel

Ollama version

0.2.1

Originally created by @mavershang on GitHub (Jul 11, 2024). Original GitHub issue: https://github.com/ollama/ollama/issues/5635 Originally assigned to: @dhiltgen on GitHub. ### What is the issue? I ran ollama on a server with 4x A100. It only uses 1 of them. Is there some setting need to be changed? Thanks ![image](https://github.com/ollama/ollama/assets/8919917/8a49b4a4-fd85-4715-8ff0-1ea0c1276939) ### OS Linux ### GPU Nvidia ### CPU Intel ### Ollama version 0.2.1
GiteaMirror added the documentation label 2026-04-12 14:13:02 -05:00
Author
Owner

@Demirrr commented on GitHub (Jul 11, 2024):

I have also similar issue. Setting num_gpu:2 doesn't do anything

Edit: OLLAMA_NUM_PARALLEL=8 did the trick. Thank you!

<!-- gh-comment-id:2223623813 --> @Demirrr commented on GitHub (Jul 11, 2024): I have also similar issue. Setting [num_gpu:2](https://github.com/ollama/ollama/blob/main/docs/api.md#generate-request-with-options) doesn't do anything Edit: `OLLAMA_NUM_PARALLEL=8` did the trick. Thank you!
Author
Owner

@dhiltgen commented on GitHub (Jul 23, 2024):

I'll update the FAQ to make this clearer. In short, the default behavior is to use a single GPU if the model will fit as that typically yields the best performance.

<!-- gh-comment-id:2246406575 --> @dhiltgen commented on GitHub (Jul 23, 2024): I'll update the FAQ to make this clearer. In short, the default behavior is to use a single GPU if the model will fit as that typically yields the best performance.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/ollama#3514