{"slug": "fast-inference-from-transformers-via-speculative-decoding", "title": "Fast Inference from Transformers via Speculative Decoding", "summary": "Researchers introduced speculative decoding, an algorithm that accelerates inference from large autoregressive models like Transformers by computing several tokens in parallel without changing outputs. Demonstrated on T5-XXL, the method achieves 2X-3X acceleration compared to the standard T5X implementation, with identical outputs, and requires no retraining or architecture changes.", "body_md": "# Computer Science > Machine Learning\n\n  [Submitted on 30 Nov 2022 (\n\n[v1](https://arxiv.org/abs/2211.17192v1)), last revised 18 May 2023 (this version, v2)]\n# Title:Fast Inference from Transformers via Speculative Decoding\n\n[View PDF](/pdf/2211.17192)\n\n[HTML (experimental)](https://arxiv.org/html/2211.17192v2)\n\nAbstract:Inference from large autoregressive models like Transformers is slow - decoding K tokens takes K serial runs of the model. In this work we introduce speculative decoding - an algorithm to sample from autoregressive models faster without any changes to the outputs, by computing several tokens in parallel. At the heart of our approach lie the observations that (1) hard language-modeling tasks often include easier subtasks that can be approximated well by more efficient models, and (2) using speculative execution and a novel sampling method, we can make exact decoding from the large models faster, by running them in parallel on the outputs of the approximation models, potentially generating several tokens concurrently, and without changing the distribution. Our method can accelerate existing off-the-shelf models without retraining or architecture changes. We demonstrate it on T5-XXL and show a 2X-3X acceleration compared to the standard T5X implementation, with identical outputs.\n    \n\n## Submission history\n\nFrom: Yaniv Leviathan [\n[view email](/show-email/502d584e/2211.17192)]\n\n**Wed, 30 Nov 2022 17:33:28 UTC (186 KB)**\n\n[\\[v1\\]](/abs/2211.17192v1)\n**[v2]** Thu, 18 May 2023 20:28:20 UTC (433 KB)\n\n### References & Citations\n\nLoading...\n\n# Bibliographic and Citation Tools\n\nBibliographic Explorer \n\n*(*[What is the Explorer?](https://info.arxiv.org/labs/showcase.html#arxiv-bibliographic-explorer))\nConnected Papers \n\n*(*[What is Connected Papers?](https://www.connectedpapers.com/about))\nLitmaps \n\n*(*[What is Litmaps?](https://www.litmaps.co/))\nscite Smart Citations \n\n*(*[What are Smart Citations?](https://www.scite.ai/))\n# Code, Data and Media Associated with this Article\n\nalphaXiv \n\n*(*[What is alphaXiv?](https://alphaxiv.org/))\nCatalyzeX Code Finder for Papers \n\n*(*[What is CatalyzeX?](https://www.catalyzex.com))\nDagsHub \n\n*(*[What is DagsHub?](https://dagshub.com/))\nGotit.pub \n\n*(*[What is GotitPub?](http://gotit.pub/faq))\nHugging Face \n\n*(*[What is Huggingface?](https://huggingface.co/huggingface))\nScienceCast \n\n*(*[What is ScienceCast?](https://sciencecast.org/welcome))\n# Demos\n\n# Recommenders and Search Tools\n\nInfluence Flower \n\n*(*[What are Influence Flowers?](https://influencemap.cmlab.dev/))\nCORE Recommender \n\n*(*[What is CORE?](https://core.ac.uk/services/recommender))\nIArxiv Recommender\n\n*(*[What is IArxiv?](https://iarxiv.org/about))\n# arXivLabs: experimental projects with community collaborators\n\narXivLabs is a framework that allows collaborators to develop and share new arXiv features directly on our website.\n\nBoth individuals and organizations that work with arXivLabs have embraced and accepted our values of openness, community, excellence, and user data privacy. arXiv is committed to these values and only works with partners that adhere to them.\n\nHave an idea for a project that will add value for arXiv's community? [**Learn more about arXivLabs**](https://info.arxiv.org/labs/index.html).", "url": "https://wpnews.pro/news/fast-inference-from-transformers-via-speculative-decoding", "canonical_source": "https://arxiv.org/abs/2211.17192", "published_at": "2026-09-07 09:00:00+00:00", "updated_at": "2026-09-07 21:30:28.236129+00:00", "lang": "en", "topics": ["artificial-intelligence", "machine-learning", "large-language-models", "ai-research"], "entities": ["T5-XXL", "T5X"], "alternates": {"html": "https://wpnews.pro/news/fast-inference-from-transformers-via-speculative-decoding", "markdown": "https://wpnews.pro/news/fast-inference-from-transformers-via-speculative-decoding.md", "text": "https://wpnews.pro/news/fast-inference-from-transformers-via-speculative-decoding.txt", "jsonld": "https://wpnews.pro/news/fast-inference-from-transformers-via-speculative-decoding.jsonld"}}