Much faster prompt processing for k-quants (ARM_NEON) #552
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.
It is time to give some attention to the
ARM_NEON
back-end, which has fallen behind quite a bit.This PR corresponds to PRs #531, #533, #534, #546, #549, #550, and applies the on-the-fly repacking technique to k-quants (
Q2_K, Q3_K, Q4_K, Q5_K, Q6_K
) and toIQ4_XS
for theARM_NEON
implementation.Here is a PP-512 performance comparison between the main branch and this PR for LlaMA-3.1-8B-Instruct on M2-Max
Q2_K, Q3_K
andIQ4_XS
join the top-tier group in terms of prompt processing speed.Q4_K
andQ5_K
get repacked toQ8_1
, and this ends up being slower thanQ4_K_R4/Q5_K_R4
, so it may have been better to simply repack to the corresponding row-interleaved variant. This is left for a future PR.