Inference Acceleration for Large Language Models on CPUs

Ditto PS, Jithin VG, Adarsh MS
3/4/2024
cs.DCcs.CL

No confident code implementation found for this paper. 3 possible matches can be shown below.

Abstract

In recent years, large language models have demonstrated remarkable performance across various natural language processing (NLP) tasks. However, deploying these models for real-world applications often requires efficient inference solutions to handle the computational demands. In this paper, we explore the utilization of CPUs for accelerating the inference of large language models. Specifically, we introduce a parallelized approach to enhance throughput by 1) Exploiting the parallel processing capabilities of modern CPU architectures, 2) Batching the inference request. Our evaluation shows the accelerated inference engine gives an 18-22x improvement in the generated token per sec. The improvement is more with longer sequence and larger models. In addition to this, we can also run multiple workers in the same machine with NUMA node isolation to further improvement in tokens/s. Table 2, we have received 4x additional improvement with 4 workers. This would also make Gen-AI based products and companies environment friendly, our estimates shows that CPU usage for Inference could reduce the power consumption of LLMs by 48.9% while providing production ready throughput and latency.

View on arXivView PDF

Code Implementations

No confident code match yet

We couldn't find an author-owned or strongly-evidenced community implementation for this paper. 3 weaker matches are hidden by default — verify before relying on them.

No code implementations found yet.

Know of an implementation? Let us know in the comments below!

Similar Papers

Cite this paper

@article{ps2024inference,
  title  = {Inference Acceleration for Large Language Models on CPUs},
  author = {Ditto PS and Jithin VG and Adarsh MS},
  year   = {2024},
  eprint = {2406.07553},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2406.07553v1}
}

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/2406.07553.svg)](https://codeofpaper.com/paper/2406.07553)

Discussion