LayerSkip: Enabling Early Exit Inference and Self-Speculative Decoding
FAIR at Meta(Meta FAIR研究院);GenAI at Meta(Meta GenAI部门);Reality Labs at Meta(Meta Reality Labs);University of Toronto(多伦多大学);University of Wisconsin-Madison(威斯康星大学麦迪逊分校);Dana-Farber Cancer Institute(丹娜法伯癌症研究院);Carnegie Mellon University(卡内基梅隆大学)
Mostafa Elhoushi, Akshat Shrivastava, Diana Liskovich, Basil Hosmer, Bram Wasti, Liangzhen Lai, Anas Mahmoud, Bilge Acun, Saurabh Agarwal, Ahmed Roman, Ahmed A … 展开作者
Mostafa Elhoushi, Akshat Shrivastava, Diana Liskovich, Basil Hosmer, Bram Wasti, Liangzhen Lai, Anas Mahmoud, Bilge Acun, Saurabh Agarwal, Ahmed Roman, Ahmed A Aly, Beidi Chen, Carole-Jean Wu
We present LayerSkip, an end-to-end solution to speed-up inference of large language models (LLMs). First, during training we apply layer dropout, with low dropout rates for earlier layers and higher dropout rates for later layers, and an early exit loss where all transformer layers share the same exit. Second, during inference, we show that this training recipe increases the accuracy of early exit at earlier layers, without adding any auxiliary layers or modules to the model. Third, we present a novel self-speculative decoding solution where we exit at early layers and verify and correct with remaining layers of the model. Our proposed self-speculative decoding approach has less memory footprint than other speculative decoding approaches and benefits from shared compute and activations of the draft and verification stages. We run experiments on different Llama model sizes on different types of training: pretraining from scratch, continual pretraining, finetuning on specific data domain, and finetuning on specific task. We implement our inference solution and show speedups of up to 2.16x on summarization for CNN/DM documents, 1.82x on coding, and 2.0x on TOPv2 semantic parsing task. We open source our code and checkpoints at https://github.com/facebookresearch/LayerSkip.
FlexEE: Self-Speculative and KV-Compatible Early Exiting for Offloading-Aware LLM Inference
University of Science and Technology of China(中国科学技术大学);Institute of Artificial Intelligence, Hefei Comprehensive National Science Center(合肥综合性国家科学中心人工智能研究院)
Component-Aware Self-Speculative Decoding in Hybrid Language Models
organization= VRAIN -- Valencian Research Institute for Artificial Intelligence, Universitat Polit\`ecnica de Val\`encia , city= Valencia , country= Spain;organization= Department of Economics;organization= Department of Business Organisation, Universitat Polit\`ecnica de Val\`encia , city= Valencia , country= Spain
QuickSilver -- Speeding up LLM Inference through Dynamic Token Halting, KV Skipping, Contextual Token Fusion, and Adaptive Matryoshka Quantization
Manipal University Jaipur(马尼帕尔大学斋浦尔分校);Vellore Institute of Technology(韦洛尔理工学院);NIT Silchar(西尔查尔国立理工学院);Harrisburg University of Science and Technology(哈里斯堡科技大学);Meta AI;Amazon AI;IISER Kolkata(加尔各答印度科学教育与研究所);BITS Pilani, Goa(比尔拉理工学院果阿分校)
SpecBound: Adaptive Bounded Self-Speculation with Layer-wise Confidence Calibration
Key Laboratory of Intelligent Information Processing, Institute of Computing Technology, Chinese Academy of Sciences(智能信息处理重点实验室,计算技术研究所,中国科学院);State Key Laboratory of AI Safety, Institute of Computing Technology, Chinese Academy of Sciences(人工智能安全国家重点实验室,计算技术研究所,中国科学院);University of Chinese Academy of Sciences, Beijing, China(中国科学院大学,北京,中国)
What Layers When: Learning to Skip Compute in LLMs with Residual Gates
Humboldt University Berlin(洪堡大学柏林);Qualcomm-UvA Lab, University of Amsterdam(高通-乌得勒支实验室,阿姆斯特丹大学);FunAI Lab, University of Technology Nuremberg(FunAI实验室,纽伦堡技术大学)
A rigor-matched audit of periodic-step layer skipping for efficient llm inference: conflayers versus swift, with a supplemental analysis of trained routing alternatives