# Poster 27888

- Kind: Poster
- Talk page and recording: https://iclr.cc/virtual/2025/poster/27888

> Transcript of the talk's recording (session_asr), made by speech recognition or taken from the host's captions. It may contain errors. The words are the speakers'; listen to the recording on the talk's page before quoting it.

Hi everyone, my name is Hari. I'll be talking about faster cascades via speculative decoding and this is joint work with my colleagues at Google Research. Suppose we are given two language models of different sizes. Our goal is to reduce the inference cost while approximately matching the quality of the large model. The literature offers two popular ways of solving this problem.
One is speculative decoding. Here we use the small model as a drafter to generate draft token sequentially and the large model as a verifier to verify the draft tokens in parallel. Another approach is cascading. Here we have the small model first make a prediction. We measure the uncertainty in the model's output and if we deem the model to be uncertain, we defer to the large model to make a prediction.
Both these techniques come with their own advantages. Speculative decoding for example is theoretically guaranteed to match the quality of the large model. Of course in practice this technique is often known to yield impressive speedups. Cascading on the other hand has an interesting property. In this case one can vary the fraction of traffic to the larger model and thus achieve different cost quality trade-offs.
It's often observed in practice that at certain operating points, cascading can in fact yield better quality than even the large model it is constructed with. So with speculative decoding, we get quality preserving speed-up and underlying goal is to match the output distribution from the large model.
With cascading, we get quality enhancing speed-up, and the goal is not to match the output distribution from the large model, but to instead match the underlying ground truth distribution from which the data is drawn. A natural question to ask is how can one leverage the best of both these techniques? In this talk, we shall propose one way to do this to effectively combine speculative decoding and cascading.
We call our proposal as speculative cascade. What we propose is a simple change to a standard speculative decoding setup. In speculative decoding, the small model is run sequentially to generate draft tokens and then we perform verification in parallel against the large model's distribution.
Now what we propose is to change the verification step to perform verification against an alternate target distribution. Now this alternate target distribution would be constructed through a cascading or a referral rule. So during verification, we would verify the draft tokens against a cascade between the small and large model with a referral rule used to interleave the two models.
More specifically, here's how this new method would work. During drafting, we already compute the small model distribution. During parallel verification, we first compute the large model distribution, feed both the small and large model distributions to a deferral role, which then outputs a target distribution. We would then run verification against this chosen target distribution.
Of course, a key question is what is the correct differential rule to use in this set? In the paper, we have explored a number of different options for the differential rules. Here we present one candidate that worked well in practice. Now this rule picks between the small and large model distributions using the following criteria.
In this criterion, we compare the difference in quality between the small and large model distributions on one side and the rejection rate from the large model on the other side. Now the difference in quality between the two model is approximated using the difference in max probabilities between the two models. Notice that the default rule offers a weighting parameter alpha which we can then vary to achieve a range of different cost quality trade-offs.
We evaluated our proposal on both T5 and Gemma models. We first present results on T5. In each case, we trace out different cost quality trade-offs and plot the quality metric as a function of latency. We find that speculative cascades offer better cost quality trade-offs compared to the baselines.
For example, on WMT, speculative cascades improve the speedup from 1.6x to almost 2x compared to speculative decoding. Similarly, with GEMMA models, we find speculative cascades to yield better cost-quality tradeoffs than the baselines. For example, on MBBP, we get a 1.7x reduction in rejection rate compared to speculative decoding.
Thank you and if you'd like to know more details please feel free to take a look at our paper or reach out to us for questions.
