页面简介
正文摘录
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 runs on Windows, WSL, and Linux, supporting RDNA 1–4, Radeon RX 9000 and 7000 series GPUs, 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.QuickstartFeaturesGithubSept 18 Update: Added RDNA 1, 2, Gorgon Halo, Vulkan support + fixed not detecting GPUs on AMD GPUs. Better RDNA4, HIP / ROCm failure auto fixing and catching.To install Unsloth on AMD, the easiest way is to download our Desktop app.Download for WindowsDownload for Linux For manual installation:MacOS, Linux, WSL:Windows Powershell:AskCopyirm https://unsloth.ai/install.ps1 | iex ⭐ FeaturesUnsloth 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.Connect your local models to any agent harness: Claude Code, Codex, Hermes, OpenClaw and more.Support inference and training for nearly all models, including the latest DeepSeek-V4, GLM-5.2, Kimi-K2.7, MiniMax M3, DiffusionGemma, Inkling and more!AMD multi-GPU support + VRAM/RAM tracking. llama.cpp ROCm prebuilts are provided daily, so you always get the latest model updates!DiffusionGemma running on AMD GPUs⚡QuickstartUnsloth 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 remotelyWe 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 installIf 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 StartUnsloth 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.AgentCommand Claude Codeunsloth start claude OpenAI Codexunsloth start codex Hermes Agentunsloth start hermes OpenClawunsloth start openclaw OpenCodeunsloth start opencodeClaude instances are all isolatedCodex running unsloth/gemma-4-E2B-it dynamic 4bit📊 AMD AnalysisWe 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 QLoRADuring 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=W−sABW = W + sAB \\ \text{inference} = XW \\ W = W - sABThe 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 LearningWe 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 trainingOn 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 HardwareUnsloth’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.ArchitectureSeriesgfxSupportPlatformRDNA 4Radeon™ RX 9000 Seriesgfx1200, gfx1201FullWindows + WSL + LinuxRDNA 3.5Ryzen AI 300 / Ryzen AI MAX (Strix Halo)gfx1150, gfx1151, gfx1152FullWindows + WSL + LinuxRDNA 3Radeon™ RX 7000 Seriesgfx1100, gfx1101, gfx1102FullWindows + WSL + LinuxRDNA 2Radeon™ RX 6000 Seriesgfx1030, gfx1031, gfx1032, gfx1034FullWindows + WSL + LinuxRDNA 1Radeon™ RX 5000 Seriesgfx1010, gfx1012FullWindows + WSL + LinuxCDNA 4Instinct™ MI350 Series GPUsgfx950FullLinux onlyCDNA 3Instinct™ MI300 Series GPUsgfx940, gfx941, gfx942FullLinux onlyCDNA 2Instinct™ MI200 Series GPUsgfx90aFullLinux onlyCDNA 1Instinct™ MI100 Series GPUsgfx908FullLinux only🖥️ Guide to using Unsloth on AMDAfter 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 StudioSelect 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 tunnelingWe 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 callingRemote training logs!Run live HTML in the phoneTo 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! Y