Efficient LLM Inference on CPUs

Haihao Shen, Hanwen Chang, Bo Dong, Yu Luo, Hengyu Meng
11/1/2023
cs.LGcs.AIcs.CL

Official code: intel/intel-extension-for-transformers (2,177 stars, Apache-2.0, last commit 2024-10-08).

Abstract

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.

View on arXivView PDF

Code Implementations(1)

Apache-2.0

⚡ Build your chatbot within minutes on your favorite device; offer SOTA compression techniques for LLMs; run LLMs efficiently on Intel Platforms⚡

2,177216C, C++Nov 11, 20222 years agoApache-2.0
4-bitsautoroundchatbotchatpdfgaudi3+11 more

Similar Papers

Cite this paper

@article{shen2023efficient,
  title  = {Efficient LLM Inference on CPUs},
  author = {Haihao Shen and Hanwen Chang and Bo Dong and Yu Luo and Hengyu Meng},
  year   = {2023},
  eprint = {2311.00502},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2311.00502v2}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2311.00502.svg)](https://codeofpaper.com/paper/2311.00502)

Discussion