LM Studio with AMD GPU RX 6600 XT (Linux)

Install ROCm:

wget https://repo.radeon.com/amdgpu-install/6.4.3/ubuntu/noble/amdgpu-install_6.4.60403-1_all.deb
sudo apt install ./amdgpu-install_6.4.60403-1_all.deb
sudo apt update
sudo apt install python3-setuptools python3-wheel
sudo usermod -a -G render,video $LOGNAME # Add the current user to the render and video groups
sudo apt install rocm

Download LM Studio.

Run LM Studio:

chmod a+x ./LM-Studio-0.3.22-2-x64.AppImage
./LM-Studio-0.3.22-2-x64.AppImage --no-sandbox

Go to developer mode and download ROCm llama.cpp (Linux).

Go to this folder:

cd ~/.lmstudio/extensions/backends/llama.cpp-linux-x86_64-amd-rocm-avx2-1.43.1/
nano backend-manifest.json

Go to GPU section and add “gfx1032” (on line 6):

  "gpu": {
    "make": "AMD",
    "framework": "ROCm",
    "targets": [
      "gfx1030",
      "gfx1032",
      "gfx1100",
      "gfx1101",
      "gfx1102",
      "gfx1151",
      "gfx1200",
      "gfx1201"
    ]
  },

Close the LM Studio.

Reopen with this command:

HSA_OVERRIDE_GFX_VERSION="10.3.0"\
HIP_VISIBLE_DEVICES="0"\ #	load the model to GPU
#HIP_VISIBLE_DEVICES="1" << load the model to GPU
#HIP_VISIBLE_DEVICES="2" << load the model to CPU
./LM-Studio-0.3.22-2-x64.AppImage --no-sandbox

REFERENCES:


Comments

Leave a Reply

Your email address will not be published. Required fields are marked *