评估LLM推理优化在Apple Silicon上的适用性 Evaluating the Applicability of LLM Inference Optimizations on Apple Silicon 预印本

⚠️ 本文为 预印本(arXiv 公开版本),尚未经过正式同行评审。作者自发公开,结论未经期刊审稿验证,阅读时请知悉。
发布时间:2026-10-22
👁️ 预览文献
💡 AI 中文简介
研究在Apple Silicon上本地运行大语言模型时,服务器GPU上常用的推理优化是否依然有效。作者测试了KV缓存剪枝、推测解码、移植GPU内核和训练后量化四类方法,在四台Apple设备上对比。结果发现KV缓存剪枝最高提升1.75倍吞吐,推测解码反而降低吞吐,量化效果因设备而异。结论是优化效果不能只看技术本身,还取决于硬件和运行环境。
领域大语言模型推理优化与异构硬件适配
适合谁读需要一定专业背景(了解LLM推理和硬件加速基础)
核心贡献系统评估四类主流LLM推理优化在Apple Silicon上的实际效果,揭示优化收益是技术、运行时、硬件契约和工作负载共同作用的结果,而非技术本身的固有属性。
关键数据KV缓存剪枝在Apple上最高提升1.75倍端到端吞吐,但在桌面NVIDIA GPU上可能降低吞吐;推测解码在Apple上均降低吞吐(服务器GPU报告2-6倍加速);可移植的CUDA内核组件带来最高1.20倍解码吞吐提升;量化收益因机器而异。
推荐理由如果你以为服务器上的优化能直接搬到Mac上,这篇实测会颠覆你的认知——优化效果不是技术自带的,而是硬件和场景共同决定的。
关键词["LLM推理优化", "Apple Silicon", "KV缓存剪枝", "推测解码", "量化", "硬件适配"]

原文摘要

查看英文原文摘要

Apple Silicon is among the most widely used platforms for local LLM inference, yet nearly all inference optimizations are designed and validated on server-class NVIDIA GPUs under batched serving workloads. Which optimizations retain their benefits when moved to Apple Silicon, and what determines their applicability? We evaluate four optimization families: KV-cache pruning, speculative decoding, ported GPU kernels, and post-training quantization. Experiments span four Apple machines under a common single-request decode workload, with matched RTX 4090 comparisons where possible. KV-cache pruning can reach up to 1.75 times end-to-end throughput on Apple but can reduce throughput on desktop NVIDIA GPUs. Under the common benchmark, all evaluated speculative decoding methods reduce throughput on Apple, despite reported 2-6 times gains on server GPUs. CUDA kernel designs transfer only partially: public Metal lacks asynchronous copy, and batch-one decode makes several serving-oriented mechanisms inapplicable, although transferable components yield up to 1.20 times decode throughput. Quantization gains vary by machine. Across four families, a reported speedup is not a portable property of a technique alone but a joint function of technique, runtime, hardware contract, and workload regime.