Install and run LLM's Locally with text generation webui on AMD gpu's!

preview_player
Показать описание
Let's setup and run large language models similar to ChatGPT locally on our AMD gpu's!

### Installing ROCm
sudo apt update
sudo apt install git python3-pip python3-venv python3-dev libstdc++-12-dev

sudo apt update

sudo amdgpu-install --usecase=graphics,rocm

sudo usermod -aG video $USER
sudo usermod -aG render $USER

sudo reboot

### Installing Text Generation Webui

mkdir ~/gpt
cd gpt/
cd text-generation-webui

# Setup virtual env
python3 -m venv venv
source venv/bin/activate

# Install correct torch ROCm5.6

# Install the rest of dependencies

# Installing with no avx support

# Create launch script

# Inside launch script paste:
#!/bin/bash

source venv/bin/activate

export HIP_VISIBLE_DEVICES=0
export HSA_OVERRIDE_GFX_VERSION=11.0.0

### save and exit your launch script

# Make script executable

# Now you can launch webui with your script

Model from the video:
TheBloke/Wizard-Vicuna-7B-Uncensored-GPTQ

Some settings to check if models are not loading:
Disable exllama
float 32
fp4

Transformers works most of the time, not always performant though.

Generally load_in_8bit and load_in_4bit will not work -- it uses bitsandbytes which has bad ROCm support.
Рекомендации по теме
Комментарии
Автор

Well, now I got another project for my 7900xtx in Linux. Thanks for the video!

humansvd
Автор

Great video!! I hope more videos about AI development on AMD GPUs keep coming 🤞👍

fernandoguerrero
Автор

Thanks, I didn't even know we had options for LLMs - very cool, though it sounds like it was a PITA to get working - nice work

Lumpsack
Автор

Just found your channel. Excellent content - another sub for you sir!

andre-le-bone-aparte
Автор

Thank you. I subscribed. Hope to see more from you. Very good tutorial.

mikejov
Автор

GPT4ALL and Alpaca are two other locally running chat clients...

I prefer GPT4ALL since it automatically uses my Radeon RX7600XT (16GB)... Alpaca can be made to use the GPU too but I have no idea how though...

thiesenf
Автор

when itype in sudo amdgpu-install --usecase=graphics, rocm
i get
E: Unable to correct problems, you have held broken packages.

music_media
Автор

plural of LLM is LLMs, GPU - GPUs. LLM's is possessive.

localadm
Автор

At 2:35 my machine has to install a lot of packages for 18, 8 GB addition disk space. Is this normal? Thank you!

tungnguyennhat
Автор

Hi, have you tried LM Studio with AMD GPU? What do you think about the performance of AMD GPU on LLM?

kevinnguyen
Автор

I was planning to buy such a vcard for my Linux PC but somehow is my M1 Max more capable when it comes to LLMs

EdwardFlores
Автор

i got this error
UserWarning: You are calling .generate() with the `input_ids` being on a device type different than your model's device. `input_ids` is on cuda, whereas the model is on cpu. You may experience unexpected behaviors or slower generation. Please make sure that you have put `input_ids` to the correct device by calling for example input_ids = input_ids.to('cpu') before running `.generate()`

RuntimeError: Expected all tensors to be on the same device, but found at least two devices, cpu and cuda:0! (when checking argument for argument index in method wrapper_CUDA__index_select)

i figure it something to do with the model couse it said the model on cpu or something in the warning, hope you can help me to fix it, thanks

andregamaliel
Автор

FE engineer, very cool. I did the same on my amd Radeon machine, the display becomes white and starts to flicker. I badly want to get this working, any suggestions.

jeje
Автор

Have you seen Stability AI released it yesterday.

pnaluigi
Автор

Hey, can I use my 6600 xt for this, since it doesnt support hipsdk

yakupsunduk
Автор

does ROCm utilizes 2+ GPU ?
any idea?

mohit
Автор

For some eason it wont recognize my RX 7900 XTX gpu

torch.cuda.is_available() and is_xpu_available()
returned False. This means that no GPU has been
detected. Falling back to CPU mode.
How can i fix this?

mostafaamir
Автор

will ROCm work with the amd rx 6000 series?

rinoscremin
Автор

Sorry, can i run it on virualbox or same soft?

hhssw_
Автор

hey great channel I have the 6650 and I run into problem when sudo apt install got any suggestions

brandonkelly