更小的模型,意外的代价:LLM量化在自动程序修复中的权衡
Smaller Models, Unexpected Costs: Trade-offs in LLM Quantization for Automated Program Repair
AI总结:
研究LLM量化在自动程序修复中的效果,发现量化虽减少内存但增加推理时间和能耗,且修复问题集差异大,权衡受模型架构和任务复杂度影响。
摘要:
语言模型(LLMs)是强大的工具,已被越来越多地用于复杂的软件工程任务。随着参数数量的增加,结果通常可以改善,但这也会带来大量的内存需求。虽然量化有效减少了内存占用,但其整体影响通常仅通过基准分数来总结,这掩盖了模型行为和非功能性开销的变化。在这项工作中,我们使用自动程序修复(APR)——软件工程中的一项复杂任务——对LLM量化进行了实证评估。我们分析了跨越不同位宽、方法和目标组件(权重和KV缓存)的13种量化配置,涉及六个代表性LLM,并在两个APR基准(HumanEval-Java和Defects4J)上进行了评估。我们的发现表明,基础模型和量化模型可以提供不同的修复问题集,且重叠很少,同时保持可比较的修复问题数量。尽管量化成功地将内存占用减少了高达85%,但它增加了推理时间和能耗,我们将其归因于次优的硬件利用率。我们的帕累托权衡分析显示,48%的评估配置被严格支配。我们的发现并未识别出更优的量化方法,而是强调了有效性、内存占用和能效之间的权衡对底层模型架构和任务复杂性的敏感性。
英文摘要:
Large Language Models (LLMs) are powerful tools and have been increasingly adopted for complex software engineering tasks. As the number of parameters increases, results can often be improved, but this also imposes substantial memory requirements. While quantization effectively reduces the memory footprint, its overall impact is often summarized only by benchmark scores, which mask changes in model behavior and non-functional overheads. In this work, we conduct an empirical evaluation of LLM quantization using Automated Program Repair (APR), a complex task in software engineering. We analyze 13 quantization configurations spanning different bit-widths, methods, and target components (weights and KV-cache) across six representative LLMs, evaluated on two APR benchmarks (HumanEval-Java and Defects4J). Our findings reveal that base and quantized models can provide different sets of repaired problems with little overlap, while retaining a comparable number of repaired problems. Although quantization successfully reduces memory footprints by up to 85%, it increases both inference time and energy consumption, which we attribute to suboptimal hardware utilization. Our Pareto trade-off analysis shows that 48% of the configurations evaluated are strictly dominated by alternatives. Rather than identifying a superior quantization method, our findings highlight that the trade-offs between effectiveness, memory footprint, and energy efficiency are sensitive to the underlying model architecture and the complexity of the task.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。