Skip to content

Instantly share code, notes, and snippets.

@askareija
Last active November 2, 2024 11:13
Show Gist options
  • Save askareija/c1736f321963553a366447e4fa6e051d to your computer and use it in GitHub Desktop.
Save askareija/c1736f321963553a366447e4fa6e051d to your computer and use it in GitHub Desktop.
Install Ollama with AMD GPU (On Laptop) Arch Linux

My laptop specs: MSI Bravo 15 B7E

  • CPU: AMD Ryzen™ 5 7535HS Processor with AMD XDNA™ architecture 6 cores, Max Boost Clock 4.55 GHz
  • GPU: AMD Radeon™ RX 6550M 4GB GDDR6
  • RAM: 32GB DDR5-4800
  1. Clone ollama git clone --recursive https://github.com/ollama/ollama.git
  2. go to directory cd ollama
  3. Install dependencies sudo pacman -S rocm-hip-sdk rocm-opencl-sdk clblast go
  4. Build ollama with env AMDGPU_TARGET=gfx1030 ROCM_PATH=/opt/rocm CLBlast_DIR=/usr/lib/cmake/CLBlast go generate -tags rocm ./...
  5. go build -tags rocm
  6. Now to run it HSA_OVERRIDE_GFX_VERSION=10.3.0 ./ollama serve
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment