You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Over the past few months I've been doing testing/poking around trying to get AI/ML functionality working well on Strix Halo (gfx1151). Along the way, I've discovered a number of sharp edges and interesting wrinkles. One of more practical things that I worked on recently was writing a simple harness and doing a bunch of llama.cpp performance testing sweeps on a variety of models to allow for more accurately characterizing a lot of the wild differences in model performance based on backend, drivers, and compile configurations. For example, here's just what pp perf looks like for the most standard llama2-7b-q4_0 model:
These differ dramatically for different models and quants! I've previously reported some of the more surprising discoveries to different AMD teams (eg 1, 2), but I think that most people aren't aware of these huge differences in performance, and they also are fluctuating a lot with different ROCm versions and builds.
While there's my (one-time, basically) sweeps, and @kyuz0 is currently running some ongoing pp512/tg128 testing on select models: https://kyuz0.github.io/amd-strix-halo-toolboxes/ it occurred to me that there would be a huge benefit if there was some sort of official inferencing performance CI infrastructure that AMD runs that might be more appropriate longer term?
I'd propose specifically:
An automated CI infrastructure to do inferencing sweeps (maybe up to 8K or 16K context) to measure the prompt processing and token generation speeds on latest builds of llama.cpp with different versions of the Vulkan (AMDVLK, Mesa RADV) and ROCm drivers (whatever the latest release, RC and TheRock nightlies?) against a variety of AMD GPUs/APUs
This would allow not just tracking the current performance, best back-ends and settings to use, but also progress over time, performance regressions, etc
Allowing different model architectures to be characterized/tested in a consistent manner - @kyuz0 has a calculator, and my scripts does some memory tracking, but I think it'd be useful to characterize memory usage for loading the models and for maximum context with each different configuration as well. This would be incredibly useful for helping people decide which models are appropriate for which GPUs
This will let people (including AMD marketing!) know how to optimally run models, btw. For example, in the recent AMD/GPT-OSS announcement it says "With speeds of up to 30 tokens per second" for the Ryzen™ AI Max+ 395, but from my testing, the day-zero ggml-org quant can easily run at >40 tok/s on llama.cpp with the ROCm/rocWMMA backend. For pp especially, depending on the model you can easily see 50%, 2X, even on some models 10X differences with different configurations...
For those interested, the things I've identified as most important for the different llama.cpp backends:
FA on or off (sometimes there is a tradeoff between pp/tg/memory usage)
Vulkan
Mesa RADV vs AMDVLK
For MoE models setting 2^n multiple for -b can sometimes be faster, maybe this is a llama.cpp-specifc quirk that will disappear/can be skipped
ROCm
version (duh)
rocblas (default) vs hipblaslt
compiled with rocmwmma FA or not
For specific platforms like Strix Halo, there are some other general configuration settings (eg, amd_iommu=off makes a noticeable MBW difference, using tuned with accelerator-performance also increases MBW, but more importantly gives a big (5-10%) boost to pp. Oh also mmap must be disabled for big models otherwise the ROCm backend takes forever (hours to days) to load the model.
Maybe this can be turned into some sort of distributed infra at some point (an one-click thing community members can run for models that aren't covered etc), but I think having a set of standard/verified numbers would be super useful.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Over the past few months I've been doing testing/poking around trying to get AI/ML functionality working well on Strix Halo (gfx1151). Along the way, I've discovered a number of sharp edges and interesting wrinkles. One of more practical things that I worked on recently was writing a simple harness and doing a bunch of llama.cpp performance testing sweeps on a variety of models to allow for more accurately characterizing a lot of the wild differences in model performance based on backend, drivers, and compile configurations. For example, here's just what
ppperf looks like for the most standard llama2-7b-q4_0 model:These differ dramatically for different models and quants! I've previously reported some of the more surprising discoveries to different AMD teams (eg 1, 2), but I think that most people aren't aware of these huge differences in performance, and they also are fluctuating a lot with different ROCm versions and builds.
While there's my (one-time, basically) sweeps, and @kyuz0 is currently running some ongoing pp512/tg128 testing on select models: https://kyuz0.github.io/amd-strix-halo-toolboxes/ it occurred to me that there would be a huge benefit if there was some sort of official inferencing performance CI infrastructure that AMD runs that might be more appropriate longer term?
I'd propose specifically:
ppespecially, depending on the model you can easily see 50%, 2X, even on some models 10X differences with different configurations...For those interested, the things I've identified as most important for the different llama.cpp backends:
-bcan sometimes be faster, maybe this is a llama.cpp-specifc quirk that will disappear/can be skippedFor specific platforms like Strix Halo, there are some other general configuration settings (eg,
amd_iommu=offmakes a noticeable MBW difference, usingtunedwithaccelerator-performancealso increases MBW, but more importantly gives a big (5-10%) boost topp. Oh alsommapmust be disabled for big models otherwise the ROCm backend takes forever (hours to days) to load the model.Maybe this can be turned into some sort of distributed infra at some point (an one-click thing community members can run for models that aren't covered etc), but I think having a set of standard/verified numbers would be super useful.
All reactions