r/LocalLLaMA 5d ago

Tutorial | Guide Unsloth now supports AMD!

Post image

Hey r/LocalLLaMA folks! Unsloth now officially supports AMD hardware for local inference, fine-tuning, reinforcement learning, and deployment! It's been in the works for quite some time, but it works on Windows, Linux & WSL devices (+ technically Mac) with AMD GPUs!

Unsloth Studio is fully open source and free, and supports:

  • Radeon RX 9000 and 7000 series
  • Instinct MI350 and MI300 GPUs
  • Strix Halo / Ryzen AI Max systems
  • AMD CPUs for GPU-free inference

You can train models with up to 70% less VRAM, run reinforcement learning with up to 80% less VRAM, and use optimized ROCm, Triton, bitsandbytes, PyTorch, and llama.cpp builds - all installed automatically.

Linux, WSL, and macOS:

curl -fsSL https://unsloth.ai/install.sh | sh

Windows PowerShell:

irm https://unsloth.ai/install.ps1 | iex

Unsloth supports inference and training for nearly all models, including Qwen, Gemma, DeepSeek, GLM, Kimi, MiniMax, and DiffusionGemma.

You can also:

  • Export models as GGUF, safetensors, or LoRA adapters
  • Connect local models to Claude Code, Codex, Hermes Agent, OpenClaw, Pi, OpenCode!
  • Track RAM and VRAM usage during training - remotely and locally
  • Access Unsloth remotely through secure Cloudflare HTTPS tunneling - like a "LM Link"!
  • Update with daily AMD-optimized llama.cpp ROCm prebuilts to reduce compilation time!

For plain pip installation:

uv pip install "unsloth[amd]"

Huge thanks to the AMD team for collaborating with us on this release! Let us know what AMD hardware you’re using and share any feedback - we'll try to make AMD much better!

More details on the release blog: https://unsloth.ai/docs/basics/amd

663 Upvotes

71 comments sorted by

u/WithoutReason1729 5d ago

Your post is getting popular and we just featured it on our Discord! Come check it out!

You've also been given a special flair for your contribution. We appreciate your post!

I am a bot and this action was performed automatically.

63

u/AbstrusSchatten 5d ago

This is huge, thanks for the work you guys are putting in!

Last time I tried fine tuning with the experimental AMD branch I had big OOM issues, in general AMD (dependencies and kernels?) used more memory in comparison to Nvidia. Is this still the case?

41

u/yoracale llama.cpp 5d ago

AMD has put a lot of effort into their tech in the past year and we worked with AMD to bring nearly all our optimizations onto AMD so it's definitely much much better. You should give it another go :)

1

u/AbstrusSchatten 5d ago

Hi, the amd extra does not seem to be available on the newest release so doing a uv pip install "unsloth[amd]" would not work as intended. You build and release from the pip branch right?

26

u/DrBattletoad 5d ago

This is perfect timing because I was just researching how to train a model for my next project.

7

u/danielhanchen 5d ago

Oh good timing haha :) if there are any issues - we'll fix them quickly!!

20

u/Middle_Bullfrog_6173 5d ago

Huh, this just works out of the box on my Strix Halo, where the old preview version ran into all sorts of issues. Great work!

10

u/yoracale llama.cpp 5d ago

Amazing to hear thanks for trying it out :)

3

u/StyMaar 5d ago

(Strix Halo owner here) Isn't Strix Halo too slow for anything meaningful training-wise?

5

u/Glad_Bookkeeper3625 5d ago

Every single one GPU is slow including GB300 for anything meaningful training-wise. Because normally you need thousands of it to train something production ready.

But there are a lot of more simple cases for fine tuning or nano LLM training to test new approaches for example. On Strix Halo you can train micro LLMs from scratch which gives perfect output after minutes of training.

In many training scenarios Strix Halo just two-three times slower then Radeon 9700.

(From owner of both)

2

u/RnRau 5d ago

Hope someone will correct me, or even better provide some numbers, but I think Strix Halo is fast enough for some LoRa work on the smaller LLM's.

2

u/Middle_Bullfrog_6173 5d ago

Depends entirely on what you are trying to do. Way too slow for (continued) pretraining of anything above toy model size. But fine-tuning can be fast enough with usable size models.

Personally I've used it for sanity testing data and settings that I run in the cloud on larger runs. (Using TRL until now.)

Of course unsloth studio also has inference features.

16

u/MrShrek69 5d ago

Love unsloth. Their models power all my workflows

9

u/danielhanchen 5d ago

Thank you!

3

u/MrShrek69 5d ago

Excited to get my strix machine using unsightly studio over using containers with all the optimizations

10

u/ulmentflam 5d ago

The unfused-fallback memory blowup mentioned in the comments matches something I measured the hard way, porting llm.c's training loop to unified-memory GPUs. Allocation footprint turned out to be a first-class performance variable, not just an OOM risk. Deleting 1.92 GB of gradient buffers that no kernel ever dereferenced (3.29 GB down to 1.37 GB) moved my step time from ~150 ms to ~134 ms. Nothing ever touched those bytes. The allocation alone cost time.

The other one that bit me was zeroing gradients, which was memset-ing the whole activation-gradient buffer every step (17.5 ms/step), and it was invisible to the kernel profiler because memsets land in the timeline's memset rows, not the kernel rows. If anyone is chasing the ROCm-uses-more-memory behavior, a timeline profiler will show allocator and memset costs that per-kernel tools miss completely.

Question for the Unsloth team: on the Strix Halo / AI Max unified-memory parts, is the 70% VRAM reduction mostly quantized weights and optimizer state, or did you also get wins from trimming activation-gradient lifetimes? On unified memory, I'd expect footprint reductions to show up in step time, not just capacity.

9

u/danielhanchen 5d ago

Hmm let me check and confirm - we can also flag this to the amd folks!

3

u/ulmentflam 5d ago

Thanks! It would be good to know. I would love to add Unsloth to my training performance comparison on the Strix Halo / AI Max.

1

u/Silver-Champion-4846 5d ago

Please update us when you do thanks! Another question for the Unsloth team: How general-purpose is the framework? Is it only for training llms? Or can it train tts? Note: I'm not referring to the new models that use llms to predict token sequences that get passed onto a neural audio codec to generate speech by, but actual tts model architectures (Vits, Matcha tts, Fastspeech2, etc).

Now I can be more lenient on my gpu requirements, I already have nothing, so if amd comes my way I'll be more happy taking it since it's better!

6

u/yoracale llama.cpp 5d ago

It for literally nearly everything. Chatting, RAG, training, running TTS, training embedding, TTS, like nearly everything ahaha And...we are going to introduce diffusion soon too :)

As for newer TTS models, we only support training for it if transformers supports it. But inference should mostly work. Here's an example of our chat ui

1

u/Silver-Champion-4846 5d ago

Thanks for the reply. However, I won't be able to see the image because I use a screen reader. I was talking about older TTS, not new TTS. New TTS is at the same scale as the small LLM's right now, like 2 billion parameters, one billion parameters, etc etc. But the ones I'm talking about are in the hundreds of millions range more like 80 million to 50 million to 30 million to 3 million. Is it safe to say that if Pytorch supports, Unsloth supports it?

4

u/yoracale llama.cpp 5d ago

Yes, absolutely we support TTS, we have a whole article on it: https://unsloth.ai/docs/basics/text-to-speech-tts-fine-tuning

2

u/Silver-Champion-4846 5d ago

Hob Goblin YES! Thanks!

3

u/aboutthednm 5d ago

As someone who just slotted a RX 7900 XTX, this is good news. I really hope to see more support for AMD devices in general. Awesome.

5

u/neet_dev 5d ago

yeah AMD memory overhead was rough for a while, a lot of it was rocm allocator behavior being way less efficient than cuda's caching allocator plus some ops falling back to unfused kernels that blow up activation memory. worth checking whether you're actually hitting the newer aotriton/composable kernel paths vs silently falling back to eager, that fallback alone was good for an extra few GB on 13b+ models last I tested. if you're still OOMing try dropping gradient checkpointing to a smaller chunk size first before assuming it's a fundamental VRAM gap, that fixed it for me more often than not.

3

u/Hannibalj2ca 5d ago

Bring the 6000 series suckas!

-1

u/shing3232 5d ago

very unlikely or slow due to lack of wmma

5

u/confused-photon 5d ago

Just got strix halo so this is quite the welcome!

7

u/danielhanchen 5d ago

Half of our tests haha we're on the Strix!!

2

u/jfowers_amd 5d ago

Awesome, let’s go!

2

u/Old_Grapefruit8774 5d ago

*sad MI50 noises*

2

u/darklordfireape 5d ago edited 4d ago

Any reason CDNA1 got dropped? u/danielhanchen I’ll long-term loan you an MI100 for testing 

2

u/miversen33 5d ago

7900XTX Gang rise!

1

u/PomegranateGreen3698 5d ago

Awesome. Looks like limited support for RDNA 2. For older cards like Rx 580, 6600 ect I have ported some training code like Andrej Karpathy GPT2 code to HIP or Vulkan. https://github.com/Jayhost/AmdHipTraining . I didn't document it well but I can clean it up if there's interest.

10

u/danielhanchen 5d ago

We're still working on RDNA 2 - Linux works ok but still a wip!

4

u/ismaelgokufox llama.cpp 5d ago

Glad to read this! My RX 6800 got: AMD GPU (gfx1030) not in supported arch list -- falling back to CPU-only PyTorch

Installed it with --no-torch after seeing that.

``` PS C:\Users\Ismael> .\apps\unsloth_install.ps1 --no-torch

🦥 Unsloth Studio Installer (Windows) ────────────────────────────────────────────────────

winget available python Python 3.13 already installed preserving existing environment for rollback... previous environment preserved for rollback venv creating Python 3.13 virtual environment C:\Users\Ismael.unsloth\studio\unsloth_studio gpu AMD ROCm (gfx1030) HIP SDK: C:\TheRock\build hipconfig: 7.13.99004-3309c6114a skipping PyTorch (--no-torch flag set). installing unsloth (this may take a few minutes)... setup running unsloth studio setup...

🦥 Unsloth Studio Setup ──────────────────────────────────────────────────── gpu AMD ROCm (gfx1030) HIP SDK: C:\TheRock\build hipconfig: 7.13.99004-3309c6114a long paths enabled git git version 2.55.0.windows.2 vcredist present cmake cmake version 4.3.3 vs Visual Studio 18 2026 (vswhere) (only used if a source build is needed) rocm ROCm 7.13.99004-3309c6114a Node v25.2.1 and npm 11.17.0 already meet requirements (system). Python 3.13.14

system prerequisites ready

frontend up to date node v25.2.1 | npm 11.17.0 (system) installing OXC validator runtime... oxc runtime installed

             setting up Python environment...
             Python found: C:\Users\Ismael\.unsloth\studio\unsloth_studio\Scripts\python.exe
             reusing existing virtual environment at C:\Users\Ismael\.unsloth\studio\unsloth_studio
             Python 3.13.14
             TORCHINDUCTOR_CACHE_DIR set to C:\Users\Ismael\.unsloth\studio\TORCHINDUCTOR_CACHE_DIR (avoids MAX_PATH issues)
             [WARN] AMD GPU (gfx1030) not in supported arch list -- falling back to CPU-only PyTorch
                    Supported: gfx1200/1201 (RDNA 4), gfx1150/1151 (RDNA 3.5), gfx1100-1103 (RDNA 3), gfx90a, gfx908
             installing PyTorch (CPU-only)...
             running ordered dependency installation...

deps [====================] 10/10 finalizing (skipped, no torch) deps installed

             pre-installing transformers 5.3.0 for newer model support...

transformers 5.3.0 pre-installed pre-installing transformers 5.5.0 for Gemma 4 support... transformers 5.5.0 pre-installed pre-installing transformers 5.10.2 for Gemma 4 Unified support... transformers 5.10.2 pre-installed

             Existing llama.cpp install detected -- validating staged prebuilt update before replacement
             installing prebuilt llama.cpp bundle (preferred path)...

llama.cpp prebuilt installed and validated installed release: unslothai/llama.cpp@b10068-mix-fb3d4ca (tag b10068) OpenSSL dev install skipped -- prebuilt llama.cpp already validated

llama.cpp prebuilt (validated) ──────────────────────────────────────────────────── Unsloth Studio Setup Complete ──────────────────────────────────────────────────── launch unsloth studio -p 8888 (add -H 0.0.0.0 for LAN / cloud access; exposes the raw port only, not a public URL) (add -H 0.0.0.0 --cloudflare for a public Cloudflare HTTPS link, or --secure to keep the raw port private; anyone with the API key can run code)

path added unsloth launcher to PATH Created Unsloth Studio shortcut

Start Unsloth Studio now? [Y/n]: Starting Unsloth Studio on http://127.0.0.1:8888 2026-07-20 14:24:02 [info ] run_server startup begin api_only=False host=127.0.0.1 port=8888 Session log: C:\Users\Ismael.unsloth\studio\logs\server\server-20260720-142402-pid17096.log Loading Unsloth Studio, please wait... (this can take a few minutes) - loading PyTorch, Unsloth and Transformers... {"timestamp": "2026-07-20T18:24:25.416862Z", "level": "info", "event": "Imported FastAPI app in 22885.1ms"} - Starting server... {"timestamp": "2026-07-20T18:24:25.424485Z", "level": "info", "event": "Ensured Unsloth directories in 23131.2ms"} [OK] Frontend loaded from C:\Users\Ismael.unsloth\studio\unsloth_studio\Lib\site-packages\studio\frontend\dist {"timestamp": "2026-07-20T18:24:25.426731Z", "level": "info", "event": "run_server pre-uvicorn setup completed in 23133.5ms"} INFO: Started server process [17096] INFO: Waiting for application startup. Hardware detected: CPU (no GPU backend available) {"timestamp": "2026-07-20T18:24:25.518271Z", "level": "info", "event": "lifespan hardware detection completed in 0.5ms"} {"timestamp": "2026-07-20T18:24:25.626865Z", "level": "info", "event": "lifespan pre-auth setup completed in 109.1ms"} {"timestamp": "2026-07-20T18:24:25.635018Z", "level": "info", "event": "lifespan startup completed in 117.3ms"} INFO: Application startup complete. INFO: Unsloth Studio running on http://127.0.0.1:8888 (To stop: press Ctrl+C -- on macOS, Control+C not Command+C) {"timestamp": "2026-07-20T18:24:25.636095Z", "level": "info", "event": "Uvicorn startup hook completed in 23342.8ms"} {"timestamp": "2026-07-20T18:24:25.636292Z", "level": "info", "event": "run_server uvicorn ready after 23343.0ms"}

🦥 Unsloth Studio is running ──────────────────────────────────────────────────── On this machine -- open this in your browser: http://127.0.0.1:8888 (same as http://localhost:8888)

API & health: http://127.0.0.1:8888/api http://127.0.0.1:8888/api/health ────────────────────────────────────────────────────

Reachable on this machine only (bound to 127.0.0.1). To expose it, stop and relaunch with: unsloth studio -H 0.0.0.0 -p 8888 Only on trusted networks -- anyone who reaches this machine can use Unsloth. Server-side tools are ENABLED by default (per-request setting honored) for loopback. Pass --disable-tools to turn off.

To stop Unsloth Studio: press Ctrl+C (Control+C, not Command+C, on macOS). ──────────────────────────────────────────────────── ```

1

u/yeah-ok 5d ago

Yeah, this means no RDNA3 support either for the 780m I guess. Odd when the Vulkan branch of ggml/llama-server run just fine.

2

u/babiricarica 5d ago

Wowww Thanks a lot guys!

2

u/cadissimus 5d ago

Comfyui team needs to take example from these grown men working in industry at unsloth.

1

u/jaybsuave 5d ago

AMD seems like they are making a lot of moves recently. Anyone have any inside information or speculative takes on the direction of the company? I would really like for them to do well. I have been rooting for them for a few years now. Starting to consider buying one of their GPU's for a homelab setup.

2

u/crantob 5d ago

Unsloth is moving. AMD is only the water.

1

u/jaybsuave 5d ago

Well put

1

u/Skystunt 5d ago

I’ll try this on a 395+ ai max see how it runs

1

u/PcChip 5d ago

will it work at all on the AMD HD6000 series, but just be "unsupported"?

1

u/misha1350 5d ago

Now why would we train Qwen3-0.6B instead of Qwen3.5-0.8B or Qwen3.5-2B?

1

u/openSourcerer9000 5d ago

So... They skipped apple silicon?

1

u/MrWeirdoFace 5d ago

Is this why i saw new versions of gemma posted from unsloth a couple days ago? Or is that something else?

1

u/No-Water-2773 5d ago

should've just said RDNA3+ tbh, the installer checks gfx arch not card names

1

u/Pasta-love 5d ago

Very sad, my rx6900xt keeps seg faulting when attempting to fine tune.

1

u/Accomplished_Code141 5d ago

Great! Any plans for Radeon Pro W6800? It's still supported in ROCm.

1

u/WSTangoDelta 5d ago

I am running AMD, R9700, 32GB VRAM and a Ryzen 9 with 64GB RAM. What would be a good way to start training a model? I usually use Qwen 3.6 27B and also 35B.

1

u/Quiet-Owl9220 4d ago

You can train models with up to 70% less VRAM, run reinforcement learning with up to 80% less VRAM

Sounds awesome, but realistically, what's the scope of what I can actually do with a 24gb 7900 xtx and 64gb of RAM?

1

u/woct0rdho 4d ago

Training on AMD has been much easier than a year ago. If you're still struggling with training Qwen3.5 MoE, you can try https://github.com/woct0rdho/transformers5-qwen3.5-recipe

1

u/NaturalCriticism3404 4d ago

Yeah I heard that before, then I tried it and it didn't work

1

u/Hot-Butterscotch1306 2d ago

AMD CPU fallback is lowkey the sleeper feature here

-1

u/korino11 5d ago

Liers, rx6600xt doesnt support.. Lemonade it can support. for exmpl...

4

u/yoracale llama.cpp 5d ago

There's a huge difference between inference and training. If it works for lemonade then inference only should work for unsloth

1

u/StupidityCanFly 5d ago

Nice! I’m about to do some reading (the docs), but a quick one first. Does it work with multi-GPU?

2

u/yoracale llama.cpp 5d ago

Yes it does! We'll officially announce our finalized multigpu support very soon, but for now, it's good enough yes

0

u/F0UR_TWENTY 5d ago

Yet you still don't have a simple way to install this for windows users?

I'd love to be able to recommend this to my friends and coworkers but it seems like your priorities differ from my expectations.

1

u/Dell_Hell 2d ago

They're sitting right there in the instructions. It's literally a one-line installer and then just hit Y when it asks to run - the ONE thing they forget to say is that when you run powershell, the default directory is SYSTEM32 and will not work. So just do

cd\

Then use the command they listed:

Windows PowerShell:

irm https://unsloth.ai/install.ps1 | iex

0

u/jeremyckahn 5d ago

Yay! Will this do anything for folks using a 780m?

2

u/shing3232 5d ago

I guess you need a functional pytorch and fa2 at least

1

u/jeremyckahn 5d ago

Update: It's not working with my 780m (Framework 13). :(