On my machine I’m running opensuse tumbleweed and has the amdgpu driver installed. I use it for gaming and recently I’ve become interested in running LLMs. So I would like to keep a balance of both without compromising too much on performance.
I know that there are proprietary drivers for AMD cards but I’m hesitant to install it as I’ve heard that it performs less efficiently in games when compared to the open source driver.
I’m mainly confused about this ROCM thing. Is it not included with the opensource amdgpu drivers ? Or is it available as a separate package?
So what driver to use ?
Or perhaps, is it possible to run oogabooga or stable diffusion within a distrobox container (with the proprietary drivers) and still keep using the open source gpu drivers for the Host operating system.
Latest ollama has support for AMD GPUs. I had to compile from source to make it pick up the GPU on my system.
Basically, RoCM and CUDA allows one to do math on the GPU. Most Linear Algebra operations (i.e. LLM or NNs and ML generally) can be parallelized over a GPU which is much more performant than CPU.
To perform calculations on GPU, one needs some sort of interface to to their programming language of choice, NVIDIA has CUDA which is in CPP with bindings to python: (pytorch, Tensorflow etc. ), Julia: Flux etc.
RoCM is AMDs solution, there bindings are young and not widely implemented.
My advice, play around with Flux RoCM and PyTorch RoCM just to get an idea. Suffice it to say, when I started doing RL and LLMs more seriously I gave up my colab and sold my AMDs to fund a 3060.
To do general purpose GPU calculations on AMD hardware you need a GPU that is supported by ROCm (AMD’s equivalent to CUDA). Most of the gaming GPUs are not.
There is a list here but be aware that that is for the latest rocm version, some tools might still use older versions with different supported devices.
llama.cpp (and ollama) has AMD support through ROCm and also now Vulkan.
Local LLMs usually run using CPU only
I want to use software like stable diffusion and oogabooga. Don’t they utilize GPU ?
Ooga Booga is just a webui for local text gen LLMs, that usually only utilise CPU
SD, on the other hand, does utilise GPU. I haven’t tried it but I don’t see why it won’t run with the open source AMD drivers, they are good. Just try it yourself, everything is free and you would only lose some time in the worst case scenario