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

在 CPU 上实现高效的 LLM 推理

Efficient LLM Inference on CPUs

Intel(英特尔)

Haihao Shen, Hanwen Chang, Bo Dong, Yu Luo, Hengyu Meng

AI总结:

针对大语言模型在 CPU 上部署受限于内存容量与带宽的问题,本文提出自动 INT4 仅权重量化流程及优化运行时内核,在 Llama2、Llama、GPT-NeoX 上验证了高效推理能力。

摘要:

大语言模型(LLM)已在广泛任务中展现出卓越性能和巨大潜力。然而,由于模型参数数量极其庞大,部署这些模型一直具有挑战性,因为这需要大容量内存和高内存带宽。本文提出一种有效方法,可使 LLM 的部署更加高效。我们支持自动化的 INT4 仅权重量化流程,并设计了一个专用 LLM 运行时,其中包含高度优化的内核,以加速 CPU 上的 LLM 推理。我们在包括 Llama2、Llama 和 GPT-NeoX 在内的流行 LLM 上证明了该方法的普遍适用性,并展示了其在 CPU 上的极致推理效率。代码公开发布于:https://github.com/intel/intel-extension-for-transformers。

英文摘要:

Large language models (LLMs) have demonstrated remarkable performance and tremendous potential across a wide range of tasks. However, deploying these models has been challenging due to the astronomical amount of model parameters, which requires a demand for large memory capacity and high memory bandwidth. In this paper, we propose an effective approach that can make the deployment of LLMs more efficiently. We support an automatic INT4 weight-only quantization flow and design a special LLM runtime with highly-optimized kernels to accelerate the LLM inference on CPUs. We demonstrate the general applicability of our approach on popular LLMs including Llama2, Llama, GPT-NeoX, and showcase the extreme inference efficiency on CPUs. The code is publicly available at: https://github.com/intel/intel-extension-for-transformers.

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

↑