arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2501.19317cs.CL
收藏

基于不同量化值的LLM情感文本生成质量

LLM-based Affective Text Generation Quality Based on Different Quantization Values

University of Stuttgart(斯图加特大学);University of Bamberg(班贝格大学)

Yarik Menchaca Resendiz, Roman Klinger

AI总结:

本文研究LLM情感文本生成中不同量化值、GPU内存与文本质量的权衡,发现降低精度可节省76%内存,但影响模型F1分数和推理时间,且低量化大模型表现优于高精度小模型。

摘要:

大型语言模型在语言生成和理解方面展现出卓越的能力。这些进步使得AI系统能够生成更类人且更具情感吸引力的文本。然而,这些模型依赖大量参数,在训练和推理时需要巨大的计算资源。在某些场景下,获取这些资源可能具有挑战性(例如,预算或硬件限制)。降低精度位数等技术可以使模型在内存使用上更高效,减少所需的计算资源,但代价是精度降低。本文探讨了情感文本生成(例如,“我非常喜欢在白雪皑皑的森林中奔跑”)中不同量化值、GPU RAM利用率和文本质量之间的权衡。为了进行评估,我们使用了一个情感分类器和十个种子提示来生成情感文本。我们在来自两个不同系列的五个开放权重语言模型上测试了三种精度位数设置(8、16和32)。我们的研究结果表明,减少位数可以节省内存,实现了76%的降幅。然而,这种优化也带来了权衡,导致较大模型的F1分数下降高达10个百分点,而较小模型的F1分数则增加了10个百分点,同时推理时间大约增加了一倍。在文本质量方面,处于较低量化水平的较大模型通常优于精度较高的小模型——同时所需内存相似。

英文摘要:

Large language models exhibit a remarkable capacity in language generation and comprehension. These advances enable AI systems to produce more human-like and emotionally engaging text. However, these models rely on a large number of parameters, requiring significant computational resources for training and inference. In some scenarios, accessing these resources can be challenging (e.g., budget or hardware limitations). Techniques like reducing precision bits can make models more memory-efficient, reducing the computational resources needed, at the cost of reduced accuracy. This paper addresses the trade-off between different quantization values, GPU RAM utilization, and text quality in affective text generation (e.g., "I really enjoy running in the snow-covered forest"). To evaluate, we use an emotion classifier and ten seed prompts to generate affective text. We test three setups of precision bits (8, 16, and 32) across five open-weight language models from two different families. Our findings demonstrate that bit reductions lead to memory savings, achieving a reduction of 76%. However, this optimization comes with a trade-off, leading to a decrease of up to 10 pp in F1 score for larger models and an increase of 10 pp for smaller models, along with roughly double the inference time. In terms of text quality, larger models at lower quantization levels generally outperform smaller, higher-precision models -- while requiring similar memory.

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

↑