Quantum Transformer: Accelerating model inference via quantum linear algebra
Centre for Quantum Technologies, National University of Singapore(新加坡国立大学量子技术中心);Department of Computer Science, University of Toronto(多伦多大学计算机科学系);Vector Institute for Artificial Intelligence(人工智能向量研究所);School of Computing, National University of Singapore(新加坡国立大学计算机学院);Department of Mathematics, National University of Singapore(新加坡国立大学数学系);NVIDIA Corporation(NVIDIA公司);Department of Chemistry, University of Toronto(多伦多大学化学系);Research Center for Emerging Computing Technologies, National Institute of Advanced Industrial Science and Technology (AIST)(新兴计算技术研究中心,日本国家先进工业科学与技术研究院);Quantum Computing Center, Keio University(Keio大学量子计算中心);Department of Materials Science & Engineering, University of Toronto(多伦多大学材料科学与工程系);Department of Chemical Engineering & Applied Chemistry, University of Toronto(多伦多大学化学工程与应用化学系);Lebovic Fellow, Canadian Institute for Advanced Research(加拿大高级研究研究院Lebovic研究员)
Naixu Guo, Zhan Yu, Matthew Choi, Yizhan Han, Aman Agrawal, Kouhei Nakaji, Alán Aspuru-Guzik, Patrick Rebentrost
Powerful generative artificial intelligence from large language models (LLMs) harnesses extensive computational resources for inference. In this work, we investigate the transformer architecture, a key component of these models, under the lens of fault-tolerant quantum computing. We develop quantum subroutines to construct the building blocks in the transformer, including the self-attention, residual connection with layer normalization, and feed-forward network. As an important subroutine, we show how to efficiently implement the Hadamard product and element-wise functions of matrices on quantum computers. Our algorithm prepares an amplitude encoding of the transformer output, which can be measured for prediction or use in the next layer. We find that the matrix norm of the input sequence plays a dominant role in the quantum complexity. With numerical experiments on open-source LLMs, including for bio-informatics applications, we demonstrate the potential of a quantum speedup for transformer inference in practical regimes.
The Sharpness Disparity Principle in Transformers for Accelerating Language Model Pre-Training
School of Mathematical Sciences, Peking University(北京大学数学科学学院);Center for Machine Learning Research, Peking University(北京大学机器学习研究中心);Shanghai Jiao Tong University(上海交通大学);AI for Science Institute, Beijing, China(北京人工智能科学研究院)
TR-BERT: Dynamic Token Reduction for Accelerating BERT Inference
Tsinghua University(清华大学);Beijing National Research Center for Information Science and Technology(北京信息科学与技术国家研究中心);Tencent Inc.(腾讯公司);Beijing Academy of Artificial Intelligence(北京智源人工智能研究院)
HIPPO: Accelerating Video Large Language Models Inference via Holistic-aware Parallel Speculative Decoding
University of Science and Technology of China(中国科学技术大学);Shanghai AI Laboratory(上海人工智能实验室);Department of Electronic Engineering, Tsinghua University(清华大学电子工程系)