Fast Inference from Transformers via Speculative Decoding
Paper · 2022 · Yaniv Leviathan, Matan Kalman and Yossi Matias
Summary
Generating text takes time because each new token depends on the tokens already produced. A large language model must ordinarily complete a prediction before the next prediction can begin. Even when the hardware can perform substantial work in parallel, this dependency keeps generation moving through a sequence of expensive steps. Fast Inference from Transformers via Speculative Decoding addresses that delay: can a system prepare several likely continuations, check them together, and still produce exactly the probability distribution that the original system defines?
The authors introduce speculative decoding, which pairs an expensive target with a cheaper approximation. The approximation proposes a short continuation. The target then evaluates the proposed positions together, allowing the system to keep a stretch of accepted tokens after a single verification stage. When a proposal fails, the algorithm replaces it through a carefully adjusted sampling rule. This rule, called speculative sampling, is the paper’s central contribution. It preserves the target’s distribution for any proposal distribution; a poor approximation reduces efficiency instead of invalidating the mathematical guarantee.
The distinction between preserving a distribution and reproducing a particular random sample matters. Under stochastic generation, the guarantee concerns the probabilities of possible outputs. It does not require separate executions to emit the same sentence simply because they begin with the same prompt. Under greedy generation, where decoding selects the highest-scoring token, the method can preserve the target’s deterministic decisions. Neither version requires the target’s architecture or training procedure to change. Existing checkpoints can supply both the target and the approximation.
The practical experiments accelerate T5-XXL, with 11B parameters, on English-to-German translation and news summarization. Against the T5X implementation, the reported translation speedups are 2.6X for standard sampling and 3.4X for greedy decoding. The corresponding summarization results are 2.3X and 3.1X. The authors also measure how well smaller approximations match targets in unconditional generation and dialogue, although those measurements are not end-to-end timing demonstrations. Their analysis explains the tradeoff: successful proposals reduce sequential target work and repeated memory traffic, while rejected proposals consume arithmetic that produces no usable continuation.
The method therefore belongs to a particular kind of efficiency improvement. It can reduce latency by putting otherwise available computation to work concurrently. It does not promise fewer arithmetic operations, universal acceleration, or better answers than the target would produce. Its strongest result is more specific: when the hardware has spare computation and a cheap predictor supplies useful guesses, generation can become substantially faster while retaining the target’s output distribution.
Interesting ideas
Preserve the expensive system’s authority. The approximation supplies candidates, while the target determines what can enter the final output. This separates the source of speed from the source of correctness. The same design principle applies whenever a cheap procedure can anticipate an expensive procedure’s decisions, but replacing those decisions would be unacceptable. The paper makes this separation especially useful by proving that candidate quality affects acceptance and speed without becoming an assumption needed for exact sampling.
Correct probability mass explicitly. A rejected guess cannot simply be replaced through an arbitrary fallback if the objective is to preserve a distribution. The algorithm identifies where the proposal supplied too much probability and where the target still needs probability assigned. Sampling from that remaining mass repairs the imbalance. This is a reusable lesson for stochastic systems: a shortcut can remain exact when its correction accounts for what the shortcut has already contributed.
Measure compatibility with the actual acceptance rule. General predictive quality does not by itself determine a proposal’s usefulness here. The paper measures overlap between the target and proposal distributions, because that overlap directly determines acceptance. For another speculative system, the useful proxy may likewise be the probability that prepared work survives verification. Choosing an approximation against the operational acceptance criterion can be more informative than choosing it against a familiar but indirect benchmark.
Optimize time and work separately. The method can perform more arithmetic while finishing sooner. That distinction prevents an operation count from being treated as a complete measure of efficiency. It is relevant wherever memory movement, communication, or synchronization leaves arithmetic resources underused. A good evaluation should identify the scarce resource, then measure whether a proposed optimization actually relieves it.
Choose the proposal length together with the proposer. A longer draft creates more opportunities to advance after verification, but it also costs more to produce and leaves more work exposed to rejection. Likewise, a larger approximation may improve acceptance while taking too long to justify its use. The paper’s analysis combines these effects rather than treating draft quality, draft length, and execution cost as separate tuning problems. This reasoning applies to lookahead, batching, and other systems that prepare uncertain future work.
Start with inexpensive structure. A useful proposal need not be another large neural network. The authors measure non-zero acceptance for simple n-gram approximations and suggest copying matching stretches from context where repetition is likely. Such proposals exploit regularity already present in the task. They are worth considering when deployment simplicity matters or when a sophisticated predictor would consume most of the time it is meant to save.
Separate exact acceleration from relaxed acceleration. The paper explores a lenient variant, but keeps it distinct from its distribution-preserving results. This is a valuable reporting practice. If an optimization changes the behavioral contract, its speed should be interpreted under that changed contract. Keeping the distinction visible makes comparisons meaningful and prevents an optional approximation from obscuring the stronger guarantee of the main method.
Deep dive: Fast Inference from Transformers via Speculative Decoding
How speculative decoding speeds up text generation while preserving its probability distribution, with the sampling proof, experiments and limits. · about 36 minutes to read
How Mova uses it
For Mova, the small transparent language system written in Rust, the clearest application is a prospective decoding design. There is no established implementation or timing result here that would justify saying Mova already performs speculative decoding. The useful connection is architectural: Mova could keep an authoritative next-token distribution while allowing a cheaper mechanism to propose continuations.
A transparent implementation could expose the evidence behind each accepted token. For a proposed token, it could retain the probability assigned by the proposal, the probability assigned by the target, and the acceptance decision. If rejection occurs, it could expose the remaining probability mass used for correction. These records would make the acceleration understandable at the level where the paper’s guarantee operates. A reader could inspect why a token survived verification rather than seeing only that a draft was accepted.
A modest proposal mechanism would fit this goal better than an assumption that another substantial neural component is necessary. The paper’s measured n-gram acceptance and its suggested context-copying heuristic offer concrete starting points. If Mova encounters a prefix that matches an earlier passage, a proposal could continue from that passage. If it has a small table of local continuations, that table could supply a distribution. Both are possible applications of the paper’s framework, rather than claims about components already built.
The important requirement is that a proposal and its probabilities remain explicit. Speculative sampling uses the proposal distribution in its acceptance and correction calculations. A heuristic that supplies only a token without a defined probability interpretation would need an appropriate formulation before it could participate in the exact algorithm. The paper permits unrestricted choices of approximation, but the sampling procedure still operates on distributions over compatible candidate outputs.
Mova would also need a reason to expect a speed benefit. A small system may spend its time in a different place from the large Transformer configurations studied by the authors. If its target computation already uses the available arithmetic capacity, speculative work could add overhead. If it cannot evaluate several proposed positions efficiently together, the central concurrency advantage may disappear. The paper therefore motivates measuring proposal cost, acceptance, and actual elapsed time before making any performance claim.
A practical investigation could begin with those measurements instead of a complicated adaptive design. Mova could compare ordinary generation with a fixed proposal mechanism and a fixed draft length, while tracking how much proposed work survives verification. Exactness checks would concern the resulting probability distribution, not merely whether a few example sentences look similar. The paper’s mathematical argument supplies the intended contract; an implementation would still have to realize it correctly.
The broader lesson for Mova is that transparency and acceleration can support each other. A cheap component may do useful preparatory work without quietly taking over the authoritative prediction. The target remains responsible for the distribution, while the proposal makes likely future computation available earlier. Whether that arrangement is worthwhile for Mova remains an engineering question, not a result established by the T5 experiments.
The problem and its context
Why sequential generation is expensive
An autoregressive system predicts an output from the output that precedes it. For text generation, this means that a continuation grows token by token. A token is the unit over which the system predicts; it need not correspond to a complete word. The paper describes the ordinary decoding dependency with a simple observation: producing K tokens requires K sequential evaluations of the target.
This dependency creates a latency problem distinct from the cost of an individual evaluation. Making each evaluation faster helps, but generation still waits for successive decisions. Increasing the available parallel arithmetic does not automatically remove that wait. The next continuation position depends on a token that has not yet been selected.
The authors focus on large Transformers, whose individual decoding steps are expensive. Their motivation draws on the capability gap between larger and smaller systems, citing examples from language and image generation. The practical tension is familiar: the target is desirable because of what it can do, yet using it at every generation step carries a substantial time cost.
A naive response would be to let a smaller system generate more of the output. That can be faster, but it changes whose predictions define the result. Another response would be to generate several tokens simultaneously through a specially trained architecture. That can address the dependency more directly, but it may require training or architectural changes. The paper instead asks how much concurrency can be recovered while leaving the existing target in charge.
Earlier approaches described by the authors
The paper divides earlier efficiency methods into broad groups. Some reduce the cost of inference relatively uniformly. The examples include distillation, sparsification, quantization, and architectural changes. These approaches alter what computation is performed or how much each operation costs. They address the expense of using a large predictor across its inputs.
Other approaches allocate computation according to difficulty. An easy prediction may not need the same resources as a hard prediction. The cited examples include restricted attention and early exits. Such systems try to identify when a shortcut is sufficient and then avoid some computation.
The authors acknowledge the practical effectiveness of these methods. Their objection is not that adaptive computation is misguided. It is that these approaches commonly require modified architectures, altered training, or retraining, and generally do not guarantee the original outputs. A heuristic decision that a shortcut is adequate can preserve task quality without preserving every probability assigned by the original target.
The paper discusses Wisdom of Committees as a particularly relevant example because it can use existing smaller systems. Even there, the stopping decision is heuristic. The smaller components help decide when enough computation has been performed, but that decision does not provide the exact distributional contract sought here.
Speculative decoding borrows the observation that some predictions are easier than others, while using it differently. Easy predictions become good opportunities to prepare work in advance. Verification and probability correction then protect the target’s behavior. The approximation is not asked to judge its own adequacy through a confidence threshold.
The hardware opportunity
The second part of the motivation concerns the execution bottleneck. The authors observe that large-system inference can be limited by memory bandwidth or communication rather than arithmetic. Under those conditions, arithmetic resources may be available while the system waits for data movement.
This is why doing additional computation can help. If several candidate positions can share an efficient target evaluation, more useful tokens may emerge from each expensive stage of accessing the target’s state. The paper connects this opportunity to parallel computing, but its argument is conditional on actual resource availability. An arithmetic-saturated configuration offers a different situation.
The paper’s approach comes from speculative execution, a general optimization in which work begins before the system knows whether that work will be required. Branch prediction provides the authors’ familiar example. Correct predictions allow useful work to finish earlier; incorrect predictions cause prepared work to be discarded.
Text sampling adds a complication. A future token is not always a single deterministic answer waiting to be discovered. Under stochastic decoding, it is selected from a probability distribution. Speculation must therefore account for probabilities, rather than merely compare a guess with a fixed answer. The paper’s novel sampling procedure addresses that complication.
The closest decoding predecessors
The authors identify Blockwise Parallel Decoding and Shallow Aggressive Decoding as earlier uses of speculation for autoregressive generation. Both prepare more than a single future token, but their supported settings differ from this paper’s objective.
As described by the authors, Blockwise Parallel Decoding supports greedy generation, uses a specially trained component, and emphasizes preserving downstream task quality. It does not supply the general stochastic guarantee developed here. Shallow Aggressive Decoding exploits similarity between input and output by copying input material. That makes it suitable for tasks such as grammatical error correction, where much of the source may remain unchanged, but limits the proposal mechanism.
The contribution is thus more specific than generating several tokens at once. It is a method for using general proposals in stochastic decoding while retaining the target distribution, coupled with an analysis of when that method should save time. The authors also treat their approach as potentially complementary to other efficiency methods. Reducing the cost of target computation and reducing its sequential repetition can address different parts of the same execution problem.
The method, step by step
Begin with an authoritative distribution
The target is denoted Mₚ. Given an existing prefix, it supplies the distribution from which the next token should be drawn.
p(xₜ | x₍<t₎)
Here, p is the target’s probability distribution, xₜ is the token at position t, and x₍<t₎ is the sequence preceding that position. The vertical bar means that the distribution is conditioned on the prefix. The method’s objective is to accelerate sampling from this distribution without replacing it.
A cheaper approximation, M_q, supplies another distribution over the same next-token choices.
q(xₜ | x₍<t₎)
Here, q is the proposal distribution, while xₜ and x₍<t₎ have the same meanings as before. M_q may approximate the target well or poorly. Correctness does not require a particular degree of similarity, although useful acceleration does.
The target and approximation therefore have different responsibilities. The approximation predicts what might be useful to prepare. The target defines the probabilities that the completed algorithm must respect. Keeping these responsibilities separate is what allows an inexpensive proposer to help without becoming a substitute for the target.
Express the decoding policy as a distribution
Before describing acceptance, the authors standardize the sampling problem. Greedy decoding, temperature adjustment, top-k filtering, and nucleus sampling can all be represented as transformations of a probability distribution followed by ordinary sampling.
For greedy decoding, probability outside the highest-scoring choice is removed and the remaining mass is normalized. Other decoding rules reshape or restrict the distribution differently. Once the transformation is complete, speculative sampling works with the resulting p and q.
This step determines exactly what is preserved. If the target is meant to use a particular sampling policy, the guarantee concerns its distribution after that policy has been applied. The algorithm is not simultaneously preserving every possible temperature or filtering choice.
In the experiments, the authors apply the same kind of standardization to the target and approximation. They identify different transformations as a possible future source of improvement. The exact sampling argument itself is framed in terms of the resulting distributions.
Propose a short continuation
The approximation generates a sequence of guesses, with each guess conditioned on the earlier guesses. The number of proposed tokens is γ, a positive integer. A longer draft exposes more future positions for parallel verification, but also requires more proposal work.
The overall cycle is:
A speculative decoding iteration
The steps in order.
The proposal stage is ordinarily autoregressive in the paper’s tested setup. The approximation generates a token, extends its prefix, then generates the next proposal. Because this component is cheap, its sequential work may cost much less than repeating the target for those positions.
Crucially, the algorithm retains the proposal probabilities associated with each guess. Verification needs more than the guessed token’s identity. It needs to know how likely that token was under q, because acceptance compares proposal probability with target probability.
Once the draft exists, all the relevant candidate prefixes are known. The target can evaluate the next-token distributions for those prefixes together. These include the original prefix and the successive prefixes extended by proposed tokens. The resulting distributions support verification of the draft and sampling beyond it if every proposal survives.
Decide whether a proposal can be kept
Consider a single position and temporarily omit the prefix from the notation. A token x has been drawn from q. Its acceptance probability is:
a(x) = min(1, p(x) / q(x))
Here, a(x) is the probability of accepting the proposed token x, p(x) is its target probability, and q(x) is its proposal probability. The minimum caps acceptance at certainty. Because x was sampled from q, the relevant proposed event has probability under that distribution.
If the target assigns at least as much probability to x as the proposal does, the guess is always accepted. If the proposal assigns more probability, only a suitable fraction of those proposals can be kept. Otherwise, the accepted stream would overrepresent that token relative to the target.
This rule does not ask whether the target ranks x first. A token can be acceptable even when other tokens have higher target probabilities. That is essential for stochastic decoding, where valid outputs include more than the most likely continuation.
The rule also avoids treating all uncertainty as failure. A proposal distribution can differ from the target and still contribute useful probability mass. The accepted contribution is precisely the part that both distributions can support.
Repair the first rejection
When a guess is rejected, the algorithm does not merely sample again from the unchanged target distribution. Doing so would fail to account for the probability already contributed by accepted proposals. Instead, it samples from a residual distribution:
p′(x) = norm(max(0, p(x) − q(x)))
Here, p′ is the correction distribution. For every candidate x, the expression removes proposal mass from target mass and clips negative values to zero. The operation norm divides the remaining values by their sum so that they form a probability distribution.
The residual emphasizes tokens to which the target assigns more probability than the proposal supplies. Those are the places where the accepted-proposal route has left probability unfilled. A correction drawn from this residual fills that gap.
If a draft token is rejected, every later draft token belongs to a continuation based on a prefix that will no longer be used. The algorithm discards those later proposals and their speculative target computations. It commits the accepted prefix and the correction, then starts another iteration.
If all proposed tokens are accepted, the final target distribution already computed after the draft supplies an additional token. This extra output matters for efficiency: a fully successful iteration advances beyond the proposed stretch rather than stopping at its end.
As a consequence, an iteration produces at least a single token and at most γ + 1 tokens. Even immediate rejection still yields a correction. The count of sequential target verification stages therefore cannot exceed the ordinary target-step count for the same output length, although total execution time can still increase through overhead.
Why the correction is exact
The proof divides the probability of returning a candidate into an accepted-proposal route and a rejected-proposal route. The first route contributes:
P(accepted and output = z) = min(q(z), p(z))
Here, P denotes probability, and z is any particular candidate token. The expression gives the joint probability that a proposal is accepted and the returned token is z. It follows from multiplying the probability of proposing z by its acceptance probability.
Let β denote the overall acceptance probability at the current prefix. The rejected route contributes:
P(rejected and output = z) = (1 − β)p′(z) = p(z) − min(q(z), p(z))
Here, β is the chance that the proposal is accepted, so 1 − β is the chance of rejection. The correction distribution p′ supplies exactly the target mass missing from the accepted route. The token z, and distributions p and q, retain their previous meanings.
Adding the routes gives:
P(output = z) = min(q(z), p(z)) + p(z) − min(q(z), p(z)) = p(z)
Here, the returned token’s total probability equals its target probability. The shared mass appears through acceptance, and the remaining target mass appears through correction. Together they reconstruct p.
The normalization of the residual can also be written explicitly:
p′(z) = (p(z) − min(q(z), p(z))) / (1 − β)
Here, the numerator is the unfilled target mass at z, and the denominator is the total unfilled mass across candidates. When rejection is impossible, that correction branch is unnecessary.
This argument applies at each committed prefix. The longer speculative draft does not weaken it, because later positions are retained only while their conditioning prefixes survive. Once a rejection changes the prefix, computations based on its abandoned continuation are discarded.
The proof is independent of the forecast of how much speed the method will achieve. Exactness follows from the sampling construction. The efficiency analysis adds assumptions about acceptance patterns and execution cost, but those assumptions are not prerequisites for the probability guarantee.
Measure how much probability overlaps
The paper defines a prefix-specific acceptance rate β. Averaging the acceptance rule over proposals gives:
β = ∑ₓ q(x) min(1, p(x) / q(x)) = ∑ₓ min(p(x), q(x))
Here, ∑ₓ means summation over candidate tokens x. The rate β is the total probability mass shared by p and q. This provides an operational measure of approximation quality: it directly predicts how often proposed work can be retained at that prefix.
The authors relate this overlap to a symmetric divergence. They first define the midpoint distribution:
M(x) = (p(x) + q(x)) / 2
Here, M is the average of the target and proposal distributions at candidate x. It is a mathematical reference distribution, distinct from the named target Mₚ and approximation M_q.
The divergence is:
D_LK(p, q) = ∑ₓ |p(x) − M(x)| = ∑ₓ |q(x) − M(x)|
Here, D_LK measures how far either distribution lies from their midpoint when absolute differences are summed across candidates. The vertical bars indicate absolute value. Symmetry follows because both distributions are compared with the same midpoint.
The useful overlap identity is:
D_LK(p, q) = 1 − ∑ₓ min(p(x), q(x))
Here, the divergence is the probability mass not shared by the distributions. It is zero when the distributions match and reaches its maximum when their supports do not overlap. Accordingly, acceptance and divergence are complementary quantities.
Across prefixes, the paper uses α for the expected acceptance rate:
α = E(β) = 1 − E(D_LK(p, q)) = E(∑ₓ min(p(x), q(x)))
Here, E denotes expectation over the prefixes under consideration. The scalar α summarizes how well the approximation supports the target’s decisions across a task. It should not be confused with the probability of a particular token or a conventional accuracy score.
Estimate progress per verification stage
For its main performance analysis, the paper assumes the prefix-specific acceptance rates behave as independent, identically distributed quantities. This simplifies a potentially varying process into a calculation based on α.
E(N) = (1 − α^(γ + 1)) / (1 − α)
Here, N is the number of committed tokens from an iteration, E(N) is its expected value, α is average acceptance, and γ is the proposed draft length. The exponent describes the repeated opportunities for proposals to survive until the draft ends.
The distribution is a capped version of a geometric process. An iteration advances through accepted guesses until the first rejection, with an additional output supplied either by correction or after complete acceptance. The cap comes from the fixed draft length.
This equation explains why a strong proposer can reduce the number of sequential target stages substantially. It also explains diminishing returns from longer drafts: distant positions are useful only if the earlier proposals survive. Increasing the maximum possible progress does not guarantee that the algorithm frequently reaches it.
Add the cost of producing the draft
Acceptance alone does not determine elapsed time. The paper defines a timing coefficient:
c = time for a proposal evaluation / time for a target evaluation
Here, c compares the elapsed time of a single approximation evaluation with a single target evaluation. It depends on the hardware and implementation, not just the distributions.
Under the assumption that the target evaluations needed for a draft can execute together without increasing target-stage latency, the expected speedup is:
S = (1 − α^(γ + 1)) / ((1 − α)(γc + 1))
Here, S is the predicted walltime improvement factor relative to ordinary decoding. The numerator and first denominator term describe expected progress. The factor γc + 1 accounts for generating the draft and then performing target verification.
The authors report c below 0.05 in their experiments, frequently close enough to zero to contribute little. Nevertheless, a larger approximation can become unattractive even if it improves α. The right objective is useful committed progress per unit time.
The paper gives a simple sufficient condition for a beneficial setting:
α > c
Here, the approximation’s average acceptance exceeds its relative evaluation time. Under the timing assumptions, this ensures that some positive draft length can improve latency.
For the shortest draft, the corresponding factor is:
S = (1 + α) / (1 + c)
Here, S again denotes predicted speedup, while α and c retain their previous meanings. This expression makes the competition between usable guesses and proposal overhead particularly clear.
The full timing analysis assumes sufficiently long outputs. Every generation must still incur target verification, so very short outputs cannot realize arbitrarily large gains. Startup work and the end of generation matter more when there is little continuation over which to distribute them.
Count arithmetic independently
The paper introduces a different coefficient for operation count:
ĉ = proposal operations per token / target operations per token
Here, ĉ compares arithmetic work rather than time. It need not equal c, because execution can be limited by memory access or communication.
The expected operation increase is:
A = ((1 − α)(γĉ + γ + 1)) / (1 − α^(γ + 1))
Here, A is the ratio of arithmetic operations to the ordinary-decoding baseline. The term γĉ accounts for draft generation, while γ + 1 accounts for the target evaluations prepared concurrently. The denominator reflects the expected committed progress.
A rejection wastes work on the abandoned continuation. High acceptance reduces that waste, but proposal generation still has a cost. This is why the method can improve time while increasing arithmetic.
Memory traffic can move in the opposite direction. The authors explain that target weights and the key-value cache can be read once for an iteration. The key-value cache stores attention information associated with previously processed tokens. Sharing its access across a speculative stage can reduce repeated reads as several tokens become committed together.
This distinction is central to the method’s intended operating regime. It exchanges spare arithmetic capacity for less sequential waiting and potentially less repeated memory movement. It should therefore be assessed against the resources of the actual deployment.
Choose the draft length and approximation
For measured c and estimated α, the authors propose selecting the integer γ that maximizes the speedup expression. This is a numerical choice over possible draft lengths. A longer draft is justified only while its additional expected progress compensates for its cost.
The paper also considers changing γ during generation. Acceptance varies with the prefix, so a fixed task average cannot represent every local opportunity. A difficult stretch might warrant a short draft, while a predictable stretch could support more lookahead.
An idealized oracle analysis gives:
E(N) = 1 / (1 − α)
Here, N is committed progress under the idealized adaptive setting, and α is average acceptance. This expression is an analytical bound used to motivate future work, not the result of a deployed adaptive controller.
For typical parameter values considered by the authors, they describe an additional potential gain of up to ∼60% under unbounded computation. That claim depends on the oracle scenario and continued target verification. It should not be combined with the measured T5 speedups as if it were an implemented improvement.
The tested neural approximations share their target’s architecture family and use existing checkpoints. The authors also discuss negligible-cost alternatives, including n-gram lookup and copying from matching context. Non-autoregressive proposals are another possibility: they could replace sequential draft generation with a single proposal call. Custom training, direct optimization for α, and a hierarchy of increasingly cheap proposers remain research directions rather than requirements of the demonstrated method.
Experiments and results
What was timed
The end-to-end latency experiments use T5 version 1.1 in an encoder-decoder configuration. T5-XXL, with 11B parameters, is the target for both evaluated tasks. The baseline is decoding through T5X, which the authors describe as an optimized implementation.
For machine translation, the task is English-to-German generation using checkpoints fine-tuned on WMT EnDe. For text summarization, the task uses the CNN/DM news setting, written CCN/DM in the setup passage. These are different conditional-generation tasks: the output must respond to a source input rather than continue an unconstrained text stream.
The neural proposal choices are T5-small with 77M parameters, T5-base with 250M, and T5-large with 800M. The authors use existing checkpoints throughout. The experiment therefore tests an inference procedure applied to available systems, instead of the combined effect of a new proposal-training method and a new decoder.
Timing uses batch size 1 on a single TPU-v4. The authors evaluate both standard sampling at temp=1 and greedy decoding at temp=0. These conditions matter because the speedup is a latency result in a particular execution configuration. It is not a measurement across every serving load or device arrangement.
The reported metric is a walltime improvement factor relative to ordinary T5X decoding. A higher factor means less elapsed time for the speculative procedure under the comparison. The probability guarantee is supported separately by the sampling proof; the timing result measures the computational benefit of implementing that procedure.
Translation and summarization speedups
T5-small provides the strongest measured acceleration among the tested approximation sizes. On translation, speculative decoding reaches 2.6X with standard sampling and 3.4X with greedy decoding.
T5-XXL on WMT EnDe, measured walltime speedup by sampling policy
Greedy decoding achieves the larger speedup with the T5-small proposer.
The numbers
| System or setting | walltime speedup factor |
|---|---|
| Speculative decoding, temp=1 | 2.6 |
| Speculative decoding, temp=0 (this paper) | 3.4 |
These settings preserve different target distributions. The greedy setting is more concentrated, and the paper observes better acceptance there. The chart compares the acceleration obtained under each policy; it should not be read as a comparison of translation quality.
The corresponding news-summarization speedups are 2.3X for standard sampling and 3.1X for greedy decoding.
T5-XXL on CNN/DM, measured walltime speedup by sampling policy
Greedy decoding also provides the larger acceleration on summarization.
The numbers
| System or setting | walltime speedup factor |
|---|---|
| Speculative decoding, temp=1 | 2.3 |
| Speculative decoding, temp=0 (this paper) | 3.1 |
The summarization gains are somewhat smaller than the translation gains under the matching sampling settings. The paper does not need to attribute that difference to a change in output quality: the purpose is to keep the target behavior fixed while changing execution.
The headline discussion describes practical acceleration as 2X–3X, while the detailed task results include the individual factors above. Those individual measurements give the more precise picture of the tested conditions. They should remain attached to their tasks, proposal choice, and sampling policy.
What acceptance was measured beyond timing
The broader analysis measures α on 10K tokens generated by the target for each evaluated setting. This estimates distributional overlap along target-generated continuations. It extends the evidence beyond the T5 walltime implementation, but it does not turn those additional cases into measured end-to-end speedups.
For unconditional generation, the target is a GPT-like decoder trained on lm1b. It has 97M parameters, hidden dimension 768, feed-forward dimension 3072, and 12 layers with 12 attention heads. The approximation has 6M parameters, hidden dimension 256, feed-forward dimension 1024, and 2 layers with 4 attention heads. Both use Gelu activations in the described setup, and the systems share Bert tokenization with an 8k vocabulary. Simple unigram and bigram alternatives are also examined.
These architectural details help establish that the proposal can be substantially smaller while remaining useful. They do not establish a universal optimal size ratio. The acceptance calculation is tied to these systems, their training setting, and the decoding policy applied to their distributions.
For dialogue, the target is LaMDA with 137B parameters. Existing LaMDA checkpoints with 100M, 2B, and 8B parameters supply approximations. This connects the analysis to dialogue systems at a much larger target scale.
The paper notes that LaMDA output passes through a Top₄₀ filter. That does not affect greedy selection in the same way it affects standard sampling, so the filter belongs in the interpretation of the distributions being compared. Acceptance always concerns the adjusted distributions actually used.
Across the examined cases, the authors report that approximations much smaller than their targets frequently yield α between 0.5 and 0.9. They also observe greater overlap when the adjusted distributions are sharper. These are empirical patterns across the investigated configurations, instead of an exact acceptance range promised for future tasks.
Simple proposals and illustrative progress
The translation analysis includes a particularly inexpensive approximation: a bigram table. With T5-XXL as target, its reported acceptance is α ≈ 0.2. Under the negligible-cost assumption and γ=3, the paper gives a speed improvement factor of 1.25X.
This result is useful because it weakens the intuition that speculative decoding necessarily requires another substantial neural component. A very simple proposer can still supply probability mass that overlaps with the target. The resulting gain remains lower than the measured benefit from T5-small, so deployment simplicity and maximum acceleration need not favor the same choice.
The introductory generation example illustrates progress at the level of an individual output. A sentence containing 38 tokens is produced using 9 sequential target runs, with a 97M target and a 6M approximation. In the figure’s first iteration, the target runs once and 5 tokens become available. These are examples of the mechanism, not substitutes for the walltime evaluation.
Agreement between analysis and measurement
The authors estimate proposal timing coefficients from profiler traces and compare predicted speedups with measured runtimes. They report broadly similar behavior. The theory captures the main balance between accepted progress and proposal overhead.
Where the comparison differs more, the paper points to implementation optimizations and the approximate independence assumption for acceptance. These explanations matter because α and c are deliberately compact summaries. They do not reproduce every feature of the execution schedule or every dependency between successive prefixes.
The experiments therefore establish a concrete practical result for T5 latency and broader evidence that useful proposal overlap occurs in other settings. They do not establish that a measured α alone is sufficient to predict deployment performance without profiling the target execution and available concurrency.
What the ablations show
A collection of controlled comparisons
The paper offers comparisons of approximation size, decoding policy, proposal type, and analytical settings rather than a conventional sequence of component-removal ablations. These comparisons explain why the method can work and where its gains come from. Their evidential strength varies: some are measured walltimes, some are acceptance estimates, and others are theoretical analyses.
The strongest practical comparison changes the T5 approximation while retaining the target and task. Larger approximations increase α, as expected, but T5-small delivers the best measured speedup among those tested. The result demonstrates that better imitation is not sufficient to identify the fastest proposer.
A larger draft generator can lose through its own execution cost. This supports the joint optimization embodied by the speedup equation. Choosing the approximation with the highest overlap would ignore the time spent obtaining that overlap.
Sharper distributions make speculation easier
Comparing greedy and standard sampling changes the distributions while leaving the overall speculative procedure intact. The paper finds higher acceptance and greater acceleration for greedy decoding in its T5 experiments.
Under greedy standardization, probability concentrates on the preferred choice. A proposal that selects the same choice can be retained. Under standard sampling, the procedure must preserve a broader distribution, and usefulness depends on the full probability overlap rather than a shared top decision alone.
The broader acceptance experiments show a related pattern: sharper adjusted distributions tend to have larger α. This is an observation about the tested settings. It does not prove that every concentration transformation will improve useful acceleration after all execution costs and task conditions are considered.
The comparison also reinforces the scope of the contribution. The method works beyond greedy decoding. Standard sampling yields substantial measured gains while retaining its stochastic target distribution.
Cheap proposals can have useful overlap
The unigram and bigram analyses test whether meaningful acceptance requires a sophisticated neural approximation. Their non-negligible overlap shows that it does not.
The translation bigram result is especially informative because its evaluation is treated as negligible in cost. It supplies a modest acceptance rate without imposing the overhead of repeated neural proposal evaluations. That creates a distinct operating point from the neural approximations: less predictive power can still be worthwhile when it is sufficiently cheap.
The paper’s context-copying suggestion follows the same reasoning but remains a suggestion. It targets settings in which an output may repeat a long stretch already present in the input or conversation. The paper does not report that such a copying heuristic achieved the T5-small walltime results.
Longer drafts exchange work for opportunities
The analytical draft-length comparisons examine the interaction of α and γ. More lookahead permits greater progress when guesses survive, but increases the amount of computation exposed to early rejection.
The paper includes analyses under c = ĉ = 0 to isolate the target-side tradeoff. Removing proposal cost from the calculation makes it easier to see that rejected target work alone can raise operation counts. Even a free draft generator does not make every speculative continuation useful.
The trace illustration compares γ=7, γ=3, and ordinary decoding. Its purpose is to show the schedule: proposal work precedes a wider target-verification stage. It also includes encoder work for the target and approximation, making visible that a complete encoder-decoder execution contains more than repeated decoder calls.
These analyses support choosing γ from the cost and acceptance regime. They do not support a universally best fixed draft length. The optimum can move when the approximation, task, hardware, or implementation changes.
Lenience changes the behavioral contract
The appendix deliberately relaxes exactness through a lenience parameter l. In standard sampling, the proposal probabilities are scaled before the acceptance comparison. The resulting acceptance expression is:
α_l = ∑ₓ min(p(x) / l, q(x))
Here, α_l is acceptance under lenience, l controls the relaxation, and p and q are the standardized target and proposal distributions. The sum ranges over candidate tokens x. Reducing l permits more proposed probability to pass the comparison.
The associated guarantee bounds how much a token can be overrepresented:
P_lenient(x) ≤ p(x) / l
Here, P_lenient is the output distribution of the relaxed procedure. The bound limits upward distortion relative to p, but does not supply a corresponding lower bound. The authors explicitly note that diversity may suffer.
For T5-XXL with T5-small on English-to-German translation, the standard-sampling analysis uses c = 0.015. At lenience settings 1, 0.5, 0.3, and 0.1, the stated improvement factors are 2.5X, 3.1X, 3.6X, and 5X, respectively. These belong to the appendix’s relaxed analysis, not the main exact-decoding walltime comparison.
For greedy decoding, the authors instead discuss relaxation before standardization. With the same sequence of lenience settings, the reported acceptance values are 0.75, 0.75, 0.8, and 0.87. Using c=0.015 and γ=8, they give speed factors of 3.3X, 3.3X, 3.9X, and 4.9X. The unchanged result at the less aggressive relaxation shows that loosening a criterion does not necessarily create useful additional acceptance in a particular configuration.
The main empirical results exclude lenience. This distinction is essential: the faster relaxed settings no longer establish acceleration with an unchanged target distribution. They explore a different quality-and-speed contract.
Why ordinary rejection sampling is less suitable
The appendix also compares speculative sampling with a rejection-sampling construction. Ordinary rejection sampling uses an envelope constant to keep acceptance valid everywhere:
M = maxₓ p(x) / q(x)
Here, M is the largest target-to-proposal ratio over candidate tokens. This M is an envelope constant, distinct from the midpoint distribution used in the divergence derivation.
Its acceptance test uses:
r < p(x) / (Mq(x))
Here, x is drawn from q, and r is sampled uniformly from the interval between 0 and 1. The global constant M can reduce acceptance even for candidates whose local target and proposal probabilities align well.
The authors explain that a non-iterative fallback version of this procedure can accept fewer proposals than speculative sampling. Their correction rule is useful because it retains the shared probability mass directly, rather than letting a global worst-case ratio govern every proposal. This analysis helps explain why the exact correction mechanism is central to performance, not merely a technical detail.
Limitations
Limits explicitly identified by the authors
The primary limitation is resource availability. Speculative decoding obtains lower latency through increased concurrency and may increase arithmetic work. The authors state that it is unsuitable when the configuration lacks additional computational resources. A deployment already constrained by arithmetic capacity cannot assume that speculative work will fit into otherwise idle capacity.
The timing theory makes a strong execution assumption: the target evaluations for a draft can run together without increasing the duration of the target stage. That is a useful approximation in the intended regime, not a universal property of Transformers. The authors also assume generations are long enough for the amortized analysis to be informative.
The expected-progress derivation assumes independent, identically distributed acceptance rates. The paper later acknowledges that this is approximate and identifies it as a source of differences between predicted and observed runtimes. Actual difficulty can vary through a continuation, which is one reason adaptive proposal lengths remain attractive.
Beam search is not fully resolved. The appendix outlines an extension in which an approximation explores a wider candidate beam and the target checks whether the required candidates are covered. Its acceptance condition is:
top_w(Mₚ) ⊆ top_u(M_q)
Here, top_w denotes the target’s leading beam candidates at width w, while top_u denotes the approximation’s candidates at width u. The approximation width is at least as large as the target width. The subset relation requires the needed target candidates to be present among those proposed.
The proposed target-computation budget is:
w + uγ
Here, w is the target beam width, u is the approximation beam width, and γ is the number of proposed steps. The authors note a performance penalty and leave a fuller analysis for future work. The ordinary sampling results therefore should not be treated as an established beam-search speedup.
The experiments also cover text only. Images and other autoregressive domains are suggested as possible applications, without experimental confirmation. Similarly, hierarchical proposals, custom training for acceptance, and dynamically varying approximations remain directions for further investigation.
Limits visible in the experimental setup
The principal measured latency evidence comes from T5-XXL on translation and summarization, with batch size 1 on a single TPU-v4. A careful reading should keep that scope attached to the result. The experiments do not demonstrate the same acceleration under every batch size, hardware arrangement, or serving workload.
The broader GPT-like and LaMDA analyses measure acceptance. That is useful evidence of compatibility between target and proposal distributions, but it leaves the timing coefficient and practical verification schedule unresolved. High overlap is necessary for strong speculative progress; it is not a complete end-to-end performance measurement.
The neural approximation experiments predominantly use the same architecture family as the target and the same probability standardization. The unrestricted correctness theorem is broader than that experimental coverage. It permits other proposals mathematically without demonstrating that those proposals are easy to implement or fast in practice.
The reported preference for an approximation much smaller than the target is consequently an empirical pattern within the explored setup. It should not become a fixed sizing rule. A different target, task, or execution environment can change both acceptance and relative cost.
What exactness does and does not establish
Preserving the target distribution preserves the target’s behavior, including its limitations. The method does not establish improved factuality, stronger reasoning, safer generation, or better task quality. It changes how the prescribed distribution is sampled.
The mathematical guarantee also concerns the defined algorithm and distributions. A practical implementation still has to calculate acceptance, normalization, and committed prefixes correctly. The proof does not replace engineering validation merely because the target architecture remains unchanged.
Finally, an upper bound on sequential target stages is not an upper bound on elapsed time. Draft generation, correction, scheduling, and unused speculative work can all add costs. The paper’s practical result is compelling precisely because it measures walltime against T5X rather than relying only on a reduced count of sequential target calls.
What came after
Independent evidence reported in the paper
The paper itself records an independent implementation by Chen and colleagues after its initial publication. That work reports 2X–2.5X improvements with Chinchilla 70B. This extends the paper’s account beyond the authors’ own T5 implementation.
The appropriate conclusion remains narrow. An independent implementation found similar-scale acceleration in another named target setting. The statement does not establish identical hardware conditions, identical proposal costs, or a universal factor across large autoregressive systems.
Different ways to prepare and verify continuations
Several later titles identify direct developments of the draft-and-verification idea. The available descriptions support identifying their subjects, but do not supply enough detail to compare their algorithms, exactness guarantees, or results.
SpecInfer: Accelerating Generative Large Language Model Serving with Tree-based Speculative Inference and Verification explicitly places speculative inference and verification in a tree-based serving framework. Relative to the single proposed continuation explained here, the title identifies branching candidate structure as its focus. It does not, on its own, establish how branches are chosen or how its acceptance rule relates mathematically to speculative sampling.
Medusa: Simple LLM Inference Acceleration Framework with Multiple Decoding Heads names multiple decoding heads as its acceleration mechanism. Its relevance is the production of future candidates through a different arrangement of prediction components. The available information does not justify claiming that its training requirements or output guarantees match those of the original method.
EAGLE: Speculative Sampling Requires Rethinking Feature Uncertainty explicitly revisits speculative sampling through feature uncertainty. The title places the difficulty of constructing useful proposals at the center of its investigation. That connects to a question already visible in this paper: acceptance depends on how well a cheap prediction process supports the target’s distribution.
EAGLE-2: Faster Inference of Language Models with Dynamic Draft Trees names dynamic draft trees as its subject. This makes it relevant to the original paper’s suggestion that fixed proposal arrangements leave opportunities unused. The title supports that connection in research direction, without establishing that its dynamic mechanism implements the oracle analysis discussed earlier.
These works illustrate distinct places to modify a speculative system: candidate structure, prediction components, and the representation from which proposals are produced. The original paper supplies the useful separation between proposing future work and retaining only work that passes the required checks. Detailed comparisons would require the later algorithms and their stated guarantees.
Proposals from within the target
The original experiments mostly use a separate smaller neural approximation. Later titles explicitly explore self-speculation.
Draft & Verify: Lossless Large Language Model Acceleration via Self-Speculative Decoding presents self-speculative decoding as its subject and labels the intended acceleration lossless. This is directly relevant to the question of where a proposal comes from. The available title does not specify the construction, so it cannot support a claim about which internal computations are reused or omitted.
LayerSkip: Enabling Early Exit Inference and Self-Speculative Decoding brings early exit and self-speculation together. That pairing is conceptually significant because the original paper distinguishes adaptive computation from verified speculation while allowing efficiency methods to complement each other. The title identifies that combined direction, without establishing the later work’s training procedure or measured benefits.
Together, these titles show that a separate off-the-shelf proposer is one practical design choice instead of the only subject of subsequent investigation. The exactness theorem in the original paper does not restrict proposal quality or architecture, while its practical experiments cover a narrower family. Later proposal designs address the engineering space between that broad theorem and a deployable fast system.
Other attempts to loosen sequential execution
Break the Sequential Dependency of LLM Inference Using Lookahead Decoding targets the same broad execution obstacle through a method named lookahead decoding. Its title establishes a shared concern with sequential generation. It does not establish that its sampling procedure is identical to speculative sampling or that it relies on the same target-and-approximation arrangement.
Speculative Decoding: Exploiting Speculative Execution for Accelerating Seq2seq Generation explicitly connects speculation with sequence-to-sequence generation. That makes it closely related in stated scope to the translation and summarization setting studied here. The supplied bibliographic information does not support a more detailed account of its acceptance method or results.
These distinctions matter because related names do not imply interchangeable guarantees. Preparing future work, verifying candidates, preserving a target distribution, and preserving downstream quality are separate properties. The original paper is unusually clear about the property its strict sampling construction establishes.
Surveys and the wider efficiency discussion
Unlocking Efficiency in Large Language Model Inference: A Comprehensive Survey of Speculative Decoding takes speculative decoding itself as the subject of a survey. Its scope reflects the emergence of a broader research area around proposals, verification, and execution efficiency. The available information does not provide its taxonomy or comparative conclusions.
A Survey on Efficient Inference for Large Language Models and Towards Efficient Generative Large Language Model Serving: A Survey from Algorithms to Systems place inference efficiency in wider settings. Their titles connect naturally to the original paper’s distinction between an algorithmic reduction in sequential work and the system conditions needed to turn that reduction into lower latency.
A Survey of Large Language Models addresses the broader literature gap between earlier reviews of pretrained language systems and the newer large-scale setting. Its citation situates speculative decoding within that larger discussion; it does not establish a specific technical extension of the sampling method.
The continuing research questions are already visible in the original analysis. How cheaply can a useful continuation be proposed? How much of it survives verification? How should speculation adapt as predictability changes? And can the available hardware execute the extra work without creating a new bottleneck? The paper’s lasting contribution is to make those engineering choices compatible with a precise probability contract, instead of requiring speed to depend on an unmeasured change in generation behavior.
Cite
Cite as Yaniv Leviathan, Matan Kalman and Yossi Matias. 2022. Fast Inference from Transformers via Speculative Decoding. arXiv:2211.17192.
@misc{leviathan2022fast,
title = {{Fast Inference from Transformers via Speculative Decoding}},
author = {Yaniv Leviathan, Matan Kalman and Yossi Matias},
year = {2022},
doi = {10.48550/arxiv.2211.17192},
eprint = {2211.17192},
archivePrefix = {arXiv},
url = {https://doi.org/10.48550/arxiv.2211.17192}
}This page in Markdown https://md.research.elamur.ai/free/en/papers/leviathan-2022-fast-inference-transformers-speculative-decoding/
References
- Bapna, A., Arivazhagan, N., and Firat, O. Controlling computation versus quality for neural sequence models. ArXiv, abs/2002.07106, 2020. OpenAlex ↗ · Scholar ↗
- Brown, T. B., Mann, B., Ryder, N., Subbiah, M., Kaplan, J., Dhariwal, P., Neelakantan, A., Shyam, P., Sastry, G., Askell, A., Agarwal, S., Herbert-Voss, A., Krueger, G., Henighan, T., Child, R., Ramesh, A., Ziegler, D. M., Wu, J., Winter, C., Hesse, C., Chen, M., Sigler, E., Litwin, M., Gray, S., Chess, B., Clark, J., Berner, C., McCandlish, S., Radford, A., Sutskever, I., and Amodei, D. Language models are few-shot learners. In Proceedings of the 34th International Conference on Neural Information Processing Systems, NIPS'20, Red Hook, NY, USA, 2020. Curran Associates Inc. ISBN 9781713829546. our card
- Burton, F. W. Speculative computation, parallelism, and functional programming. IEEE Transactions on Computers, C-340 (12):0 1190–1193, 1985. . OpenAlex ↗ · Scholar ↗
- Chelba, C., Mikolov, T., Schuster, M., Ge, Q., Brants, T., Koehn, P. T., and Robinson, T. One billion word benchmark for measuring progress in statistical language modeling. In Interspeech, 2013. our card
- Chen, C., Borgeaud, S., Irving, G., Lespiau, J.-B., Sifre, L., and Jumper, J. M. Accelerating large language model decoding with speculative sampling. ArXiv, abs/2302.01318, 2023. OpenAlex ↗ · Scholar ↗
- Chowdhery, A., Narang, S., Devlin, J., Bosma, M., Mishra, G., Roberts, A., Barham, P., Chung, H. W., Sutton, C., Gehrmann, S., Schuh, P., Shi, K., Tsvyashchenko, S., Maynez, J., Rao, A., Barnes, P., Tay, Y., Shazeer, N. M., Prabhakaran, V., Reif, E., Du, N., Hutchinson, B. C., Pope, R., Bradbury, J., Austin, J., Isard, M., Gur-Ari, G., Yin, P., Duke, T., Levskaya, A., Ghemawat, S., Dev, S., Michalewski, H., García, X., Misra, V., Robinson, K., Fedus, L., Zhou, D., Ippolito, D., Luan, D., Lim, H., Zoph, B., Spiridonov, A., Sepassi, R., Dohan, D., Agrawal, S., Omernick, M., Dai, A. M., Pillai, T. S., Pellat, M., Lewkowycz, A., Moreira, E., Child, R., Polozov, O., Lee, K., Zhou, Z., Wang, X., Saeta, B., Díaz, M., Firat, O., Catasta, M., Wei, J., Meier-Hellstern, K. S., Eck, D., Dean, J., Petrov, S., and Fiedel, N. Palm: Scaling language modeling with pathways. ArXiv, abs/2204.02311, 2022. our card
- Dehghani, M., Arnab, A., Beyer, L., Vaswani, A., and Tay, Y. The efficiency misnomer. ArXiv, abs/2110.12894, 2021. OpenAlex ↗ · Scholar ↗
- Devlin, J., Chang, M.-W., Lee, K., and Toutanova, K. Bert: Pre-training of deep bidirectional transformers for language understanding. ArXiv, abs/1810.04805, 2019. our card
- Elbayad, M., Gu, J., Grave, E., and Auli, M. Depth-adaptive transformer. ArXiv, abs/1910.10073, 2019. OpenAlex ↗ · Scholar ↗
- Han, Y., Huang, G., Song, S., Yang, L., Wang, H., and Wang, Y. Dynamic neural networks: A survey. IEEE Transactions on Pattern Analysis and Machine Intelligence, 44:0 7436–7456, 2021. OpenAlex ↗ · Scholar ↗
- Hendrycks, D. and Gimpel, K. Bridging nonlinearities and stochastic regularizers with gaussian error linear units. ArXiv, abs/1606.08415, 2016. OpenAlex ↗ · Scholar ↗
- Hennessy, J. L. and Patterson, D. A. Computer Architecture: A Quantitative Approach. Morgan Kaufmann, Amsterdam, 5 edition, 2012. ISBN 978-0-12-383872-8. OpenAlex ↗ · Scholar ↗
- Hinton, G. E., Vinyals, O., and Dean, J. Distilling the knowledge in a neural network. ArXiv, abs/1503.02531, 2015. our card
- Hubara, I., Courbariaux, M., Soudry, D., El-Yaniv, R., and Bengio, Y. Quantized neural networks: Training neural networks with low precision weights and activations. ArXiv, abs/1609.07061, 2016. our card
- Jaszczur, S., Chowdhery, A., Mohiuddin, A., Kaiser, L., Gajewski, W., Michalewski, H., and Kanerva, J. Sparse is enough in scaling transformers. In Neural Information Processing Systems, 2021. OpenAlex ↗ · Scholar ↗
- Raffel, C., Shazeer, N., Roberts, A., Lee, K., Narang, S., Matena, M., Zhou, Y., Li, W., and Liu, P. J. Exploring the limits of transfer learning with a unified text-to-text transformer. The Journal of Machine Learning Research, 210 (1):0 5485–5551, 2020. our card
- Roberts, A., Chung, H. W., Levskaya, A., Mishra, G., Bradbury, J., Andor, D., Narang, S., Lester, B., Gaffney, C., Mohiuddin, A., Hawthorne, C., Lewkowycz, A., Salcianu, A., van Zee, M., Austin, J., Goodman, S., Soares, L. B., Hu, H., Tsvyashchenko, S., Chowdhery, A., Bastings, J., Bulian, J., García, X., Ni, J., Chen, A., Kenealy, K., Clark, J., Lee, S., Garrette, D. H., Lee-Thorp, J., Raffel, C., Shazeer, N. M., Ritter, M., Bosma, M., Passos, A., Maitin-Shepard, J. B., Fiedel, N., Omernick, M., Saeta, B., Sepassi, R., Spiridonov, A., Newlan, J., and Gesmundo, A. Scaling up models and data with t5x and seqio. ArXiv, abs/2203.17189, 2022. OpenAlex ↗ · Scholar ↗
- Scardapane, S., Scarpiniti, M., Baccarelli, E., and Uncini, A. Why should we add early exits to neural networks? Cognitive Computation, 120 (5):0 954–966, 2020. OpenAlex ↗ · Scholar ↗
- Schuster, T., Fisch, A., Jaakkola, T., and Barzilay, R. Consistent accelerated inference via confident adaptive transformers. In Conference on Empirical Methods in Natural Language Processing, 2021. OpenAlex ↗ · Scholar ↗
- Schwartz, R., Stanovsky, G., Swayamdipta, S., Dodge, J., and Smith, N. A. The right tool for the job: Matching model and instance complexities. In Annual Meeting of the Association for Computational Linguistics, 2020. our card
- Shazeer, N. M. Fast transformer decoding: One write-head is all you need. ArXiv, abs/1911.02150, 2019. OpenAlex ↗ · Scholar ↗
- So, D. R., Ma'nke, W., Liu, H., Dai, Z., Shazeer, N. M., and Le, Q. V. Primer: Searching for efficient transformers for language modeling. ArXiv, abs/2109.08668, 2021. OpenAlex ↗ · Scholar ↗
- Stern, M., Shazeer, N., and Uszkoreit, J. Blockwise parallel decoding for deep autoregressive models. Advances in Neural Information Processing Systems, 31, 2018. OpenAlex ↗ · Scholar ↗
- Sukhbaatar, S., Grave, E., Bojanowski, P., and Joulin, A. Adaptive attention span in transformers. In Annual Meeting of the Association for Computational Linguistics, 2019. our card
- Sun, X., Ge, T., Wei, F., and Wang, H. Instantaneous grammatical error correction with shallow aggressive decoding. ArXiv, abs/2106.04970, 2021. OpenAlex ↗ · Scholar ↗
- Thoppilan, R., Freitas, D. D., Hall, J., Shazeer, N. M., Kulshreshtha, A., Cheng, H.-T., Jin, A., Bos, T., Baker, L., Du, Y., Li, Y., Lee, H., Zheng, H., Ghafouri, A., Menegali, M., Huang, Y., Krikun, M., Lepikhin, D., Qin, J., Chen, D., Xu, Y., Chen, Z., Roberts, A., Bosma, M., Zhou, Y., Chang, C.-C., Krivokon, I. A., Rusch, W. J., Pickett, M., Meier-Hellstern, K. S., Morris, M. R., Doshi, T., Santos, R. D., Duke, T., Søraker, J. H., Zevenbergen, B., Prabhakaran, V., Díaz, M., Hutchinson, B., Olson, K., Molina, A., Hoffman-John, E., Lee, J., Aroyo, L., Rajakumar, R., Butryna, A., Lamm, M., Kuzmina, V. O., Fenton, J., Cohen, A., Bernstein, R., Kurzweil, R., Aguera-Arcas, B., Cui, C., Croak, M., hsin Chi, E. H., and Le, Q. Lamda: Language models for dialog applications. ArXiv, abs/2201.08239, 2022. our card
- Vaswani, A., Shazeer, N., Parmar, N., Uszkoreit, J., Jones, L., Gomez, A. N., Kaiser, Ł., and Polosukhin, I. Attention is all you need. Advances in neural information processing systems, 30, 2017. our card
- Yu, J., Xu, Y., Koh, J. Y., Luong, T., Baid, G., Wang, Z., Vasudevan, V., Ku, A., Yang, Y., Ayan, B. K., Hutchinson, B. C., Han, W., Parekh, Z., Li, X., Zhang, H., Baldridge, J., and Wu, Y. Scaling autoregressive models for content-rich text-to-image generation. ArXiv, abs/2206.10789, 2022. OpenAlex ↗ · Scholar ↗