评估大语言模型推理优化在苹果硅芯片上的适用性
Evaluating the Applicability of LLM Inference Optimizations on Apple Silicon
AI总结:
该研究评估四类LLM推理优化在苹果硅芯片上的适用性,发现优化效果受技术、硬件、工作负载等共同影响,部分优化在苹果设备上的表现与服务器GPU存在差异。
摘要:
苹果硅芯片是本地大语言模型(LLM)推理最广泛使用的平台之一,但几乎所有推理优化都是在服务器级NVIDIA GPU上针对批量服务工作负载设计和验证的。哪些优化在迁移到苹果硅芯片时仍能保留其优势,以及什么因素决定了它们的适用性?我们评估四类优化:KV缓存剪枝、投机解码、移植的GPU内核、训练后量化。实验覆盖四台苹果设备,采用统一的单请求解码工作负载,尽可能匹配RTX 4090进行对比。KV缓存剪枝在苹果设备上可将端到端吞吐量提升至最高1.75倍,但会降低桌面NVIDIA GPU的吞吐量;在统一基准下,所有评估的投机解码方法在苹果设备上均降低吞吐量,尽管在服务器GPU上报告有2-6倍的增益;CUDA内核设计仅部分可迁移:公开的Metal缺乏异步复制,且单批次解码使多种面向服务的机制不适用,不过可迁移组件可带来最高1.20倍的解码吞吐量;量化增益因设备而异。在这四类优化中,技术本身的加速比并非可移植属性,而是技术、运行时、硬件契约和工作负载机制的共同函数。
英文摘要:
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.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。