Repository navigation
Performance of llama.cpp with Vulkan #10879
Replies: 324 comments 489 replies
|
AMD FirePro W8100
|
|
AMD RX 470
|
|
ubuntu 24.04, vulkan and cuda installed from official APT packages.
build: 4da69d1 (4351) vs CUDA on the same build/setup
build: 4da69d1 (4351) |
|
Macbook Air M2 on Asahi Linux ggml_vulkan: Found 1 Vulkan devices:
|
|
Gentoo Linux on ROG Ally (2023) Ryzen Z1 Extreme ggml_vulkan: Found 1 Vulkan devices:
|
|
ggml_vulkan: Found 4 Vulkan devices:
|
|
build: 0d52a69 (4439) NVIDIA GeForce RTX 3090 (NVIDIA)
AMD Radeon RX 6800 XT (RADV NAVI21) (radv)
AMD Radeon (TM) Pro VII (RADV VEGA20) (radv)
Intel(R) Arc(tm) A770 Graphics (DG2) (Intel open-source Mesa driver)
|
|
@netrunnereve Some of the tg results here are a little low, I think they might be debug builds. The cmake step (at least on Linux) might require |
|
Build: 8d59d91 (4450)
Lack of proper Xe coopmat support in the ANV driver is a setback honestly.
edit: retested both with the default batch size. |
|
Here's something exotic: An AMD FirePro S10000 dual GPU from 2012 with 2x 3GB GDDR5. build: 914a82d (4452)
|
|
Latest arch with For the sake of consistency I run every bit in a script and also build every target from scratch (for some reason kill -STOP -1
timeout 240s $COMMAND
kill -CONT -1
ggml_vulkan: Found 1 Vulkan devices:
ggml_vulkan: 0 = Intel(R) Iris(R) Xe Graphics (TGL GT2) (Intel open-source Mesa driver) | uma: 1 | fp16: 1 | warp size: 32 | matrix cores: none
build: ff3fcab (4459)
This bit seems to underutilise both GPU and CPU in real conditions based on
|
|
Intel ARC A770 on Windows:
build: ba8a1f9 (4460) |
Single GPU VulkanRadeon Instinct MI25 ggml_vulkan: 0 = AMD Radeon Instinct MI25 (RADV VEGA10) (radv) | uma: 0 | fp16: 1 | warp size: 64 | matrix cores: none
build: 2739a71 (4461) Radeon PRO VII ggml_vulkan: 0 = AMD Radeon Pro VII (RADV VEGA20) (radv) | uma: 0 | fp16: 1 | warp size: 64 | matrix cores: none
build: 2739a71 (4461) Multi GPU Vulkanggml_vulkan: 0 = AMD Radeon Pro VII (RADV VEGA20) (radv) | uma: 0 | fp16: 1 | warp size: 64 | matrix cores: none
build: 2739a71 (4461) ggml_vulkan: 0 = AMD Radeon Pro VII (RADV VEGA20) (radv) | uma: 0 | fp16: 1 | warp size: 64 | matrix cores: none
build: 2739a71 (4461) Single GPU RocmDevice 0: AMD Radeon Instinct MI25, compute capability 9.0, VMM: no
build: 2739a71 (4461) Device 0: AMD Radeon Pro VII, compute capability 9.0, VMM: no
build: 2739a71 (4461) Multi GPU RocmDevice 0: AMD Radeon Pro VII, compute capability 9.0, VMM: no
build: 2739a71 (4461) Layer split
build: 2739a71 (4461) Row split
build: 2739a71 (4461) Single GPU speed is decent, but multi GPU trails Rocm by a wide margin, especially with large models due to the lack of row split. |
|
AMD Radeon RX 5700 XT on Arch using mesa-git and setting a higher GPU power limit compared to the stock card.
I also think it could be interesting adding the flash attention results to the scoreboard (even if the support for it still isn't as mature as CUDA's).
|
|
I tried but there's nothing after 1 hrs , ok, might be 40 mins... Anyway I run the llama_cli for a sample eval...
Meanwhile OpenBLAS |
|
Host: Acer Nitro ANV15-41 — AMD Ryzen 7 7735HS with Radeon Graphics (8C/16T), 66 GiB RAM Both GPUs benchmarked in isolation via NVIDIA GeForce RTX 4060 Laptop GPU ggml_vulkan: 0 = NVIDIA GeForce RTX 4060 Laptop GPU (NVIDIA) | uma: 0 | fp16: 1 | bf16: 1 | fp4: 0 | warp size: 32 | shared memory: 49152 | int dot: 1 | matrix cores: NV_coopmat2
build: 1e6f04a (11540) AMD Radeon 680M (iGPU, RADV) ggml_vulkan: 0 = AMD Radeon 680M (RADV REMBRANDT) (radv) | uma: 1 | fp16: 1 | bf16: 0 | fp4: 0 | warp size: 32 | shared memory: 65536 | int dot: 1 | matrix cores: none
build: 1e6f04a (11540) Note: 680M run used |
|
Host: Windows 11 25H2, i5 11400f, 16GB RAM, AMD RX 6600. ggml_vulkan: Found 1 Vulkan devices:
|
|
Not as good as the R 9070 but a little bit faster now ./llama-bench -m ~/models/llama-2-7b.Q4_0.gguf -ngl 99 -fa 1,0
build: 9a4580b (11874) |
|
Better performance on Intel Arc Pro B70 since my last post in April'26 (#10879 (comment))
|
|
Not a Vulkan run, so not for the scoreboard. The opening post allows comparing backends, and this is a patched OpenCL backend on two Arc cards with the thread's command. arcint 1.5.1 carries a series of 90 patches on llama.cpp 3e4dfa8, with Intel kernels for ggml's OpenCL backend. This is llama-bench itself on that tree, Llama 2 7B Q4_0,
Stock SYCL at the same commit on the same cards and host, from one Level Zero V2 session:
So the series leads prefill and SYCL with FA still leads decode, by 5.4 % on the A770 and 4.4 % on the B60. I have not run Vulkan on these cards for these rows. Against the Vulkan rows in this thread, the series is ahead on both numbers on both cards. The same series through arcint's server, which is what a client gets, reaches 1962.84 ± 2.98 / 70.50 ± 0.08 on the A770 and 2329.61 ± 4.51 / 80.69 ± 0.09 on the B60. Those rates come from the engine's own counters, with HTTP time excluded. Serving adds a flat 14-17 ms a request to prefill. Setup: Ryzen 7 5700X, Debian 13, kernel 7.0.14 with the xe driver, compute runtime 26.27.39122.11. The A770 is on PCIe 3.0 x4 behind the chipset with its GT clock pinned at 2000 MHz, below its 2400 MHz maximum. The B60 is on PCIe 4.0 x8. On both cards, mean KL against a CPU run at this commit is 0.00043 nats, and 8 fact questions come back right. To rebuild: Without |
|
Tested the Radeon AI PRO R9700 (gfx1201) on Windows 11 with the official llama.cpp b12170 Vulkan release and AMD Adrenalin 26.9.2 (LLPC). This appears to be the first Windows result for gfx1201 using the standard Llama 2 7B Q4_0 test in this thread.
build: c4fb579 (12170) Repeated the benchmark once; all results were within 0.6% of the first run. llama-bench -m llama-2-7b.Q4_0.gguf -ngl 100 -fa 0,1 -sm none -mg 1 System: Radeon AI PRO R9700 32 GB (gfx1201), Adrenalin 26.9.2 (driverInfo: 26.9.2 (LLPC)), Intel Core Ultra 7 265KF, ASUS PRIME Z890-P WIFI, 64 GB DDR5-6000, Windows 11 Pro build 26200. Official release b12170 (c4fb579). Model SHA-256: For context, Linux entries report 152.70/5907.66 t/s for the R9700 and 142.00/5603.63 t/s for the RX 9070 XT (tg128/pp512, FA=1). These are not direct comparisons: they use different systems and builds. The R9700 result additionally uses a feature branch and RADV_DEBUG=nocompute (graphics queue). |
|
System
Benchmark
Benchmark for MoE model
|
|
Significant performance improvements on 5090 mobile since my last post here. HP Omen Max 16 - Nvidia RTX 5090 laptop (24GB, GDDR7, 256-bit)
Run at performance mode in Fedora workstation 44, kernel 7.3.4, Vulkan 1.4.341 -fa 0: GGML_VK_FORCE_MMVQ=1 DRI_PRIME="1!" llama-bench -m ~/Downloads/_ai-models/gguf/llama-2-7b.Q4_0.gguf -fa 0 -dev Vulkan0 ggml_vulkan: 0 = NVIDIA GeForce RTX 5090 Laptop GPU (NVIDIA) | uma: 0 | rebar: 1 | fp16: 1 | bf16: 1 | fp4: 0 | warp size: 32 | shared memory: 49152 | int dot: 1 | matrix cores: NV_coopmat2
build: e46069c (1605) -fa 1: GGML_VK_FORCE_MMVQ=1 DRI_PRIME="1!" llama-bench -m ~/Downloads/_ai-models/gguf/llama-2-7b.Q4_0.gguf -fa 1 -dev Vulkan0
build: e46069c (1605) Note about this hybrid laptop This laptop uses an Optimus/PRIME iGPU+dGPU combo. With the Intel i915 driver it requires Note regarding GGML_VK_FORCE_MMVQ Without |
|
I recently updated from tag b10433 to b12608 and figured you folks might want some information on how performance has progress. tl;dr: it's gotten slightly better in my non-exhaustive and not very-well controlled test. Both were run against: Commit: b10433OS/Kernel: Ubuntu 24.04.4 LTS (6.14.0-37-generic) Commit: b12608OS/Kernel: Ubuntu 24.04.4 LTS (6.14.0-37-generic) |
|
System
Benchmarks
ggml_vulkan: Found 1 Vulkan devices:
build: b1b770d (12359)
ggml_vulkan: Found 1 Vulkan devices:
build: b1b770d (12359) |
|
Has anyone compared Vulkan performance during extended inference sessions on laptops? It would be interesting to see how thermal throttling affects sustained generation speed compared to short benchmark runs. |
|
4 × AMD Radeon RX 580 8 GB (Polaris 10), Ubuntu 26.04, Linux 7.0.0-44, Mesa 26.0.8 (RADV), i5-7600K. Build: upstream
One thing that may help other people with multi-GPU Polaris rigs: runtime power management must be disabled on the cards ( On this small model 2 cards in tensor mode is the best setup; 4 cards only pay off for models that do not fit on 2. Numbers for 24B to 35B models on the 4 cards are in the branch README. |
|
System
Arc A770M (Mobile)
I also ran the iGPU for fun. Iris Xe (96 EU)
build: 2924a0e (12864) |
|
AMD Radeon RX 9070 XT
build: e5cd6e3 (12916) AMD Radeon RX 7800 XT
build: e5cd6e3 (12916) |

Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
This is similar to the Apple Silicon benchmark thread, but for Vulkan! We'll be testing the Llama 2 7B model like the other thread to keep things consistent, and use Q4_0 as it's simple to compute and small enough to fit on a 4GB GPU. You can download it here.
Instructions
Either run the commands below or download one of our Vulkan releases. If you have multiple GPUs please run the test on a single GPU using
-sm none -mg YOUR_GPU_NUMBERunless the model is too big to fit in VRAM. If you use RADV please run with the environment variableRADV_PERFTEST=nogttspillas that can fix a bunch of performance issues.Share your llama-bench results along with the git hash and Vulkan info string in the comments. Feel free to try other models and compare backends, but only valid runs will be placed on the scoreboard.
If multiple entries are posted for the same setup I'll prioritize newer commits with substantial Vulkan updates, otherwise I'll pick the one with the highest overall score at my discretion. Performance may vary depending on driver, operating system, board manufacturer, etc. even if the chip is the same. For integrated graphics note that the memory speed and number of channels will greatly affect your inference speed!
Vulkan Scoreboard (Click on the headings to expand the section)
Llama 2 7B, Q4_0, no FA
Llama 2 7B, Q4_0, FA enabled
All reactions