返回全部动态

llama.cpp b11404:Metal 新增少行 MMA 矩阵乘法加速投机解码

原标题:b11404

llama.cpp Releases一手来源开源质量 84

AI 摘要

llama.cpp 发布 b11404 版本,主要针对 Metal 后端新增少行 MMA 矩阵乘法内核,用于加速投机解码中每步少量草稿 token 的验证。此前 Metal 在无 tensor API 时使用 mat-vec 内核,耗时随 src1 行数增长,导致 M3 Ultra 上 DFlash2 解码慢于串行解码。新内核支持 2 至 16 行、多种量化类型,并加入 MUL_MAT+ADD 融合与批量拷贝等优化,仅在 MTLGPUFamilyApple7+ 且无 tensor API 的设备上按行数阈值启用。

以上摘要由 AI 生成,可能存在误差。事实请以原文为准。

正文节选

<details open> metal : few-row MMA mat-mul (#29869) * metal : few-row MMA mat-mul and batched copies for speculative decoding Speculative decoding verifies a few draft tokens per step. Without the tensor API, Metal ran these mat-muls with the mat-vec kernels, whose time grows with every src1 row, so DFlash2 decoding on an M3 Ultra was slower than serial decoding. - add mat-mul kernels for 2..16 src1 rows on 8x8 simdgroup matrices: each weight is dequantized once for all rows, and the simdgro


发布时间:2026-10-05 14:06
抓取时间:2026-10-05 14:38
来源机构:ggml-org
阅读原文github.com