Skip to content

llama.cpp Vulkan Guide (2026): Run Local LLMs on AMD, Intel and Any GPU

7–10 minutes
Woman at a whiteboard holding a tablet with a VULKAN card, hook any GPU runs local AI

Vulkan is the easiest way to run local AI models on GPUs that are not Nvidia. With llama.cpp’s Vulkan backend you can use an AMD Radeon card, Intel Arc or integrated Intel and AMD graphics, and even some phones and Macs, without installing ROCm, oneAPI or CUDA.

This guide shows how to get llama.cpp running with Vulkan on Windows and Linux. You will see the quick install route, the prebuilt release downloads, building it yourself, offloading layers to the GPU, choosing between several GPUs, and how Vulkan compares with ROCm, SYCL and CUDA.

It follows the official llama.cpp README and build guide (docs/build.md) as of November 2026, including the new llama cli and llama serve commands.

TL;DR

  • What: a cross-vendor GPU backend for llama.cpp. Works on AMD, Intel, Nvidia and more.
  • Need: an up-to-date GPU driver with Vulkan support. Check with vulkaninfo.
  • Easiest: download a Vulkan build from the llama.cpp releases page, or use the llama.app installer.
  • Build it: cmake -B build -DGGML_VULKAN=ON then cmake --build build --config Release.
  • Run on GPU: add -ngl 99 to offload all layers, and look for ggml_vulkan: Using ... in the log.
  • Several GPUs: --list-devices, then pick with --device.

Why Use Vulkan?

Vulkan is a graphics and compute API that almost every modern GPU driver supports. llama.cpp’s Vulkan backend uses it to run model layers on the GPU.

  • One backend for many GPUs: AMD Radeon (including older cards ROCm does not support), Intel Arc and Iris Xe, AMD and Intel integrated graphics, Nvidia, and Qualcomm Adreno on some devices.
  • No heavy toolkits: you need the normal graphics driver. Building also needs the Vulkan SDK, but running a prebuilt binary does not.
  • Works on Windows and Linux, and on macOS through translation layers (MoltenVK or KosmicKrisp).
  • Integrated graphics: laptops without a dedicated GPU can still speed up prompt processing, since iGPUs share system RAM.

Apps built on llama.cpp, such as LM Studio, Jan and KoboldCpp, also offer Vulkan runtimes. If you only want a chat app, our KoboldCpp guide shows a simpler route.

Check Your GPU Supports Vulkan

  1. Update your GPU driver: AMD Adrenalin, Intel Arc/Iris graphics driver or Nvidia Game Ready/Studio driver on Windows; Mesa (RADV for AMD, ANV for Intel) on Linux.
  2. Install the vulkaninfo tool: it comes with the Vulkan SDK, or on Debian/Ubuntu with sudo apt install vulkan-tools.
  3. Run vulkaninfo --summary. You should see your GPU listed under “Devices” with no errors.

If vulkaninfo fails or lists only a software renderer (llvmpipe), fix the driver before going further.

Install a Ready-Made Build

The llama.cpp README now lists several quick install options:

  • Installer script: curl -LsSf https://llama.app/install.sh | sh on Linux/macOS, or irm https://llama.app/install.ps1 | iex in PowerShell. See llama.app for options.
  • Prebuilt binaries: the releases page has builds for each backend. For Vulkan on Windows, download the x64 zip whose name includes vulkan, extract it, and run the programs from that folder.
  • Docker: a Vulkan Dockerfile is included (see below).

Prebuilt files are the fastest way to test. Build from source only if you need the newest commit, custom options or a platform without a ready binary.

Build With Vulkan on Windows

The build guide gives three Windows routes. The Visual Studio one is the most common:

  1. Install Git, Visual Studio Community with the C++ workload, and CMake.
  2. Install the LunarG Vulkan SDK with default settings.
  3. Clone the repo: git clone https://github.com/ggml-org/llama.cpp
  4. Right-click the llama.cpp folder, choose Open Git Bash Here, and run cmake -B build -DGGML_VULKAN=ON
  5. Build: cmake --build build --config Release
  6. The programs land in build/bin/Release/.

The other routes are w64devkit (copy glslc.exe, vulkan-1.lib and the headers from the SDK into w64devkit) and MSYS2, where you install the UCRT packages for gcc, cmake, vulkan-devel, shaderc and spirv-headers with pacman and then run the same two CMake commands.

Build With Vulkan on Linux

  1. Install build tools: sudo apt install build-essential cmake git
  2. Install Vulkan development packages. On Debian/Ubuntu: sudo apt-get install libvulkan-dev glslc spirv-headers (Fedora/openSUSE use spirv-headers-devel). Alternatively use the LunarG SDK and run source setup_env.sh in every new terminal.
  3. Confirm the GPU is visible: vulkaninfo
  4. Build: cmake -B build -DGGML_VULKAN=1 then cmake --build build --config Release -j
  5. Binaries are in build/bin/.

The docs point out that SPIRV-Headers are required and are not always installed by the Vulkan loader package alone. A missing spirv.hpp error means you need that package.

macOS

Apple Silicon is best served by llama.cpp’s Metal backend. If you want Vulkan anyway, install the LunarG SDK (tick KosmicKrisp if you want it), source its setup script, and build with -DGGML_VULKAN=1 -DGGML_METAL=OFF.

Run the Vulkan Build in Docker

The Docker route does not need the Vulkan SDK on your machine. From the llama.cpp folder:

docker build -t llama-cpp-vulkan --target light -f .devops/vulkan.Dockerfile .

docker run -it --rm -v "$(pwd):/app:Z" \
  --device /dev/dri/renderD128:/dev/dri/renderD128 \
  --device /dev/dri/card1:/dev/dri/card1 \
  llama-cpp-vulkan -m "/app/models/YOUR_MODEL.gguf" -p "Hello" -n 400 -e -ngl 33

Your /dev/dri device names may differ; check with ls /dev/dri.

Run a Model on the GPU

The new unified command downloads a GGUF from Hugging Face and runs it:

llama cli -hf ggml-org/Qwen3.5-0.8B-GGUF -ngl 99
llama serve -hf ggml-org/Qwen3.5-0.8B-GGUF -ngl 99

With a source build, use the individual binaries:

./build/bin/llama-cli -m path/to/model.gguf -ngl 99 -c 16384
./build/bin/llama-server -m path/to/model.gguf -ngl 99 --port 8080
  • -ngl 99 offloads all layers to the GPU. Lower it if the model does not fit in VRAM.
  • -c sets the context length; longer context uses more VRAM.
  • Check the start-up log for a line such as ggml_vulkan: Using AMD Radeon RX 7800 XT | uma: 0 | fp16: 1 .... uma: 1 means a shared-memory (integrated) GPU.

Pick a quant that fits your card; our GGUF quantization guide lists sizes for each VRAM tier. To serve models to other apps, see the llama-server guide.

Pick a GPU and Combine Backends

  • List devices: llama-cli --list-devices shows every GPU llama.cpp can use and its name (for example Vulkan0, Vulkan1).
  • Choose one: --device Vulkan1 uses only that GPU, which is useful on laptops with both integrated and dedicated graphics.
  • CPU only: --device none fully disables GPU use. Even with -ngl 0, the GPU may still speed up some parts.
  • Several backends: you can build with both CUDA and Vulkan (-DGGML_CUDA=ON -DGGML_VULKAN=ON) and choose at run time with --device.
  • Portable builds: GGML_BACKEND_DL builds backends as loadable libraries, so one binary can run on machines with different GPUs.

Vulkan vs ROCm vs SYCL vs CUDA

Backend GPUs Setup effort When to choose it
Vulkan AMD, Intel, Nvidia, many iGPUs Low: driver only to run Default for AMD on Windows, Intel, older Radeons and iGPUs
HIP (ROCm) Supported AMD Radeon and Instinct cards Medium to high Supported AMD cards on Linux when you want to compare speed
SYCL (oneAPI) Intel GPUs High Intel Arc users chasing extra speed
CUDA Nvidia Medium Nvidia cards: usually the fastest choice
Metal Apple Silicon None (built in) Every Mac with an M-series chip

Speed differences between Vulkan and ROCm or SYCL change from release to release and from card to card, so test both with llama-bench on your own hardware if you care about the last few percent. For Ollama on Radeon cards, see our Ollama AMD GPU guide.

Troubleshooting

Problem Fix
No ggml_vulkan line in the log You are running a CPU-only build. Use a Vulkan release or rebuild with -DGGML_VULKAN=ON
vulkaninfo shows only llvmpipe The real GPU driver is missing or broken; reinstall the vendor driver or Mesa
CMake cannot find Vulkan Install the Vulkan SDK (Windows) or libvulkan-dev; on Linux with the SDK, run source setup_env.sh first
Error about spirv.hpp Install spirv-headers (or spirv-headers-devel)
glslc not found Install glslc/shaderc, or copy it from the SDK (w64devkit route)
Uses the integrated GPU instead of the dedicated one Run --list-devices and pick the right one with --device
Out of memory when loading Lower -ngl, reduce -c, or use a smaller quant
Docker container sees no GPU Pass the correct /dev/dri devices and check permissions (render group)

FAQ

Does llama.cpp Vulkan work with AMD GPUs on Windows?

Yes. It is the easiest way to use Radeon cards on Windows: install the latest Adrenalin driver and run a Vulkan build.

Is Vulkan slower than CUDA on Nvidia?

Usually somewhat slower, so Nvidia users should normally use the CUDA build. Vulkan is handy when CUDA is not an option.

Can I use Vulkan with Intel integrated graphics?

Yes. The build guide shows an Intel ADL GT2 iGPU being detected. Expect modest speed-ups, mostly in prompt processing.

Do I need the Vulkan SDK to run llama.cpp?

No. The SDK is only needed to build from source. Prebuilt Vulkan binaries need just a GPU driver with Vulkan support.

What does -ngl 99 mean?

It offloads up to 99 layers to the GPU, which in practice means the whole model for most sizes. Lower it to keep some layers in system RAM.

Can I use two different GPUs together?

llama.cpp can use multiple devices, and you can select them with --device. Mixing very different GPUs works but the slowest card limits speed.

What is the new “llama cli” command?

The current README shows a unified llama command with subcommands such as llama cli and llama serve, installed by the llama.app script. Source builds still produce llama-cli and llama-server.

Sources

Free weekly email

Get new AI guides every week

One short weekly email with our newest local AI, ComfyUI and AI tool guides. No spam, no pop-ups, just the good stuff.

Free. Unsubscribe anytime in one click. We only use your email to send this newsletter. See our privacy policy.

Woman at a whiteboard holding a tablet with a VULKAN card, hook any GPU runs local AI