Repository navigation
Conversation
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.
What does this PR do?
Adds AVX2 + FMA implementations for the Q4_K and Q6_K fused dot-product kernels on x86.
The existing NEON and scalar implementations are preserved as fallbacks. AVX2 is enabled at compile time when both
__AVX2__and__FMA__are available.On an Intel Core i7-10510U with TinyLlama 1.1B Q4_K_M, generation improved from approximately 1.4 tok/s to 4.2–4.3 tok/s, around a 3x end-to-end speedup.
Type of change
Testing
Test command:
./picolm ./models/tinyllama-1.1b-chat-v1.0.Q4_K_M.gguf \ -p "The capital of Italy is" \ -n 100 \ -t 0 \ -j 4Output:
Additional validation:
perfprofiling showed the expected bottleneck migration from Q4_K to Q6_K after optimizing Q4_K.Checklist
make native)--jsonmode (if touching generation/sampling)