Skip to content

[Feature] AMD: use the GPU in the Docker image (Strix Halo ran on CPU) #5405

Closed

Description

@pagdot

Unsloth studio ran inference on my CPU instead of strix halo APU using following docker compose file:

services:
  unsloth-studio:
    container_name: unsloth-studio
    ports:
        - 8000:8000
    volumes:
        - ./workspace:/workspace/work
    environment:
        - LEMONADE_LLAMACPP=rocm
    devices:
        - /dev/kfd
        - /dev/dri
    image: unsloth/unsloth:latest

Would prefer to have gpu/apu support as well

Activity

  1. added
    feature request
    on May 13, 2026
  2. rolandtannous commented on May 15, 2026

    @rolandtannous
    Contributor

    @guidryheal-create the official container is not meant for AMD GPU. It was built on Nvidia GPU. Hopefully in the future we will have support for AMD GPUs

  3. h34v3nzc0dex commented on May 26, 2026

    @h34v3nzc0dex
    Contributor

    @pagdot — bare-metal path on Strix Halo lands and works today; the container side is genuinely TBD per @rolandtannous.

    If you want unsloth running on the iGPU now (not waiting for the official AMD container), the ./install.sh --local flow from unslothai/unsloth#5303 produces a working ROCm install on gfx1151. Native install, no docker. Uses ROCm 7.13 nightly wheels (https://rocm.nightlies.amd.com/v2-staging/gfx1151/) and a custom HIP llama.cpp build. On my box (Radeon 8060S / Ryzen AI MAX+ 395 / 128 GiB unified): unsloth/Qwen3.6-35B-A3B-GGUF at Q4_K_M serves ~50 tok/s decode at 8k context through Studio.

    The Strix-Halo-specific gotchas the install script doesn't fully handle yet (kernel 6.14+ minimum, ROCWMMA_FATTN=OFF on gfx1151, the ROCm 7.1.0 libhsa-runtime64.so null-ptr fix via the PyTorch _rocm_sdk_core overlay, --gcc-install-dir for HIP source builds on Ubuntu 24.04) are documented at https://github.com/h34v3nzc0dex/strix-halo-llm-finetune-guide. Not the docker workflow you asked for, but functional for "I want my Strix Halo running unsloth tonight."

    For cross-comparison Vulkan numbers on the same hardware (community-maintained): bench.ciru.ai. Backend choice matters on this silicon — Vulkan wins decode on quantized models by ~22%, ROCm wins decode on BF16 by ~117% (writeup).

  4. Kaihui-AMD commented on Jun 2, 2026

    @Kaihui-AMD

    Hi @pagdot ,
    While the official Docker image doesn't support AMD GPUs yet, AMD has published an official playbook for running Unsloth on AMD hardware: https://developer.amd.com/playbooks/unsloth-llms-finetuning/

    It covers Strix Halo (gfx1150/gfx1151/gfx1152) specifically and walks through the full bare-metal setup including ROCm wheels, pip install "unsloth[amd] @ git+https://github.com/unslothai/unsloth.git", and LoRA fine-tuning end to end. A useful reference until Docker support lands.

  5. h34v3nzc0dex commented on Jun 2, 2026

    @h34v3nzc0dex
    Contributor

    @Kaihui-AMD nice — ran the playbook end-to-end on my Strix Halo box (Ryzen AI MAX+ 395 / Radeon 8060S / gfx1151, Ubuntu 24.04) to kick the tires. The GA repo.amd.com/rocm/whl/gfx1151 torch (2.11.0+rocm7.13.0) drives the iGPU fine — live matmul checks out — and unsloth[amd] installs + imports clean and detects the GPU. Good to finally have an official bare-metal path.

    Two heads-ups for anyone running it on Strix Halo:

    1. bitsandbytes. The playbook's pip install pulls PyPI bitsandbytes 0.49.2, which ships ROCm libs only through rocm72, but the 7.13 runtime computes libbitsandbytes_rocm83.so → RuntimeError: Configured ROCm binary not found at import. A pre-quantized 4-bit load (load_in_4bit=True on an unsloth *-bnb-4bit model) still worked for me — unsloth routes around it — but real QLoRA quantization of an arbitrary model and 8-bit optimizers (paged_adamw_8bit) need bnb's ROCm kernels, so building bitsandbytes from source for gfx1151 is still required for those flows. Might be worth adding to the playbook.

    2. A few other Strix-Halo specifics the playbook doesn't touch that bite in practice: the kernel floor (mainline ≥6.18.4 / Ubuntu HWE 6.17 — older kernels hang at torch.cuda.synchronize()), the llama.cpp HIP build for GGUF export (-DCMAKE_HIP_FLAGS=--gcc-install-dir=/usr/lib/gcc/x86_64-linux-gnu/13 on Ubuntu 24.04, and GGML_HIP_ROCWMMA_FATTN=OFF since rocwmma FA is ~2.4× slower than runtime FA on gfx1151), and the ROCm 7.1.0 libhsa-runtime64.so null-ptr workaround.

    Full hardware-validated writeup of those: https://github.com/h34v3nzc0dex/strix-halo-llm-finetune-guide — happy to PR any of it into the playbook if it's useful.

  6. benjaminsabatini commented on Jul 22, 2026

    @benjaminsabatini

    FYI, Docker installs are necessary for some Linux distributions that are designed for containers. The --local option is alright, but not the intended method, as local users do not normally exist.

  7. changed the title [-][Feature] AMD Support in docker container[/-] [+][Feature] AMD: use the GPU in the Docker image (Strix Halo ran on CPU)[/+] on Sep 25, 2026
  8. danielhanchen commented on Oct 15, 2026

    @danielhanchen
    Member

    Fixed! Sorry on the delay. The AMD Docker image with Unsloth Studio (unsloth/unsloth-rocm) already ran training on the GPU, but it shipped a CPU-only llama.cpp, so GGUF chat stayed on the CPU. It now ships a Vulkan llama.cpp, so chat runs on the AMD GPU (on a Strix Halo it went from about 38 to 70 tok/s). This was fixed in #13852 and will be in the next published unsloth/unsloth-rocm Studio image. Use the AMD quickstart flags (--device /dev/kfd --device /dev/dri plus the video/render group ids), not the CUDA unsloth/unsloth image. Reopen if it still happens.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

feature request

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions