ggml-cuda: widen Q4_K MMVQ weight loads to global_load_b128 - #88
Open
Annieren wants to merge 1 commit into
Open
Conversation
Set VDR_Q4_K_Q8_1_MMVQ to 8 so each thread owns a full 32-byte Q4_K group and loads its weights as two int4 (lowered to global_load_b128), cutting weight-load instructions on the bandwidth-dominant side. Activations stay scalar b32 (block_q8_1 is 36B, not 16B-aligned). Numerically equivalent to the VDR=2 path. Measured +1-2% typical decode on the MMVQ path (gfx1151, GGML_CUDA_DQ_MMV=0), up to +6-7% on some models; Q4_K-only, no effect on the default DQ path. Co-Authored-By: Claude Opus 4 <noreply@anthropic.com>
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.
Set VDR_Q4_K_Q8_1_MMVQ to 8 so each thread owns a full 32-byte Q4_K group and loads its weights as two int4 (lowered to global_load_b128), cutting weight-load instructions on the bandwidth-dominant side. Activations stay scalar b32 (block_q8_1 is 36B, not 16B-aligned). Numerically equivalent to the VDR=2 path. Measured +1-2% typical decode on the MMVQ path (gfx1151,GGML_CUDA_DQ_MMV=0), up to +6-7% on some models; Q4_K-only, no effect on the
default DQ path.
Q4_K MMVQ b128 sweep — DQ0 results
Decode throughput (tg128 t/s), baseline VDR=2 → new VDR=8