(Performance; ggml-cpu) Optimized x86 and generic cpu q1_0 dot (follow up)#21636
Open
pl752 wants to merge 2 commits intoggml-org:masterfrom
Open
(Performance; ggml-cpu) Optimized x86 and generic cpu q1_0 dot (follow up)#21636pl752 wants to merge 2 commits intoggml-org:masterfrom
pl752 wants to merge 2 commits intoggml-org:masterfrom
Conversation
Contributor
Author
|
|
This was referenced Apr 8, 2026
Contributor
|
Tested this on a x86 CPU I have access to, "AMD EPYC 7543 32-Core Processor" (its on the cloud). Before this runs <1 tok/s for the smallest model so decent speed up, not sure how the speed is comparison with other quantization formats for models of similar size with CPU-only, have not actively tried them. CPU Benchmarks (fa=1, CPU-only build)
KL divergence with unpacked version:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Hello, I have prepared optimized implementation of cpu q1_0 dot product (mainly for Bonsai LLM models), this is a continuation of PrismML-Eng#10 PR, list of experiments conducted and some other benchmark results can be found there
This PR implements:
Checks performed so far:
Benchmark results for Bonsai 1.7B
Benchmarks were performed with:
10pp 512t/stg 128t/sSSSE3AVXAVX+F16C**AVX2+FMAAVX512"*": Results for current mainline variant were extrapolated due to me being impatient
"**": F16C is enabled for AVX2/512 too and disabled previously (to reflect cpu ISA generations)
Perplexity summary for Bonsai 1.7B
SSSE3AVXAVX2+FMAThings still to be done:
Awaiting @khosravipasha approvalnrc==2as it shows potential for further speedup (pipeline is pretty hot in terms of memory bandwidth already), next PR soon probablyPeople who have also contributed
(other people who provided useful insights or experimented themselves)
AI usage disclosure