alpaca-lora icon indicating copy to clipboard operation
alpaca-lora copied to clipboard

AMD GPU

Open MidnightKittenCat opened this issue 1 year ago • 8 comments

Will amd gpu's be supported?

MidnightKittenCat avatar Apr 01 '23 15:04 MidnightKittenCat

Will amd gpu's be supported?

Pretty sure this issue has to get solved first in the bitsandbytes library before this will work on an AMD GPU, but I could be wrong.

gururise avatar Apr 03 '23 04:04 gururise

Will amd gpu's be supported?

Pretty sure this issue has to get solved first in the bitsandbytes library before this will work on an AMD GPU, but I could be wrong.

I see, I've been having issues trying to get ROcM installed on Ubuntu, been following tutorials all day.

Would you be able to guide me through it and which version to use? (Using ubuntu from the ms store) thanks! (off topic)

MidnightKittenCat avatar Apr 03 '23 04:04 MidnightKittenCat

ROCM has come a long way and pytorch has good support for it.

Really, the easiest way to use it is to install one of the docker containers: https://hub.docker.com/r/rocm/pytorch

You can follow this video (starting at step 2) and keeping in mind an older version of the docker container was being used: https://youtu.be/d_CgaHyA_n4?t=151

There is also a version of bitsandbytes for rocm that works (i've tried it): https://github.com/broncotc/bitsandbytes-rocm

If you can get that installed and running, you might be able to train a model on an AMD card without having to wait for official AMD support in the bitsandbytes library.

gururise avatar Apr 03 '23 04:04 gururise

ROCM has come a long way and pytorch has good support for it.

Really, the easiest way to use it is to install one of the docker containers: https://hub.docker.com/r/rocm/pytorch

You can follow this video (starting at step 2) and keeping in mind an older version of the docker container was being used: https://youtu.be/d_CgaHyA_n4?t=151

There is also a version of bitsandbytes for rocm that works (i've tried it): https://github.com/broncotc/bitsandbytes-rocm

If you can get that installed and running, you might be able to train a model on an AMD card without having to wait for official AMD support in the bitsandbytes library.

Which docker image would I use for a radeon rx 6700xt?

MidnightKittenCat avatar Apr 03 '23 08:04 MidnightKittenCat

Which docker image would I use for a radeon rx 6700xt?

Grab the latest pytorch one here: https://hub.docker.com/r/rocm/pytorch

I had good success with: rocm5.4.1_ubuntu20.04_py3.7_pytorch_1.12.1

Also, it looks like the BitsAndBytes lib has been patched to fully work on rocm here: https://github.com/Titaniumtown/bitsandbytes-rocm/tree/patch-2

So use the patched repo to install bitsandbytes for rocm.

Let me know if you get this working on your AMD card..

gururise avatar Apr 06 '23 16:04 gururise

One more tip, you since you are on a 6700xt, you'll probably have to set this ENV variable to fake your GPU: HSA_OVERRIDE_GFX_VERSION=10.3.0

gururise avatar Apr 06 '23 19:04 gururise

There is a video guide that includes bitsandbytes installation for AMD ROCm bitsandbytes

ttio2tech avatar Apr 07 '23 23:04 ttio2tech

https://github.com/TimDettmers/bitsandbytes/issues/107#issuecomment-1824892416

sfxworks avatar Nov 28 '23 06:11 sfxworks