arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2410.14766cs.SEcs.AIcs.ETcs.LGcs.PL
收藏

在低资源语言基准上评估量化大语言模型的代码生成能力

Evaluating Quantized Large Language Models for Code Generation on Low-Resource Language Benchmarks

School of Computer Science and IT(计算机科学与信息技术学院);University College Cork(科克大学学院)

Enkhbold Nyamsuren

AI总结:

本文评估量化对70亿参数代码LLM在Lua低资源代码生成任务上的影响,发现4位整数精度在消费级设备上实现最佳性能与模型大小权衡,但整体可用性仍低于基础大模型。

摘要:

人工智能的民主化是更广泛的数字鸿沟议题中的一个重要主题。这一问题与LLM密切相关,LLM作为AI副驾驶正变得越来越流行,但由于高计算需求而缺乏可及性。在本研究中,我们评估量化是否是一种在通用消费设备上启用LLM的可行方法。该研究评估了五个量化代码LLM在Lua代码生成任务中的性能。为了评估量化的影响,具有70亿参数的模型在消费级笔记本电脑上以2位、4位和8位整数精度进行了测试,并与具有13亿、20亿和30亿参数的非量化代码LLM进行了比较。选择Lua作为一种低层级资源语言,以避免模型对高资源语言的偏见。结果表明,以4位整数精度量化的模型在性能和模型大小之间提供了最佳权衡。这些模型可以轻松部署在没有专用GPU的普通笔记本电脑上。在2位整数精度下,性能显著下降。8位整数精度的模型需要更多的推理时间,但并未有效转化为更好的性能。具有70亿参数的4位模型在存储和内存需求方面具有可比的模型大小,但性能也显著优于参数数量较少的非量化模型。虽然量化确实提高了具有70亿参数的较小LLM的可及性,但这些LLM在Lua代码生成等高精度和低资源任务上表现出整体较低的性能(低于50%)。虽然可及性得到了改善,但可用性仍未达到与GPT-4o或Llama 3.1 405B等基础LLM相当的实际水平。

英文摘要:

Democratization of AI is an important topic within the broader topic of the digital divide. This issue is relevant to LLMs, which are becoming popular as AI co-pilots but suffer from a lack of accessibility due to high computational demand. In this study, we evaluate whether quantization is a viable approach toward enabling LLMs on generic consumer devices. The study assesses the performance of five quantized code LLMs in Lua code generation tasks. To evaluate the impact of quantization, the models with 7B parameters were tested on a consumer laptop at 2-, 4-, and 8-bit integer precisions and compared to non-quantized code LLMs with 1.3, 2, and 3 billion parameters. Lua is chosen as a low-level resource language to avoid models' biases related to high-resource languages. The results suggest that the models quantized at the 4-bit integer precision offer the best trade-off between performance and model size. These models can be comfortably deployed on an average laptop without a dedicated GPU. The performance significantly drops at the 2-bit integer precision. The models at 8-bit integer precision require more inference time that does not effectively translate to better performance. The 4-bit models with 7 billion parameters also considerably outperform non-quantized models with lower parameter numbers despite having comparable model sizes with respect to storage and memory demand. While quantization indeed increases the accessibility of smaller LLMs with 7 billion parameters, these LLMs demonstrate overall low performance (less than 50\%) on high-precision and low-resource tasks such as Lua code generation. While accessibility is improved, usability is still not at the practical level comparable to foundational LLMs such as GPT-4o or Llama 3.1 405B.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑