Skip to content

Instantly share code, notes, and snippets.

@jodoherty
Last active May 9, 2026 16:05
Show Gist options
  • Select an option

  • Save jodoherty/afbfb610f3f2e3d757c36cf23616bf51 to your computer and use it in GitHub Desktop.

Select an option

Save jodoherty/afbfb610f3f2e3d757c36cf23616bf51 to your computer and use it in GitHub Desktop.
llama.cpp server AMD Radeon RX 7900 XTX perfect fit

This llama-server setup is specifically tuned to my AMD Radeon RX 7900 XTX for running gemma 4 26B A4B quantized by unsloth.

I've set it up to ensure it's stable, preferring as much practical quality as possible despite the VRAM limits.

This utilizes 99% of the VRAM on my setup so there's no room for improvement.

I get somewhere between 100-120 tokens/second token generation speeds with a single user.

#!/bin/sh
docker run -d --restart=unless-stopped \
--device /dev/kfd --device /dev/dri \
--security-opt seccomp=unconfined --group-add video \
--privileged --ipc=host \
-v huggingfacehub:/root/.cache/huggingface/hub \
--network=host \
-e LLAMA_ARG_HOST=0.0.0.0 \
--name llama-server \
ghcr.io/ggml-org/llama.cpp:server-vulkan \
--temp 1.0 --top-p 0.95 --top-k 64 \
-ngl 999 \
-kvu -ctk q5_1 -ctv q5_1 \
-hf unsloth/gemma-4-26B-A4B-it-GGUF:UD-Q5_K_XL \
--no-mmap \
--cache-prompt \
--port 8013 --reuse-port
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment