CQIL: Inference Latency Optimization with Concurrent Computation of Quasi-Independent Layers

Longwei Zou, Qingyang Wang, Han Zhao, Jiangang Kong, Yi Yang +1 more
4/10/2024
3 citations
cs.CL

Official code: Photooon/CQIL (6 stars, Python, last commit 2024-08-30).

Abstract

The fast-growing large scale language models are delivering unprecedented performance on almost all natural language processing tasks. However, the effectiveness of large language models are reliant on an exponentially increasing number of parameters.

Show full abstract

The overwhelming computation complexity incurs a high inference latency that negatively affects user experience. Existing methods to improve inference efficiency, such as tensor parallelism and quantization, target to reduce per-layer computing latency, yet overlook the cumulative latency due to the number of layers. Recent works on reducing the cumulative latency through layer removing, however, lead to significant performance drop. Motivated by the similarity of inputs among adjacent layers, we propose to identify quasi-independent layers, which can be concurrently computed to significantly decrease inference latency. We also introduce a bypassing technique to mitigate the effect of information loss. Empirical experiments of the proposed approach on the LLaMA models confirm that Concurrent Computation of Quasi-Independent Layers (CQIL) can reduce latency by up to 48.3% on LLaMA-33B, while maintaining a close level of performance.

View on arXivView PDF

Code Implementations(1)

Photooon/CQILOfficial100%

[ACL 2024] "CQIL: Inference Latency Optimization with Concurrent Computation of Quasi-Independent Layers" by Longwei Zou, Qingyang Wang, Han Zhao, Jiangang Kong, Yi Yang, Yangdong Deng

60Python, ShellMay 23, 20242 years ago

Similar Papers

Cite this paper

@article{zou2024cqil,
  title  = {CQIL: Inference Latency Optimization with Concurrent Computation of Quasi-Independent Layers},
  author = {Longwei Zou and Qingyang Wang and Han Zhao and Jiangang Kong and Yi Yang and Yangdong Deng},
  year   = {2024},
  eprint = {2404.06709},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2404.06709v2}
}

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

Discussion