论文

DropKS 在 Apple Silicon 上用 Strassen-Winograd 算法加速 LLM 预填充

Strassen-Winograd Matrix Multiplies and Apple Silicon: Two Fast Things That Go Fast Together

精选理由

在 Mac 上本地跑 LLM 的开发者可以试试这个:不用换硬件,Llama-3 和 Qwen 的首 token 延迟就能降 8.5–20%,关键是不损失精度。它把 Strassen-Winograd 算法实用化到 M 系列芯片上,比单纯调 mlx 参数的收益大。

论文提出 DropKS,一个包裹系统 GEMM 库的轻量工具,在 Apple M1–M4 统一内存芯片上用 Strassen-Winograd 亚立方复杂度矩阵乘法加速本地 LLM 推理。矩阵乘法占本地 LLM prompt 处理(prefill)运行时的 84–94%,这类芯片算力与内存带宽比相对均衡,适合用减少计算量、增加内存流量的 SW 算法。

正文

DropKS 针对约 2048x2048 以上的大矩阵生效,结合了优化版 SW 实现、把反量化折叠进相邻算子的 LLM 专用优化,以及 <bos> peeling——选择性剥离含大数值的行,修正低精度下 SW 算法易出现的数值误差。

实测中,DropKS 在 mlx-lm 里把 Llama-3 的首 token 时间(TTFT)降低 5.5–12.3%;对 4-bit 和 8-bit 量化的 8B Llama-3 与 27B Qwen 3.8 模型,TTFT 降低 8.5–20%,同时语料困惑度和 token 一致性保持不变。

原文 · arXiv cs.LG

Strassen-Winograd Matrix Multiplies and Apple Silicon: Two Fast Things That Go Fast Together

Matrix multiplication accounts for 84--94% of prompt-processing (prefill) runtime in local large language model (LLM) serving on Apple Silicon. Unified-memory Apple M1--M4 systems are designed with a relatively balanced compute/memory bandwidth ratio that makes using Strassen-Winograd-style sub-cubic matrix multiplication algorithms worthwhile: These algorithms reduce total computation at the expense of extra memory traffic. DropKS is a lightweight wrapper around system GEMM libraries that speeds large (roughly 2,048 x 2,048 and larger) matrix multiplies. It combines an optimized Strassen-Winograd implementation with LLM-specific folding of dequantization into adjacent operators, and corrects an important source of numerical error to which SW algorithms are vulnerable at low precision by selectively peeling rows with large values (<bos> peeling). End to end in mlx-lm, DropKS reduces time-to-first token, or TTFT, in Llama-3 by 5.5--12.3%. On 4-bit and 8-bit quantized 8B (Llama-3) and 27B (Qwen 3.8) models, the combination of techniques it provides reduces TTFT by 8.5--20% while preserving corpus perplexity and token agreement.

产业坐标与信源核验

本条情报归属 AITOP「论文」核心栏目,重点聚焦北美前沿实验室与硅谷科技巨头。在跨区域产业观察坐标中,该动态直接关联「AI 开发者工具链、Coding Agent 与工程化实践」研究主线,反映出当前技术演进与商业落地的最新风向。涉及核心实体与技术议题包括:Strassen-Winograd、Apple Silicon、Llama-3、Qwen,读者可通过下方标签进入对应专题页查阅历史脉络与关联对比。

信源核验说明:本文原始线索采编自「arXiv cs.LG」(@David G. Andersen),经 AITOP 多维评分管线结构化提炼。

发现摘要或翻译有误? 告诉我们