Efficient LLM inference solution on Intel GPU

Hui Wu, Yi Gan, Feng Yuan, Jing Ma, Wei Zhu +6 more
12/19/2023
cs.ARcs.AI

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

Abstract

Transformer based Large Language Models (LLMs) have been widely used in many fields, and the efficiency of LLM inference becomes hot topic in real applications. However, LLMs are usually complicatedly designed in model structure with massive operations and perform inference in the auto-regressive mode, making it a challenging task to design a system with high efficiency. In this paper, we propose an efficient LLM inference solution with low latency and high throughput. Firstly, we simplify the LLM decoder layer by fusing data movement and element-wise operations to reduce the memory access frequency and lower system latency. We also propose a segment KV cache policy to keep key/value of the request and response tokens in separate physical memory for effective device memory management, helping enlarge the runtime batch size and improve system throughput. A customized Scaled-Dot-Product-Attention kernel is designed to match our fusion policy based on the segment KV cache solution. We implement our LLM inference solution on Intel GPU and publish it publicly. Compared with the standard HuggingFace implementation, the proposed solution achieves up to 7x lower token latency and 27x higher throughput for some popular LLMs on Intel GPU.

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. 4 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{wu2023efficient,
  title  = {Efficient LLM inference solution on Intel GPU},
  author = {Hui Wu and Yi Gan and Feng Yuan and Jing Ma and Wei Zhu and Yutao Xu and Hong Zhu and Yuhua Zhu and Xiaoli Liu and Jinghui Gu and Peng Zhao},
  year   = {2023},
  eprint = {2401.05391},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2401.05391v2}
}

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

Discussion