Ollama: Difference between revisions
m →Configuration of GPU acceleration: Document vulkan option |
Mathtician (talk | contribs) Updated syntax for systemd service config (acceleration -> package); have not tested standalone package config |
||
| Line 19: | Line 19: | ||
== Configuration of GPU acceleration == | == Configuration of GPU acceleration == | ||
Acceleration is configured by selecting a package: | |||
* | * ollama-cpu: disable GPU, only use CPU | ||
* | * ollama-rocm: supported by most modern AMD GPUs | ||
* | * ollama-cuda: supported by most modern NVIDIA GPUs | ||
* | * ollama-vulkan: supported by most modern GPUs on Linux | ||
| Line 41: | Line 41: | ||
services.ollama = { | services.ollama = { | ||
enable = true; | enable = true; | ||
package = pkgs.ollama-cuda; | |||
}; | }; | ||
</syntaxhighlight> | </syntaxhighlight> | ||
| Line 128: | Line 128: | ||
services.ollama = { | services.ollama = { | ||
enable = true; | enable = true; | ||
package = pkgs.ollama-rocm; | |||
environmentVariables = { | environmentVariables = { | ||
HCC_AMDGPU_TARGET = "gfx1031"; # used to be necessary, but doesn't seem to anymore | HCC_AMDGPU_TARGET = "gfx1031"; # used to be necessary, but doesn't seem to anymore | ||