Skip to content

Instantly share code, notes, and snippets.

View pykeras's full-sized avatar
💭
telegram deep learning channel: @pytens

Mo Abbasi pykeras

💭
telegram deep learning channel: @pytens
View GitHub Profile
@pykeras
pykeras / ollama_dedicated_gpu.md
Last active July 4, 2024 10:39
Run ollama on specific GPU(s)

Ollama GPU Selector: Customize GPU Usage for Ollama

If you want to run Ollama on a specific GPU or multiple GPUs, this tutorial is for you. By default, Ollama utilizes all available GPUs, but sometimes you may want to dedicate a specific GPU or a subset of your GPUs for Ollama's use. The idea for this guide originated from the following issue: Run Ollama on dedicated GPU.

Steps:

  1. Create a script let's call it ollama_gpu_selector.sh:

    nano ollama_gpu_selector.sh