Skip to main content
CenXiv.org
此网站处于试运行阶段,支持我们!
我们衷心感谢所有贡献者的支持。
贡献
赞助
cenxiv logo > cs > arXiv:2507.09665v1

帮助 | 高级搜索

计算机科学 > 软件工程

arXiv:2507.09665v1 (cs)
[提交于 2025年7月13日 ]

标题: 量化是决定性因素吗? 来自大型代码模型的实证见解

标题: Is Quantization a Deal-breaker? Empirical Insights from Large Code Models

Authors:Saima Afrin, Bowen Xu, Antonio Mastropaolo
摘要: 随着大型语言模型(LLMs)规模的不断扩大,不仅需要大量的计算资源,还由于其不断增加的碳足迹而引发了环境问题。模型量化作为一种有效的方法,可以在不显著影响性能的情况下减少LLMs的资源需求(例如,从16位降至4位)。尽管最近的研究已经将量化确立为优化大型代码模型(LCMs)的一种有前景的方法,LCMs是专为自动化软件工程设计的LLM的一个子集,但它们的发现仅提供了有限的实际意义见解。具体来说,当前的研究仅关注量化模型生成的代码的功能正确性,忽略了量化如何影响代码质量的关键方面,如可靠性、可维护性和安全性。为了弥补这一差距,我们的研究调查了量化对自动生成代码定性方面的影响。我们将感知激活的权重量化(AWQ)应用于两个广泛使用的代码模型CodeLlama和DeepSeekCoder,以生成Java和Python代码。使用最先进的静态分析工具,我们评估了软件质量指标和静态特征,包括循环复杂度、认知复杂度和代码行数。我们的研究结果表明,量化是一种稳健的技术,不仅保持了功能正确性,还保留了开发者所追求的关键定性代码属性,如可维护性和结构简单性。
摘要: The growing scale of large language models (LLMs) not only demands extensive computational resources but also raises environmental concerns due to their increasing carbon footprint. Model quantization emerges as an effective approach that can reduce the resource demands of LLMs by decreasing parameter precision without substantially affecting performance (e.g., 16 bit to 4 bit). While recent studies have established quantization as a promising approach for optimizing large code models (LCMs), a specialized subset of LLMs tailored for automated software engineering, their findings offer only limited insights into its practical implications. Specifically, current investigations focus only on the functional correctness of the code generated by quantized models, neglecting how quantization impacts critical aspects of code quality such as reliability, maintainability, and security. To bridge this gap, our study investigates the effects of quantization on the qualitative aspects of automatically generated code. We apply Activation-aware Weight Quantization (AWQ) to two widely used code models, CodeLlama and DeepSeekCoder, to generate Java and Python code. Using state-of-the-art static analysis tools, we evaluate software quality metrics and static features including cyclomatic complexity, cognitive complexity, and lines of code. Our findings reveal that quantization is a robust technique that not only preserves functional correctness, but also retains key qualitative code attributes sought after by developers, such as maintainability and structural simplicity.
主题: 软件工程 (cs.SE)
引用方式: arXiv:2507.09665 [cs.SE]
  (或者 arXiv:2507.09665v1 [cs.SE] 对于此版本)
  https://doi.org/10.48550/arXiv.2507.09665
通过 DataCite 发表的 arXiv DOI

提交历史

来自: Saima Afrin [查看电子邮件]
[v1] 星期日, 2025 年 7 月 13 日 14:58:19 UTC (326 KB)
全文链接:

获取论文:

    查看标题为《》的 PDF
  • 查看中文 PDF
  • 查看 PDF
  • HTML(实验性)
  • TeX 源代码
  • 其他格式
许可图标 查看许可
当前浏览上下文:
cs.SE
< 上一篇   |   下一篇 >
新的 | 最近的 | 2025-07
切换浏览方式为:
cs

参考文献与引用

  • NASA ADS
  • 谷歌学术搜索
  • 语义学者
a 导出 BibTeX 引用 加载中...

BibTeX 格式的引用

×
数据由提供:

收藏

BibSonomy logo Reddit logo

文献和引用工具

文献资源探索 (什么是资源探索?)
连接的论文 (什么是连接的论文?)
Litmaps (什么是 Litmaps?)
scite 智能引用 (什么是智能引用?)

与本文相关的代码,数据和媒体

alphaXiv (什么是 alphaXiv?)
CatalyzeX 代码查找器 (什么是 CatalyzeX?)
DagsHub (什么是 DagsHub?)
Gotit.pub (什么是 GotitPub?)
Hugging Face (什么是 Huggingface?)
带有代码的论文 (什么是带有代码的论文?)
ScienceCast (什么是 ScienceCast?)

演示

复制 (什么是复制?)
Hugging Face Spaces (什么是 Spaces?)
TXYZ.AI (什么是 TXYZ.AI?)

推荐器和搜索工具

影响之花 (什么是影响之花?)
核心推荐器 (什么是核心?)
IArxiv 推荐器 (什么是 IArxiv?)
  • 作者
  • 地点
  • 机构
  • 主题

arXivLabs:与社区合作伙伴的实验项目

arXivLabs 是一个框架,允许合作伙伴直接在我们的网站上开发和分享新的 arXiv 特性。

与 arXivLabs 合作的个人和组织都接受了我们的价值观,即开放、社区、卓越和用户数据隐私。arXiv 承诺这些价值观,并且只与遵守这些价值观的合作伙伴合作。

有一个为 arXiv 社区增加价值的项目想法吗? 了解更多关于 arXivLabs 的信息.

这篇论文的哪些作者是支持者? | 禁用 MathJax (什么是 MathJax?)
  • 关于
  • 帮助
  • contact arXivClick here to contact arXiv 联系
  • 订阅 arXiv 邮件列表点击这里订阅 订阅
  • 版权
  • 隐私政策
  • 网络无障碍帮助
  • arXiv 运营状态
    通过...获取状态通知 email 或者 slack

京ICP备2025123034号