Skip to content

Conversation

@lhez
Copy link
Collaborator

@lhez lhez commented Jul 23, 2025

This PR adds fused rms_norm_mul following the pattern in #14800.

Qwen2.5-1.5B on Adreno 750

with fusion

model size params backend ngl test t/s
qwen2 1.5B Q4_0 828.59 MiB 1.54 B OpenCL 99 pp512 252.30 ± 0.44
qwen2 1.5B Q4_0 828.59 MiB 1.54 B OpenCL 99 tg128 24.10 ± 0.85

without fusion

model size params backend ngl test t/s
qwen2 1.5B Q4_0 828.59 MiB 1.54 B OpenCL 99 pp512 252.02 ± 0.51
qwen2 1.5B Q4_0 828.59 MiB 1.54 B OpenCL 99 tg128 22.94 ± 0.76

Qwen2.5-3B on Adreno 750

with fusion

model size params backend ngl test t/s
qwen2 3B Q4_0 1.62 GiB 3.09 B OpenCL 99 pp512 136.21 ± 0.10
qwen2 3B Q4_0 1.62 GiB 3.09 B OpenCL 99 tg128 21.41 ± 0.28

without fusion

model size params backend ngl test t/s
qwen2 3B Q4_0 1.62 GiB 3.09 B OpenCL 99 pp512 135.85 ± 0.13
qwen2 3B Q4_0 1.62 GiB 3.09 B OpenCL 99 tg128 19.39 ± 2.65

@github-actions github-actions bot added ggml changes relating to the ggml tensor library for machine learning OpenCL Issues specific to the OpenCL backend labels Jul 23, 2025
@lhez lhez marked this pull request as ready for review July 24, 2025 03:52
@lhez lhez requested review from CISC, max-krasnyansky and rmatif July 24, 2025 04:16
@CISC
Copy link
Collaborator

CISC commented Jul 25, 2025

LGTM, but I can't test.

@CISC CISC removed their request for review July 25, 2025 10:53
@rmatif
Copy link
Collaborator

rmatif commented Jul 25, 2025

Thank you! I was thinking about adding this one

LGTM. Results on Adreno 830:

model size params backend ngl test t/s
llama 1B F16 2.30 GiB 1.24 B OpenCL 99 pp512 170.73 ± 0.16
llama 1B F16 2.30 GiB 1.24 B OpenCL 99 tg128 22.64 ± 0.05

@rmatif rmatif merged commit ce111d3 into ggml-org:master Jul 25, 2025
47 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ggml changes relating to the ggml tensor library for machine learning OpenCL Issues specific to the OpenCL backend

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants