Performance of llama.cpp with Vulkan #10879
Replies: 189 comments 288 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.
-
Newer builds seem to have better tg performance than pp performance or I'm confused as to what I am doing wrong to get lower pp performance on my XTX.
I'll have to do an upgrade later. |
Beta Was this translation helpful? Give feedback.
-
|
Titan V (12 GB / HBM2 / 3072 bit) ggml_vulkan: Found 1 Vulkan devices:
build: e56abd2 (6794) I wonder if there's a way to actually utilize the matrix cores. |
Beta Was this translation helpful? Give feedback.
-
NVIDIA GeForce RTX 4080 SUPEROS: NixOS / Linux 6.16.11-xanmod1
build: 81086cd (6729) |
Beta Was this translation helpful? Give feedback.
-
|
Radeon 660M (Ryzen 5 6600H), dual channel DDR5 4800MT/s
build: ee09828 (6795) |
Beta Was this translation helpful? Give feedback.
-
|
Radeon 680M (Ryzen 5 6800H), LPDDR5 6400 MT/s
build: ee09828 (6795) |
Beta Was this translation helpful? Give feedback.
-
|
RTX 3070 Laptop GPU (8 GB / GDDR6 / 256 bit) Driver Version: 580.76.05
build: ceff6bb (6783) |
Beta Was this translation helpful? Give feedback.
-
|
RX Vega 56
build: 66b0dbc (6791) |
Beta Was this translation helpful? Give feedback.
-
|
|
Beta Was this translation helpful? Give feedback.
-
|
|
Beta Was this translation helpful? Give feedback.
-
|
Another Strix Halo 395+ (128GB). Also with the optimizations alluded to in the Strix Halo benchmarking guide. radv, mesa 26.0.0 amdvulkan |
Beta Was this translation helpful? Give feedback.
-
|
AMD Radeon RX 480 $ llama-bench --device vulkan2 -ngl 100 -m llama-2-7b.Q4_0.gguf -fa 0,1
build: 0bcb40b (6833) |
Beta Was this translation helpful? Give feedback.
-
|
AMD Ryzen 5 5600H with Vega 7 iGPU. The package is capped at 35W. 2x 32GB DDR4 3200MHz (generic). Slightly more surprising is this: |
Beta Was this translation helpful? Give feedback.
-
|
b6840, macOS Sequoia AMD Radeon RX 6900 XT, eGPU, TB3, iMac Pro ./llama.cpp/build/bin/llama-bench -m ./GGUF/llama-2-7b.Q4_0.gguf -ngl 100 -fa 0,1 -sm none -mg 0
AMD Radeon Pro Vega 64, internal, iMac Pro ./llama.cpp/build/bin/llama-bench -m ./GGUF/llama-2-7b.Q4_0.gguf -ngl 100 -fa 0,1 -sm none -mg 1
FA ALL: ./llama/llama-bench -m ./GGUF/llama-2-7b.Q4_0.gguf -ngl 100 -fa all -sm none -mg 0
./llama/llama-bench -m ./GGUF/llama-2-7b.Q4_0.gguf -ngl 100 -fa all -sm none -mg 1
|
Beta Was this translation helpful? Give feedback.
-
|
Radeon Vega 6 APU
(AMD Ryzen 5 PRO 4650U) .\llama-bench.exe -m llama-2-7b.Q4_0.gguf -ngl 100 -fa 0,1
FA ALL .\llama-bench.exe -m llama-2-7b.Q4_0.gguf -ngl 100 -fa all
|
Beta Was this translation helpful? Give feedback.
-
|
AMD Radeon 880M (Ryzen AI 9 365) Tested with RADV and AMDVLK. % AMD_VULKAN_ICD=AMDVLK ./build-vk/bin/llama-bench -m llama-2-7b.Q4_0.gguf -fa 0,1
% AMD_VULKAN_ICD=RADV ./build-vk/bin/llama-bench -m llama-2-7b.Q4_0.gguf -fa 0,1
build: c55d53a (6854) Edit: it's reported as 890M but it's 880M. |
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! 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.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
Beta Was this translation helpful? Give feedback.
All reactions