paperbot · PL 论文追踪

全部论文 待读 收藏

P2 Towards Greener Yet Powerful Code Generation via Quantization: An Empirical Study

迈向更绿色却更强大的代码生成:基于量化的实证研究
FSE Proceedings of the 31st ACM Joint European Software Engineering Conference and Symposium on the Foundations of Software Engineering2023匹配度 2/10 · 该论文研究代码生成大模型的量化压缩与绿色部署,属于LLM自身效率优化,而非用户核心关注的静态分析、Agentic程序分析、浮点程序分析或贝叶斯程序分析。虽然涉及机器学习与程序语言,但与研究方向交集较弱。引用 40 inbox
Xiaokai Wei, Sujan Kumar Gonugondla, Shiqi Wang, Wasi Ahmad, Baishakhi Ray, Haifeng Qian, Xiaopeng Li, Varun Kumar, Zijian Wang, Yuchen Tian, Qing Sun, Ben Athiwaratkun, Mingyue Shang, Murali Krishna Ramanathan, Parminder Bhatia, Bing Xiang
crossref: 2026-09-12dblp: 2026-09-12

AI 速览

一句话:实证研究表明,代码感知的量化配方能让 60 亿参数代码生成模型在普通笔记本上运行,且精度与鲁棒性无明显下降。

ML 驱动的代码生成借助大规模预训练模型显著提升了开发者效率,但庞大的参数量给普通笔记本或中型服务器上的部署带来了内存、延迟、成本与碳足迹方面的沉重负担。本文提出用模型压缩中的量化技术来应对这一挑战,因为量化无需昂贵的重训练,仅把模型参数量化为低比特整数(如 int8)即可同时缩减模型体积与运行时延迟。作者在代码生成任务上从三个维度系统评估量化模型:资源占用与碳足迹、准确率、鲁棒性。通过系统性实验,他们总结出一套代码感知(code-aware)的量化配方,使 60 亿参数的模型也能在普通笔记本上运行而不显著损失准确率与鲁棒性,并发现该配方可直接迁移到代码摘要任务。

问题
大型预训练代码生成模型参数量巨大,在开发者常用的笔记本或中型服务器上部署会带来高昂的内存、延迟、费用与碳足迹代价。
方法
采用无需昂贵重训练的量化方法,将模型参数量化为低比特整数(如 int8),并在代码生成任务上系统比较不同量化配置。
评估
从资源占用与碳足迹、准确率、鲁棒性三个维度对量化模型进行系统性实验,找出可在普通笔记本上运行 60 亿参数模型且性能不显著退化的量化配方,并验证其在代码摘要任务上的可迁移性。
原文摘要(Abstract)

ML-powered code generation aims to assist developers to write code in a more productive manner by intelligently generating code blocks based on natural language prompts. Recently, large pretrained deep learning models have pushed the boundary of code generation and achieved impressive performance. However, the huge number of model parameters poses a significant challenge to their adoption in a typical software development environment, where a developer might use a standard laptop or mid-size server to develop code. Such large models cost significant resources in terms of memory, latency, dollars, as well as carbon footprint. Model compression is a promising approach to address these challenges. We have identified quantization as one of the most promising compression techniques for code-generation as it avoids expensive retraining costs. As quantization represents model parameters with lower-bit integer (e.g., int8), the model size and runtime latency would both benefit. We empirically evaluate quantized models on code generation tasks across different dimensions: (i) resource usage and carbon footprint, (ii) accuracy, and (iii) robustness. Through systematic experiments we find a code-aware quantization recipe that could run even a 6-billion-parameter model in a regular laptop without significant accuracy or robustness degradation. We find that the recipe is readily applicable to code summarization task as well.

链接与引用

DOI 原文 · PDF(开放获取) · DBLP

BibTeX
@inproceedings{WeiG0ARQLKWTSAS23,
  title = {Towards Greener Yet Powerful Code Generation via Quantization: An Empirical Study},
  author = {Xiaokai Wei and Sujan Kumar Gonugondla and Shiqi Wang and Wasi Ahmad and Baishakhi Ray and Haifeng Qian and Xiaopeng Li and Varun Kumar and Zijian Wang and Yuchen Tian and Qing Sun and Ben Athiwaratkun and Mingyue Shang and Murali Krishna Ramanathan and Parminder Bhatia and Bing Xiang},
  booktitle = {FSE},
  year = {2023},
  doi = {10.1145/3611643.3616302}
}