Inference Performance Optimization for Large Language Models on CPUs
Pujiang He, Shan Zhou, Wenhuan Huang, Changqing Li, Duyi, Wang, Bin Guo, Chen Meng, Sheng Gui, Weifei Yu, Yi Xie

TL;DR
This paper presents a practical optimization method for accelerating large language model inference on CPUs, focusing on reducing KV cache size and implementing distributed inference to improve performance in resource-constrained environments.
Contribution
It introduces a novel, easily deployable CPU inference optimization technique, including KV cache reduction and distributed inference, with tailored solutions for popular models.
Findings
Significant speedup in LLM inference on CPUs
Effective KV cache size reduction without losing accuracy
Open-source implementation available
Abstract
Large language models (LLMs) have shown exceptional performance and vast potential across diverse tasks. However, the deployment of LLMs with high performance in low-resource environments has garnered significant attention in the industry. When GPU hardware resources are limited, we can explore alternative options on CPUs. To mitigate the financial burden and alleviate constraints imposed by hardware resources, optimizing inference performance is necessary. In this paper, we introduce an easily deployable inference performance optimization solution aimed at accelerating LLMs on CPUs. In this solution, we implement an effective way to reduce the KV cache size while ensuring precision. We propose a distributed inference optimization approach and implement it based on oneAPI Collective Communications Library. Furthermore, we propose optimization approaches for LLMs on CPU, and conduct…
Peer Reviews
No public reviews on file for this paper yet. If you reviewed it on a platform where reviews are public (OpenReview, ICLR, NeurIPS, ICML), you can paste yours below so the community can read it here.
Code & Models
Videos
No videos yet. Explain this paper in a talk, walkthrough, or lecture? Add one.
Taxonomy
TopicsTopic Modeling
MethodsSoftmax · Attention Is All You Need · Lib
