Skip to content

ggml : add mrope kernel for metal #13457

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
May 12, 2025
Merged

Conversation

ngxson
Copy link
Collaborator

@ngxson ngxson commented May 11, 2025

This gives x1.5 generation speed for Qwen VL models (tested on Macbook M3 Max)

master branch:

model size params backend threads test t/s
qwen2vl 7B Q8_0 7.54 GiB 7.62 B Metal,BLAS 10 pp512 526.06 ± 6.63
qwen2vl 7B Q8_0 7.54 GiB 7.62 B Metal,BLAS 10 tg128 22.83 ± 1.36

This PR:

model size params backend threads test t/s
qwen2vl 7B Q8_0 7.54 GiB 7.62 B Metal,BLAS 10 pp512 604.64 ± 0.44
qwen2vl 7B Q8_0 7.54 GiB 7.62 B Metal,BLAS 10 tg128 33.54 ± 0.04

Tested with test-backend-ops -o ROPE, result is OK

@ngxson ngxson requested a review from ggerganov May 11, 2025 20:33
@github-actions github-actions bot added ggml changes relating to the ggml tensor library for machine learning Apple Metal https://en.wikipedia.org/wiki/Metal_(API) labels May 11, 2025
@ngxson ngxson merged commit df84919 into ggml-org:master May 12, 2025
44 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Apple Metal https://en.wikipedia.org/wiki/Metal_(API) ggml changes relating to the ggml tensor library for machine learning
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants