EdgeLLM-Nano:在33.6 MB端侧语言模型上审计极坐标引导的键缓存压缩与一致性锚定剪枝
EdgeLLM-Nano: Auditing Polar-Guided Key-Cache Compression and Consistency-Anchored Pruning on a 33.6 MB On-Device Language Model
AI总结:
EdgeLLM-Nano研究以33.6 MB端侧LM为测试平台,发现现有KV缓存压缩方法能效低于未压缩推理,LCDF评估可区分不同压缩后端,为改进该技术提供了有效途径。
摘要:
将语言模型(LMs)部署在边缘设备上会面临高性能计算中不存在的独特内存、延迟和功耗挑战。KV缓存压缩是解决这些挑战的一种有前景的方法,但当前KV缓存压缩方法在边缘设备上的有效性尚未得到彻底检验,且现有评估方法并不总是涉及被测KV缓存。我们提出EdgeLLM-Nano,这是一项使用拥有839万参数(即33.6 MB)的纳米级仅解码器语言模型(Transformer)测试平台开展的KV缓存压缩测量研究,可实现对每个后端、随机种子和功耗样本的端到端检验。我们的结果对极坐标引导的键缓存量化器给出了负面结论(最近舍入(RTN)控制造成的损害小一个数量级),同时对一致性锚定的渐进式权重剪枝器给出了负面结论(单次基于幅度的剪枝表现相当,甚至更优)。我们还引入了长上下文解码保真度(LCDF)评估,这是一种使用被测KV缓存对教师强制对数损失进行逐 token 检验的方法。与困惑度对所有方法都给出相同的5.461分不同,LCDF借助其跨随机种子的配对统计和效应量,能够区分不同的KV缓存压缩后端。我们配套的树莓派5(Raspberry Pi 5)测量显示,我们测试的所有压缩后端的每token能效均低于未压缩FP16推理。除了在LCDF方面接近无损的KIVI之外,我们的发现表明KV缓存压缩仍有改进空间,LCDF提供了一种简单有效的方法来揭示KV缓存压缩方法的负面效应,而这些负面效应已被困惑度所忽视。
英文摘要:
Deploying language models (LMs) on the edge presents unique memory, latency, and power challenges absent in high-performance computing. KV-cache compression emerges as a promising approach to address these challenges. However, the effectiveness of current KV-cache compression methods has not been thoroughly examined on edge devices. Moreover, we show that existing evaluation methods do not always involve the KV-cache under test. We propose EdgeLLM-Nano, a measurement study of KV-cache compression using a nano-scale decoder-only LM (transformer) testbed that has 8.39M parameters, i.e., 33.6 MB, to enable end-to-end examination of each backend, seed, and power sample. Our results give a negative verdict for a polar-guided key-cache quantizer (round-to-nearest (RTN) control causes an order of magnitude less damage), as well as a consistency-anchored progressive weight pruner (one-shot magnitude-based pruning performs as well as, if not better). We also introduce Long-Context Decode Fidelity (LCDF) evaluation, a token-by-token examination of teacher-forced log-losses using the KV-cache under test. Unlike perplexity that gives the same 5.461 score to all methods, LCDF distinguishes different KV-cache compression backends thanks to its paired statistics across seeds and effect sizes. Our companion Raspberry Pi 5 measurement shows all compression backends we tested to be less energy-efficient per token compared to uncompressed FP16 inference. Except for KIVI that is close to lossless in terms of LCDF, our findings indicate KV-cache compression can be improved. LCDF offers a simple and effective way of shedding light on KV-cache compression methods, whose negative impacts have been overlooked by perplexity.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。