Performance of llama.cpp with Vulkan #10879
Replies: 300 comments 471 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 |
This comment was marked as off-topic.
This comment was marked as off-topic.
|
DGX Spark Ubuntu 26 + 610.43.02 driver
build: 657e011 (10001) |
|
Ubuntu 26.04 LTS Note: Two Nvidia P102-100 10GB not benchmarked and limiting GPU to PCIe 8x. llama-2-7b.Q4_0.gguf -fa on,off -ngl 99 --device Vulkan0 load_backend: loaded RPC backend from /llama-b10054/libggml-rpc.so
build: ac2557c (10054) |
|
Ubuntu 26.04 LTS /llama-b10054/llama-bench -m /llama-2-7b.Q4_0.gguf -fa on,off -ngl 99 --device Vulkan2 load_backend: loaded RPC backend from /run/media/czar33/SSD_L2GB_2/llama-b10054/libggml-rpc.so
build: ac2557c (10054) |
|
Intel Arc Pro B70 Running on Ubuntu 26.04 | host: i9 14900K ggml_vulkan: 0 = Intel(R) Graphics (BMG G31) (Intel open-source Mesa driver) | uma: 0 | fp16: 1 | bf16: 1 | warp size: 32 | shared memory: 49152 | int dot: 1 | matrix cores: KHR_coopmat
build: 8452824 (9739) Noteably, these results differ significantly from the Intel B70 results on the scorecard on the original post. Claude Code suggested this could be from the Mesa version. I'm on 26.0.3. Any ideas other ideas on why my results differ? Were the original scorecard results on Windows instead of Linux? |
|
AMD Radeon RX 6600 ggml_vulkan: Found 1 Vulkan devices:
build: 86a9c79 (10066) |
|
Intel® Arc™ 140V GPU ggml_vulkan: Found 1 Vulkan devices:
Vulkaninfo:GPU0: build: 178a6c4 (10069) |
|
./bin/llama-bench -m ../../llama-2-7b.Q4_0.gguf -ngl 100 -fa 0,1 -sm none -mg 0
build: 91d2fc3 (10073) |
|
AMD Radeon RX 7600
I tried using For Reference:
build: 91f8c9c (10156) |
|
A friend allowed me to test llama.cpp on his new laptop. It's a new Lenovo IdeaPad. Raw numbers below. Vulkan is significantly faster than CPU, especially for prompt processing. ROCm is faster for prompt processing but Vulkan is faster for token generation. This is a general trend I have observed in AMD hardware. Hardware: Software: CPU
build: cb26014 (10310) ROCm
build: cb26014 (10310) Vulkan
build: cb26014 (10310) |
|
Updated for R9700s: Minor variance between the two cards, but...significantly higher performance than last time I ran this (+10%, more or less). |
|
NVIDIA CMP 170HX (GA100, sm_80, 64 GB HBM2e) unlocked Mining card (same die gen as A100) ./bin/llama-bench -m llama-2-7b.Q4_0.gguf -ngl 99 -fa 0,1 -p 512,1024,2048,4096,8192,16384,32768 -n 128,256,512,1024,2048
build: 4c1a0af (10430) |
|
Same-machine Vulkan vs ROCm numbers on Strix Halo, for the record. Hardware: Ryzen AI MAX+ 395 / Radeon 8060S (gfx1151) / 128 GB LPDDR5X unified memory, no dedicated VRAM. Ubuntu 24.04.4, kernel 6.17. Measured UMA bandwidth ~230 GB/s. Method: llama.cpp master (2026-08), separate Vulkan (RADV) + ROCm (HIP) builds. llama-bench -p512 -n128 -b512 -t16, plus llama-server /v1/chat/completions max_tokens=200. Single request, serial, ±5%/cell. Decode throughput (tok/s):
On this UMA iGPU, Vulkan wins across the board — bare +2–25%, with MTP +15–21%. On dense 27B the bare gap is small (~3%) but MTP widens it to ~15–20%. Production pick: Vulkan + MTP. Caveat: UMA/shared-memory iGPU only — not comparable to discrete GPUs (RTX 4090 etc.). Full bilingual matrix + reproducible scripts: https://github.com/JJJJJovi/strix-halo-benchmark |
|
(deck@steamdeck llama-b10360)$ ./llama-bench -m ../../models/llama-2-7b.Q4_0.gguf -ngl 100 -fa 0,1
build: 48d22e2 (10360)
|
|
llamacpp version: b10590 llamacpp compiled with; Setting: GPU1 (Core up to 3000mz, vram up to 2650mz, power up to 350W) Setting: GPU1 + GPU0 (Core up to 3000mz, vram up to 2650mz, power up to 350W) tensor + fa 0 don't work, run with fa 1 only Very poor performance of vulkan + tensor split -> but it works and that's something. For comparison gemma 4 31B Q8: Not so bad vulkan + tensor for a larger model, it still doesn't make sense but the progress is nice looking at what was like e.g. a year ago. |
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