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(康涅狄格大学)
Tianle Cai, Yuhong Li, Zhengyang Geng, Hongwu Peng, Jason D. Lee, Deming Chen, Tri Dao
Large Language Models (LLMs) employ auto-regressive decoding that requires sequential computation, with each step reliant on the previous one's output. This creates a bottleneck as each step necessitates moving the full model parameters from High-Bandwidth Memory (HBM) to the accelerator's cache. While methods such as speculative decoding have been suggested to address this issue, their implementation is impeded by the challenges associated with acquiring and maintaining a separate draft model. In this paper, we present Medusa, an efficient method that augments LLM inference by adding extra decoding heads to predict multiple subsequent tokens in parallel. Using a tree-based attention mechanism, Medusa constructs multiple candidate continuations and verifies them simultaneously in each decoding step. By leveraging parallel processing, Medusa substantially reduces the number of decoding steps required. We present two levels of fine-tuning procedures for Medusa to meet the needs of different use cases: Medusa-1: Medusa is directly fine-tuned on top of a frozen backbone LLM, enabling lossless inference acceleration. Medusa-2: Medusa is fine-tuned together with the backbone LLM, enabling better prediction accuracy of Medusa heads and higher speedup but needing a special training recipe that preserves the backbone model's capabilities.
Moreover, we propose several extensions that improve or expand the utility of Medusa, including a self-distillation to handle situations where no training data is available and a typical acceptance scheme to boost the acceptance rate while maintaining generation quality. We evaluate Medusa on models of various sizes and training procedures. Our experiments demonstrate that Medusa-1 can achieve over 2.2x speedup without compromising generation quality, while Medusa-2 further improves the speedup to 2.3-3.6x.
Jakiro: Boosting Speculative Decoding with Decoupled Multi-Head via MoE
Advanced Micro Devices, Inc.(超威半导体公司);Institute of Artificial Intelligence and Robotics, Xi'an Jiaotong University(西安交通大学人工智能与机器人研究所);University of HongKong(香港大学)
Parallel Decoding via Hidden Transfer for Lossless Large Language Model Acceleration
Wangxuan Institute of Computer Technology, Peking University(北京大学王选计算机研究所);Center for Data Science, AAIS, Peking University(北京大学AAIS数据科学中心);Meituan(美团);Meta AI;National Key Laboratory of General Artificial Intelligence(通用人工智能全国重点实验室);BIGAI(北京智源人工智能研究院)
Gumiho: A Hybrid Architecture to Prioritize Early Tokens in Speculative Decoding
Advanced Micro Devices, Inc., Beijing, China(Advanced Micro Devices公司,北京);Department of Electrical and Electronic Engineering, The University of Hong Kong(香港大学电子与电气工程系);Institute of Artificial Intelligence and Robotics, Xi’an Jiaotong University(西安交通大学人工智能与机器人研究所)
DeCoRe: Decoding by Contrasting Retrieval Heads to Mitigate Hallucinations
University of Edinburgh(爱丁堡大学);Centre for AI, Data Science & Artificial Intelligence, R&D, AstraZeneca(阿斯利康研发中心人工智能、数据科学与人工智能中心);University College London(伦敦大学学院)
Distance-KV: Exploiting Relative Distance for Efficient Long-Context Inference
Inner Mongolia University(内蒙古大学);Shenzhen Loop Area Institute(深圳河套学院);Sun Yat-sen University(中山大学);Kyoto University(京都大学);The Hong Kong University of Science and Technology (Guangzhou)(香港科技大学(广州))
A Comparative Analysis of LLM Memorization at Statistical and Internal Levels: Cross-Model Commonalities and Model-Specific Signatures
Department of Computer Science, The University of Tokyo(东京大学计算机科学系);Research and Development Center for Large Language Models, National Institute of Informatics(信息学研究院大语言模型研究与开发中心)
Pair-In, Pair-Out: Latent Multi-Token Prediction for Efficient LLMs
Gaoling School of Artificial Intelligence, Renmin University of China(中国人民大学首都人工智能学院);AI Platform, Xiaohongshu Inc.(小红书人工智能平台);University of Electronic Science and Technology of China(电子科技大学);Institute of Automation, Chinese Academy of Sciences(中国科学院自动化研究所)
Which Heads Matter for Reasoning? RL-Guided KV Cache Compression
Westlake University(西华大学);McGill University(麦吉尔大学);Mila - Quebec AI Institute(魁北克AI研究院);Zhejiang University(浙江大学);Mohamed bin Zayed University of Artificial Intelligence(穆罕默德·本·扎耶德智能大学)
Efficient Beam Search for Large Language Models Using Trie-Based Decoding
Department of Computer Science, National Chengchi University(国立成功大学计算机科学系);Department of Computer Science, Cornell University(康奈尔大学计算机科学系);Institute of Information Science, Academia Sinica(中华科学研究院资讯研究所)
Improving Contextual Faithfulness of Large Language Models via Retrieval Heads-Induced Optimization
Harbin Institute of Technology(哈尔滨工业大学);Peng Cheng Laboratory(鹏城实验室);Northeastern University(东北大学);The University of Hong Kong(香港大学);iFLYTEK Research(讯飞研究院)
DeLS-Spec: Decoupled Long-Short Contexts for Parallel Speculative Drafting
College of Artificial Intelligence, Nanjing University of Aeronautics and Astronautics(南京航空航天大学人工智能学院);MIIT Key Laboratory of Pattern Analysis and Machine Intelligence(工业和信息化部模式分析与机器智能重点实验室);The Key Laboratory of Brain-Machine Intelligence Technology, Ministry of Education(教育部脑机智能技术重点实验室)