Skip to content

Faster Q3_K implementation on Metal#2307

Merged
ikawrakow merged 4 commits intomasterfrom
ik/metal_faster_q3k
Jul 21, 2023
Merged

Faster Q3_K implementation on Metal#2307
ikawrakow merged 4 commits intomasterfrom
ik/metal_faster_q3k

Conversation

@ikawrakow
Copy link
Copy Markdown
Contributor

Similar to #2290 but for Q3_K, which is notoriously difficult to implement efficiently.

The table gives TG-128 time for Q3_K_S in ms/t on M2 Max with 30-core GPU:

Model Master This PR Speedup
7B 28.1 22.0 27.7%
13B 50.3 37.5 34.1%
33B 121.3 88.8 36.6%
65B 230.3 167.8 37.2%

@ikawrakow ikawrakow requested a review from ggerganov July 21, 2023 07:56
Copy link
Copy Markdown
Member

@ggerganov ggerganov left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

M1 Pro

Model Master This PR
7B 43.6 35.4
13B 78.6 62.9

@ikawrakow ikawrakow merged commit 4d76a5f into master Jul 21, 2023
@ikawrakow ikawrakow deleted the ik/metal_faster_q3k branch July 21, 2023 14:05
Seunghhon pushed a commit to Seunghhon/llama.cpp that referenced this pull request Apr 26, 2026
* Faster Q3_K on Metal

* Additional Q3_K speedup on Metal

* Q3_K for QK_K = 64

* Better Q3_K for QK_K = 64

21.6 ms/t -> 21.1 ms/t

---------

Co-authored-by: Iwan Kawrakow <iwan.kawrakow@gmail.com>
phuongncn pushed a commit to phuongncn/llama.cpp-gx10-dgx-sparks-deepseekv4 that referenced this pull request Apr 28, 2026
* Faster Q3_K on Metal

* Additional Q3_K speedup on Metal

* Q3_K for QK_K = 64

* Better Q3_K for QK_K = 64

21.6 ms/t -> 21.1 ms/t

---------

Co-authored-by: Iwan Kawrakow <iwan.kawrakow@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants