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

优化小型语言模型用于电子商务的性能权衡

Performance Trade-offs of Optimizing Small Language Models for E-Commerce

Faculty of Informatics(信息学院);Juraj Dobrila University of Pula(朱拉·多布里拉大学)

Josip Tomo Licardo, Nikola Tankovic

AI总结:

本文研究优化十亿参数Llama 3.2模型用于电子商务意图识别,通过QLoRA微调和量化,实现99%准确率并匹配GPT-4.1,同时揭示了硬件依赖的性能权衡。

摘要:

大型语言模型(LLMs)在自然语言理解和生成任务中提供了最先进的性能。然而,将领先的商业模型部署到诸如电子商务等专门任务中,常常受到高计算成本、延迟和运营费用的阻碍。本文研究了较小规模的开源权重模型作为一种资源高效替代方案的可行性。我们提出了一种优化十亿参数Llama 3.2模型用于多语言电子商务意图识别的方法。该模型使用量化低秩适配(QLoRA)在合成生成的数据集上进行微调,该数据集旨在模拟真实世界的用户查询。随后,我们应用了训练后量化技术,创建了GPU优化(GPTQ)和CPU优化(GGUF)版本。我们的结果表明,专门的1B模型达到了99%的准确率,与显著更大的GPT-4.1模型的性能相匹配。详细的性能分析揭示了关键的、依赖硬件的权衡:虽然4位GPTQ将VRAM使用量减少了41%,但在较旧的GPU架构(NVIDIA T4)上,由于反量化开销,它反而使推理速度减慢了82%。相反,CPU上的GGUF格式与FP16基线相比,推理吞吐量实现了高达18倍的加速,并且RAM消耗减少了超过90%。我们得出结论,经过适当优化的小型开源权重模型不仅是可行的,而且是领域特定应用更合适的替代方案,以极小的计算成本提供了最先进的准确性。

英文摘要:

Large Language Models (LLMs) offer state-of-the-art performance in natural language understanding and generation tasks. However, the deployment of leading commercial models for specialized tasks, such as e-commerce, is often hindered by high computational costs, latency, and operational expenses. This paper investigates the viability of smaller, open-weight models as a resource-efficient alternative. We present a methodology for optimizing a one-billion-parameter Llama 3.2 model for multilingual e-commerce intent recognition. The model was fine-tuned using Quantized Low-Rank Adaptation (QLoRA) on a synthetically generated dataset designed to mimic real-world user queries. Subsequently, we applied post-training quantization techniques, creating GPU-optimized (GPTQ) and CPU-optimized (GGUF) versions. Our results demonstrate that the specialized 1B model achieves 99% accuracy, matching the performance of the significantly larger GPT-4.1 model. A detailed performance analysis revealed critical, hardware-dependent trade-offs: while 4-bit GPTQ reduced VRAM usage by 41%, it paradoxically slowed inference by 82% on an older GPU architecture (NVIDIA T4) due to dequantization overhead. Conversely, GGUF formats on a CPU achieved a speedup of up to 18x in inference throughput and a reduction of over 90% in RAM consumption compared to the FP16 baseline. We conclude that small, properly optimized open-weight models are not just a viable but a more suitable alternative for domain-specific applications, offering state-of-the-art accuracy at a fraction of the computational cost.

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

↑