{"id":"arxiv:2403.09919","kind":"preprint","title":"Recurrent Drafter for Fast Speculative Decoding in Large Language Models","authors":["Yunfei Cheng","Aonan Zhang","Xuanyu Zhang","Chong Wang","Yi Wang"],"author_count":5,"year":2024,"published":"2024-03-14","venue":null,"cited_by":null,"doi":null,"arxiv_id":"2403.09919","nct_id":null,"source_url":"https://arxiv.org/abs/2403.09919","archive_url":"https://space-kitty.com/papers/arxiv:2403.09919","updated":"2024-12-13","pmid":null,"pmcid":null,"openalex_id":null,"pdf_url":"https://arxiv.org/pdf/2403.09919","abstract":"We present Recurrent Drafter (ReDrafter), an advanced speculative decoding approach that achieves state-of-the-art speedup for large language models (LLMs) inference. The performance gains are driven by three key aspects: (1) leveraging a recurrent neural network (RNN) as the draft model conditioning on LLM's hidden states, (2) applying a dynamic tree attention algorithm over beam search results to eliminate duplicated prefixes in candidate sequences, and (3) training through knowledge distillation from the LLM. ReDrafter accelerates Vicuna inference in MT-Bench by up to 2.8x with a PyTorch implementation on Nvidia H100 GPUs. To demonstrate its practicality in real environments, we also validated its effectiveness for on-device applications by implementing the approach in MLX and benchmarking performance on Metal GPUs in Apple Silicon chips, achieving up to 2.3x speedup.","abstract_license":"CC0-1.0 (arXiv descriptive metadata)","license":null,"is_open_access":false,"retracted":false,"peer_reviewed":false,"categories":["cs.CL","cs.LG"],"details":null,"provenance":"arxiv","attribution":"Abstract: arXiv descriptive metadata (CC0). Thank you to arXiv for use of its open access interoperability. This service was not reviewed or approved by, nor does it necessarily express or reflect the policies or opinions of, arXiv.","topics":[],"cited_in_dossiers":[]}