Skip to content

SVE 128 bit Implementation of gemm_q4_k_8x8_q8_k kernel - #27491

Open
anubhavfujitsu wants to merge 19 commits into
ggml-org:masterfrom
MonakaResearch:vla_interleaved_kernel_q4_k_q8_k
Open

SVE 128 bit Implementation of gemm_q4_k_8x8_q8_k kernel#27491
anubhavfujitsu wants to merge 19 commits into
ggml-org:masterfrom
MonakaResearch:vla_interleaved_kernel_q4_k_q8_k

Conversation

@anubhavfujitsu

@anubhavfujitsu anubhavfujitsu commented Aug 21, 2026

Copy link
Copy Markdown

Overview

This PR adds 128-bit SVE (Scalable Vector Extensions) support for the ggml_gemm_q4_K_8x8_q8_K kernel using i8mm and vector instructions.

Additional information

By running a Q4_K_M quantized model of Llama-3.2-3B-Instruct, I have checked the generation output.
I also verified that the perplexity matches between the NEON and SVE implementations.

SVE 128 (this PR) NEON (OSS)
12.5089 +/- 0.69243 12.5089 +/- 0.69243

The command used to measure the perplexity is:

./llama-perplexity -m model.gguf -f wikitext-2-raw/wiki.test.raw --chunks 10

Performance Check

This PR Improves the Prompt Eval time (TTFT) of LLM Inference between ~4 to 5%, as compared to NEON (Original Version) for Llama-3.2-3B-Instruct-Q4_K_M.

The performance was measured on Nvidia Grace machine.
Performance is improved as follows. The value is tokens/second.

Task Threads NEON (Original) SVE 128 (This PR) Speedup
PP128 4 77.45 81.64 1.0541
PP128 8 141.37 149.71 1.0590
PP128 16 267.43 279.88 1.0466
PP128 32 436.96 455.90 1.0433

Requirements

@github-actions github-actions Bot added the ggml changes relating to the ggml tensor library for machine learning label Aug 21, 2026
@ggml-gh-bot

ggml-gh-bot Bot commented Aug 21, 2026

Copy link
Copy Markdown

Hi @anubhavfujitsu, thanks for your contribution!

Per our contribution guidelines, the automated PR checker found the following issue(s) that need your attention:

  • Multiple open PRs from a new contributor: We limit new contributors (those without a previously merged PR) to 1 open PR at a time. You currently have 2 open PRs.

Please note that maintainers reserve the right to make final decisions on PRs. If you believe there is a mistake, please comment below.

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants