Performance of llama.cpp with Vulkan #10879
Replies: 134 comments 226 replies
-
AMD FirePro W8100
|
Beta Was this translation helpful? Give feedback.
-
AMD RX 470
|
Beta Was this translation helpful? Give feedback.
-
ubuntu 24.04, vulkan and cuda installed from official APT packages.
build: 4da69d1 (4351) vs CUDA on the same build/setup
build: 4da69d1 (4351) |
Beta Was this translation helpful? Give feedback.
-
Macbook Air M2 on Asahi Linux ggml_vulkan: Found 1 Vulkan devices:
|
Beta Was this translation helpful? Give feedback.
-
Gentoo Linux on ROG Ally (2023) Ryzen Z1 Extreme ggml_vulkan: Found 1 Vulkan devices:
|
Beta Was this translation helpful? Give feedback.
-
ggml_vulkan: Found 4 Vulkan devices:
|
Beta Was this translation helpful? Give feedback.
-
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)
|
Beta Was this translation helpful? Give feedback.
-
@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 |
Beta Was this translation helpful? Give feedback.
-
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. |
Beta Was this translation helpful? Give feedback.
-
Here's something exotic: An AMD FirePro S10000 dual GPU from 2012 with 2x 3GB GDDR5. build: 914a82d (4452)
|
Beta Was this translation helpful? Give feedback.
-
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
|
Beta Was this translation helpful? Give feedback.
-
Intel ARC A770 on Windows:
build: ba8a1f9 (4460) |
Beta Was this translation helpful? Give feedback.
-
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. |
Beta Was this translation helpful? Give feedback.
-
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).
|
Beta Was this translation helpful? Give feedback.
-
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
|
Beta Was this translation helpful? Give feedback.
-
got a nice 4-5% performance increase in tg128 since i last tested in late june using build: fd1234c (6096) ggml_vulkan: 0 = AMD Radeon RX 9070 XT (AMD open-source driver) | uma: 0 | fp16: 1 | bf16: 0 | warp size: 64 | shared memory: 32768 | int dot: 1 | matrix cores: KHR_coopmat
ggml_vulkan: 0 = AMD Radeon RX 9070 XT (RADV GFX1201) (radv) | uma: 0 | fp16: 1 | bf16: 1 | warp size: 64 | shared memory: 65536 | int dot: 1 | matrix cores: KHR_coopmat
|
Beta Was this translation helpful? Give feedback.
-
About 5% performance increase vs 8e6f8bc. GTX 1660 Ti Mobile
build: e54d41b (6121) CUDA pp is over 2x slower, but TG is 10% faster. |
Beta Was this translation helpful? Give feedback.
-
New Metal Build vs Vulkan build ! ./build/bin/llama-bench -ngl 99 -m ../Models/llama-2-7b-q4_0.gguf ggml_metal_init: found device: AMD Radeon RX 6900 XT
./build/bin/llama-bench -ngl 99 -m /Users/xionz/Models/llama-2-7b-q4_0.gguf -sm none -mg 0 ggml_vulkan: 0 = AMD Radeon RX 6900 XT (MoltenVK) | uma: 0 | fp16: 1 | bf16: 0 | warp size: 64 | shared memory: 65536 | int dot: 0 | matrix cores: none
build: 79c1160 (6123) |
Beta Was this translation helpful? Give feedback.
-
AMD Ryzen AI 9 HX 370 Linux Mint LMDE6 (Debian 12) igpu Radeon 890M Why are only 6 GB of 8 GB shared memory being used? Radeontop shows max 5,2GB ./bin/llama-bench -m ../../llama-2-7b.Q4_0.gguf -ngl 100 -fa 0,1
build: 810b9fc (6156) |
Beta Was this translation helpful? Give feedback.
-
Updating the RX 6600 test with fa argument Results test from march pp512 380.87 tg128 47.47 Results from june pp512 615.03 tg128 47.49
build: 4227c9b (6170) |
Beta Was this translation helpful? Give feedback.
-
Radeon RX 9070 (non-XT)Edit: updated results with
build: 21c17b5 (6188) |
Beta Was this translation helpful? Give feedback.
-
Vega 8 (GCN5) on the Ryzen 5 3550H running on dual channel DDR4-2400 memory, UMA framebuffer size set to 8GiB. TTM introduces a slight performance penalty so it's best to set the UMA framebuffer size in BIOS instead. This hardware is pretty weak, thought I'd benchmark it anyway just for fun. Fedora 42 running mesa 25.1.7. Can't compare performance with ROCm because GCN5 is no longer supported.
build: 1fe0029 (6182) |
Beta Was this translation helpful? Give feedback.
-
Apple M1 Mac Mini with 7-core GPU, Asahi Linux (Fedora 42) and mesa 25.2.0. Total system power (reported by the hwmon driver):
build: 1fe0029 (6182) |
Beta Was this translation helpful? Give feedback.
-
Apple M2 Pro Mac Mini with 16-core GPU, Asahi Linux (Fedora 42) and mesa 25.2.0. Total system power (reported by the hwmon driver):
build: 1fe0029 (6182) |
Beta Was this translation helpful? Give feedback.
-
I didn't see the source for the AMD Ryzen AI Max+ 395 (Radeon 8060S iGPU) numbers, but the UPDATE: found it, was truncated by default, so didn't show up in a Find. Here's my latest numbers on a Framework Desktop w/ 140W PL and w/ First with AMDVLK:
And secondly, here's it running w/ Mesa RADV
So, interestingly, my BTW, the AMDVLK/Mesa RADV perf is about as expected - AMDVLK is almost always faster for
|
Beta Was this translation helpful? Give feedback.
-
Vulkan on an i7-10750H GPU, thought I would share it here after feeling bored with my dGPU:
build: de56279 (6184) |
Beta Was this translation helpful? Give feedback.
-
Release b6188 gave a nice improvement for Arc B570 in tg128: ggml_vulkan: Found 1 Vulkan devices:
build: 21c17b5 (6188) b6187 for comparison:
build: 19f4dec (6187) |
Beta Was this translation helpful? Give feedback.
-
Intel A750, mesa 25.1.7. Enabling flash attention reduces prompt processing throughput by 53% for some reason, but overall it's quite a lot faster than the results from January: #10879 (comment)
build: 21c17b5 (6188) |
Beta Was this translation helpful? Give feedback.
-
Significant improvements visible (now close to 2/3 of IPEX LLM) .\llama-bench.exe -m ..\llama-2-7b.Q4_0.gguf -ngl 99
build: d1d8241 (6193) |
Beta Was this translation helpful? Give feedback.
-
AMD Radeon R9 Fury
build: c8c4495 (5820)
build: 1a99c2d (6213) Sadly, driver for RX 470 mining was not successfully installed so gpu-z only reported that the card only support OpenGL and no vulkan |
Beta Was this translation helpful? Give feedback.
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! Many improvements have been made to the Vulkan backend and I think it's good to consolidate and discuss our results here.
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_NUMBER
unless the model is too big to fit in VRAM.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 for Llama 2 7B, Q4_0 (no FA)
Vulkan Scoreboard for Llama 2 7B, Q4_0 (with FA)
Beta Was this translation helpful? Give feedback.
All reactions