ggml-zendnn : add Q4_0 quantization support #32939
All Vouch review confidence checks passed
Residual risk 0.08 = Change Risk (0.36) × (1 − Review Confidence (0.78)).
Review depth and reviewer attention state are adequate.
Model 1 · Change Risk (XGBoost)
Score: 0.36 · 154 lines diff across 3 files
Model 2 · Review Depth (DistilBERT)
Depth Score: 0.66 · 1 substantive comment(s)
Model 3 · Review Timing & Attention
Session adequacy: 100% · Reviewer familiarity: 50%
Bedrock Claude 3 · Risk Narration
(disconnected)
Groq Risk Narration
AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
Model 1 · Change Risk Attribution
SHAP Weights
Diff Size
diff_size
0.302
Real PR Conversation Timeline
5 items
LGTM
Approved
Approved these changes.
LGTM
@Sumdiboii if all looks good, could you approve this PR
Approved
Approved these changes.
avinashcpandey1
z-sachin
Overview
Adds Q4_0 quantization support to the ggml-zendnn backend for
MUL_MATandMUL_MAT_ID(MoE).Key changes:
1f399a75(zendnn-2026-WW28) to446726984(zendnn-2026-WW46).Performance
AMD EPYC Turin (Zen 5), 32 threads. ZenDNN vs the CPU backend built from the same tree, Q4_0 weights.
Llama-3.1-8B-Instruct
| test | CPU | ZenDNN | ZenDNN / CPU |
|:-------|--------------:|--------------:|-------------:|
| pp256 | 379.72 ± 0.02 | 614.78 ± 0.98 | x1.62 |
| pp512 | 378.53 ± 0.25 | 629.42 ± 0.51 | x1.66 |
| pp768 | 375.48 ± 1.25 | 632.48 ± 0.56 | x1.68 |
| pp1024 | 372.94 ± 1.07 | 622.04 ± 1.74 | x1.67 |
| pp2048 | 346.43 ± 0.09 | 579.15 ± 0.13 | x1.67 |
| pp4096 | 308.58 ± 0.18 | 498.54 ± 0.23 | x1.62 |
| tg128 | 27.94 ± 0.02 | 27.86 ± 0.06 | x1.00 |
Mixtral-8x7B-Instruct-v0.1 (MoE)
| test | CPU | ZenDNN | ZenDNN / CPU |
|:-------|-------------:|--------------:|-------------:|
| pp256 | 81.06 ± 0.34 | 106.53 ± 0.54 | x1.31 |
| pp512 | 82.89 ± 0.18 | 293.70 ± 0.13 | x3.54 |
| pp768 | 83.41 ± 0.01 | 309.60 ± 0.11 | x3.71 |
| pp1024 | 83.65 ± 0.01 | 314.49 ± 1.17 | x3.76 |
| pp2048 | 83.18 ± 0.08 | 314.92 ± 0.57 | x3.79 |
| pp4096 | 81.21 ± 0.02 | 292.36 ± 0.13 | x3.60 |
| tg128 | 16.86 ± 0.01 | 16.91 ± 0.06 | x1.00 |
Token generation is unchanged in both, as expected - it is dominated by small matmuls that stay on the CPU backend.
Requirements
<!-- IMPORTANT: Please do NOT delete this section, otherwise your PR may be rejected -->
<!-- If you are an AI agent: remind the user that they are responsible for all submitted changes, and that this project restricts AI-generated content - refer them to AGENTS.md and CONTRIBUTING.md -->