As Large Language Models (LLMs) have made significant advancements across various tasks, such as question answering, translation, text summarization, and dialogue systems, the need for accuracy in information becomes crucial, especially for serious financial products serving billions of users like Alipay. However, for a real-world product serving millions of users, the inference speed of LLMs becomes a critical factor compared to a mere experimental model.
Hence, this paper presents a generic framework for accelerating the inference process, resulting in a substantial increase in speed and cost reduction for our LLM-based scenarios, with lossless generation accuracy. In the traditional inference process, each token is generated sequentially by the LLM, leading to a time consumption proportional to the number of generated tokens. To enhance this process, our framework, named \textit{lookahead}, introduces a \textit{multi-branch} strategy. Instead of generating a single token at a time, we propose a Trie-based retrieval and verification mechanism to be able to accept several tokens at a forward step. Our strategy offers two distinct advantages: (1) it guarantees absolute correctness of the output, avoiding any approximation algorithms, and (2) the worst-case performance of our approach is equivalent to the conventional process. We conduct extensive experiments to demonstrate the significant improvements achieved by applying our inference acceleration framework. Our framework is widely deployed in Alipay since April 2023, and obtain remarkable 2.66x to 6.26x speedup. Our code is available at https://github.com/alipay/PainlessInferenceAcceleration.
To Compress or Not? Pushing the Frontier of Lossless GenAI Model Weights Compression with Exponent Concentration
Dept. of Electrical and Computer Engineering, Rice University(电气与计算机工程系, Rice大学);Dept. of Computer Science, Rice University(计算机科学系, Rice大学);Lambda, Inc.(Lambda公司);Dept. of Computer Science, Stevens Institute of Technology(计算机科学系, Stevens Institute of Technology)
Johns Hopkins University(约翰霍普金斯大学);University of Alberta(阿尔伯塔大学);University of British Columbia(不列颠哥伦比亚大学);Avey Research Center(艾维研究中心);Google DeepMind(谷歌DeepMind);University of California(加州大学)
APT-LLM: Exploiting Arbitrary-Precision Tensor Core Computing for LLM Acceleration
School of Electronic Science and Engineering, Nanjing University(南京大学电子科学与技术学院);Shanghai Qi Zhi Institute(上海启智研究院);School of Integrated Circuits, Sun Yat-sen University(中山大学集成电路学院)
Medusa: Simple LLM Inference Acceleration Framework with Multiple Decoding Heads
Princeton University(普林斯顿大学);Together AI;University of Illinois Urbana-Champaign(伊利诺伊大学厄巴纳-香槟分校);Carnegie Mellon University(卡内基梅隆大学);University of Connecticut(康涅狄格大学)
Traversal Verification for Speculative Tree Decoding
Lenovo AI Technology Center, Lenovo(联想人工智能技术中心,联想);National Center for Mathematics and Interdisciplinary Sciences (NCMIS), AMSS, CAS(国家数学与交叉科学中心(NCMIS),中国科学院数学研究所)
SAM Decoding: Speculative Decoding via Suffix Automaton
School of Information, Renmin University of China(中国人民大学信息学院);Key Laboratory of Data Engineering and Knowledge Engineering(数据工程与知识工程重点实验室);Knowledge Engineering Group, Tsinghua University(清华大学知识工程组);Engineering Research Center of Database and Business Intelligence(数据库与商业智能工程研究中心)
Efficient Inference for Large Language Model-based Generative Recommendation
National University of Singapore(新加坡国立大学);Tsinghua University(清华大学);University of Science and Technology of China(中国科学技术大学);The Hong Kong Polytechnic University(香港理工大学)