For the complete documentation index, see llms.txt. This page is also available as Markdown.

Train & run models on AMD GPUs with Unsloth

Unsloth now officially supports AMD hardware, making it easy to run, train, fine-tune, RL, and deploy models locally on AMD GPUs. Fully open source, Unsloth Studio works across Windows, WSL, and Linux, with support for AMD's Radeon RX 9000, 7000 series, Instinct MI350 and MI300 data center GPUs, Vulkan, Strix Halo powered Ryzen AI Max systems, and more.

We collaborated with AMD and our community to enable up to 2x faster and 70% less VRAM training for all models with no accuracy loss. If you don't have a GPU, Unsloth still supports native AMD inference for Qwen3.6, Gemma 4, DeepSeek-V4, GLM 5.2, DiffusionGemma, Kimi K2.7 and other models.

QuickstartFeaturesGithub

To install Unsloth Studio on AMD, run:

MacOS, Linux, WSL:

Windows Powershell:

irm https://unsloth.ai/install.ps1 | iex 
Example of 1-bit GLM-5.2 running with Unsloth

⭐ Features

Unsloth supports both inference and training for AMD, so if you don't have a GPU and only CPU, you can still run models with Unsloth. When using Unsloth, you get:

  • Tool call healing for inference to increase accuracy by 50%, unlimited free web search, HTML canvases, secure HTTPS deployment via Cloudflare and Code Execution all work.

  • Train Gemma 4 models in 8GB VRAM or Qwen3.5 in 3GB VRAM. Triton kernels, math algorithms and memory tricks allow 70% less VRAM use for AMD with no accuracy loss.

  • Up to 80% less VRAM usage for reinforcement learning such as GRPO. And weight sharing with vLLM to save 50% memory usage.

  • Optimized support for RDNA 3 and newer GPUs & data-center grade GPUs. Strix Halo is also optimized for Linux, WSL and Windows.

DiffusionGemma running on AMD GPUs

⚡Quickstart

Unsloth auto installs the best ROCm builds for PyTorch, llama.cpp prebuilts, bitsandbytes, ROCm optimized kernels & Triton. We also ship our AMD optimizations and fixes together. You can read our more detailed guide here for more details.

We made Unsloth installations seamless for Windows and WSL folks - but we generally recommend using Linux directly since it'll have the broadest support. Unsloth supports MacOS, Linux, Windows, NVIDIA, Intel and CPU setups. See: Unsloth Requirements. Updating are the same commands!

MacOS, Linux, WSL:

Windows PowerShell:

Unsloth will auto install ROCm, PyTorch, custom llama.cpp prebuilts and more!

Accessing Unsloth remotely

We also enabled Cloudflare HTTPS tunneling for free - so you can access Unsloth securely via HTTPS remotely.

Installing Unsloth on AMD Windows machines

📥 Install Unsloth Notebooks & pip install

If you want plain Unsloth notebooks, see the general AMD install guide. Be sure to readAMD install guide! After you follow it for installing PyTorch and ROCm, then do:

⏯️Unsloth Start

Unsloth Start lets you connect Claude Code, Codex and other agents to local models via the unsloth start command.

Start Unsloth, open your project folder, and run:

Replace claude with any agent below:

Claude Code running with Qwen3.5 locally.
Agent
Command

Claude Code

unsloth start claude

OpenAI Codex

unsloth start codex

Hermes Agent

unsloth start hermes

OpenClaw

unsloth start openclaw

OpenCode

unsloth start opencode

Claude instances are all isolated
Codex running unsloth/gemma-4-E2B-it dynamic 4bit

📊 AMD Analysis

We brought many of our optimizations we made for non AMD GPUs over to make AMD GPUs shine! Getting AMD training to work on Windows devices and ensuring compatbility across nearly every AMD device was a lot of work but we're happy in the current state. We are still actively working on making AMD GPUs even better! Below are some analysis/benchmarks we conducted on a AMD MI300X.

Reinforcement learning: more accurate LoRA and QLoRA

During RL on AMD, Unsloth supports weight sharing with vLLM as introduced in Memory Efficient RL. We halve memory usage by directly accessing vLLM's allocation of the model.

During LoRA and QLoRA, we also do not do merging and demerging of the LoRA weights like below:

W=W+sABinference=XWW=WsABW = W + sAB \\ \text{inference} = XW \\ W = W - sAB

The above causes issues as IEEE floats are not associative due to rounding. When W is in BF16, this causes subtle differences when subtracting as done in other RL engines. This means in IEEE land:

W(W+sAB)(sAB)W \ne(W + sAB) - (sAB)

And when W is in bfloat16 with few mantissa bits, it rounds small numbers to zero. Since A and B are float32 during LoRA, this means W can drift over time after merging & demerging. Unsloth uses vLLM's LoRA path directly, so we avoid this. The base weights are never edited and will never drift.

Faster Reinforcement Learning

We benchmarked other setups with FA2 and vLLM co-located. Both use vLLM for generation, Unsloth pushes more of the step into generation while making training and roughly 2x faster.

All three benchmarks are reproducible: same seeds, same token budgets, and the loss curves match between the two stacks.

Faster & more memory efficient training

On Llama-3.1-8B LoRA SFT (batch 2 x grad-accum 4 x 2048 = 16,384 tokens/step, packed), Unsloth trains at 2.07 s/step vs 2.87 s/step for TRL + FA2, and peaks at 18.3 GB versus 24.3 GB. That is 1.39x faster and 1.33x less memory usage, with no change in accuracy. We plan to make this even better!

The memory savings are not just a lower peak, they hold for the whole run. Sampling allocated VRAM every 0.1s, Unsloth stays flat and low the entire time, while other setups + FA2 spikes toward 22.8 GB on nearly every step and takes longer to finish (75s vs 56s for the same 25 steps).

Supported AMD Hardware

Unsloth’s AMD support focuses on popular consumer, workstation, and datacenter GPUs. Training, Unsloth Studio, and GGUF/llama.cpp inference support can vary by architecture, so the table below separates optimized support from compatibility paths.

Architecture
Series
gfx
Support
Platform

RDNA 4

Radeon™ RX 9000 Series

gfx1200, gfx1201

Full

Windows + WSL + Linux

RDNA 3.5

Ryzen AI 300 / Ryzen AI MAX (Strix Halo)

gfx1150, gfx1151, gfx1152

Full

Windows + WSL + Linux

RDNA 3

Radeon™ RX 7000 Series

gfx1100, gfx1101, gfx1102

Full

Windows + WSL + Linux

RDNA 2

Radeon™ RX 6000 Series

gfx1030 only

Nearly

Windows + WSL + Linux

CDNA 4

Instinct™ MI350 Series GPUs

gfx950

Full

Linux only

CDNA 3

Instinct™ MI300 Series GPUs

gfx940, gfx941, gfx942

Full

Linux only

CDNA 2

Instinct™ MI200 Series GPUs

gfx90a

Full

Linux only

We are actively working on supporting more AMD GPUs, however older ones unfortunately do not have the required hardware support for us to work on.

🖥️ Guide to using Unsloth on AMD

After installation, you can open Unsloth Studio in your browser. From there, you can run and fine-tune local LLMs on AMD hardware automatically. See below for detailed install instructions:

AMD Install GuideInstall Unsloth Studio

Select your model, dataset, and training settings to begin. For example, you can run QLoRA 4-bit fine-tuning on Gemma 4 12B with a context length of ~16k, LoRA rank 16, learning rate 0.0002, and 30 max steps.

Unsloth Studio’s fine-tuning screen is fully customizable, letting you configure your model, dataset, and training parameters. During training, Unsloth tracks progress in real time, including loss, RAM and VRAM usage, as well as support for multi-gpu. Once training starts you will see the progress plotted in real time.

After training, you can visit your history to see past and active training sessions. Select from any of your fine-tuned models to view past training logs:

When training is complete, export your model as GGUF, merged model safetensors, or a LoRA Adapter for deployment with Hugging Face, llama.cpp, vLLM, or Unsloth. For GGUF exports, Unsloth uses AMD-aware llama.cpp ROCm prebuilts matched to your gfx architecture, with source compilation as a fallback when no prebuilt is available. Once export completes, you will see Export finished successfully. You can also push your model directly to the Hugging Face Hub.

Export your model to your preferred format and deploy it anywhere. After exporting, load your fine-tuned model from the Fine-tuned section of the model dropdown in New Chat or Recents.

Select your fine-tuned model from the dropdown and chat with it directly in Unsloth. You can now use your trained or downloaded models in New Chat, Recents, or Projects. Enable think, code, and search toggles for the best experience, and see the Unsloth Studio Chat docs for more details.

And finally, you can chat with your newly fine-tuned model directly in Unsloth!

You can also monitor throughput and generation tokens / s within the terminal just like vLLM logging. You will see "gen_tok_s" which is the tokens / s and "prompt_tok_s" which is prompt processing.

📱Unsloth on phones and remote HTTPS tunneling

We added free Cloudflare HTTPS tunnels for Unsloth (similar to LM Link), so you can remotely chat / train models with Unsloth on your phone (iPhone, Android - any phone!) via a link or any other computer! This works on Mac, Linux, WSL and Windows devices.

  • Train & finetune from your phone / remotely with live training loss logs - cancel or retrain!

  • Chat in the browser from anywhere with tool calling and live streaming.

  • Actual interact-able HTML canvas outputs right in your phone - play games made by LLMs!

Chat remotely!
Live inference + tool calling
Remote training logs!
Run live HTML in the phone

To set it up, first in terminal after installing Unsloth, type unsloth studio --secure . Setup a password so no one unauthorized can access the HTTPS link!

Then in the logs - use the green Cloudflare link and enter this on our Phone or any remote device!

And you're in! You can always monitor / cancel the live HTTPS served link by CTRL+C ing the terminal where Unsloth Studio was launched!

Edit inference settings
Edit temp, top_p, ctx length
Canvas auto renders HTML!

How AMD support was built for Unsloth

Unsloth’s custom kernels were ported to AMD in close collaboration with the AMD team. This required changes across the installer, hardware detection, runtime routing, monitoring, and prebuilt asset selection.

  • ROCm kernels: HIP/Triton ports tuned for RDNA and CDNA, with architecture-specific precision, performance, and stability fixes. (#2520)

  • 4-bit training: bitsandbytes-based QLoRA support for Radeon and CDNA GPUs. (#3748)

  • Automatic setup: robust AMD GPU detection and installation of the correct ROCm PyTorch wheel, including repair and platform safeguards. (#4770)

  • Windows and Strix Halo: native Windows ROCm installation, runtime compatibility patches, unified-memory reporting, and WSL support. (#5301, #6227)

  • ROCm inference: architecture-specific llama.cpp prebuilts, source-build fallback, AMD VRAM detection, and monitoring. (#5172)

🕐 Future work

Thanks so much to the AMD team for collaborating with us on making AMD work well! Upcoming priorities include:

  • Continued development and engagement with the AMD team.

  • Expanded hardware-backend CI/CD using AMD Strix Halo and Radeon Lab hardware.

  • Support for new AMD GPU cards and architectures as they launch.

  • Clearer multi-GPU guidance: AMD distributed training is currently Linux-only. On Linux, ROCm uses RCCL, so distributed training works. On Windows, AMD ROCm does not yet provide a GPU-collective backend, with GLOO/CPU-only support as of TheRock #5694, use Linux if you plan to do AMD multi-GPU training.

  • Further speed optimizations with respect to the ROCm stack.

💌 Thanks to AMD for collaborating!

Thanks so much to the AMD team and our amazing Unsloth community for collaborating with us on this release. We thank Strahinja Stamenkovic, Filip Jankovic, Iswarya Alex, Yue Yuan Bill He, Eda Zhou, Mahdi Ghodsi, Guruprasad and the entire AMD team for collaborating on making AMD support work great with Unsloth! Also huge thanks to community members: Nate, UBER6, AiwendilOfMirk..., Gene, Jimster480, VELICAN, Vintheboy, archmaker, BichonFriseMax, Calandracas, Chigoma333, Edd, electroglyph, jslowbell, mk 27B UD-, Satyam, snapcast3r, TotoMC for testing and debugging with us.

An easy way to use Unsloth on AMD is through AMD Developer Cloud, with one-click notebooks powered by MI300X GPUs with 192GB VRAM. AMD also offers free credits through the AMD AI Developer Program. To run an Unsloth notebook, use any AMD notebook from unslothai/notebooks and swap the GitHub domain with the AMD Developer Cloud URL, since the notebook paths are the same.

Need help or want to share feedback? You can join our Discord, read the AMD docs, open an issue or PR on GitHub, or post on our Reddit r/unsloth.

Last updated

Was this helpful?