Model Cascade
A model cascade answers each request with a cheap model first and escalates to a more capable, more expensive model only when a check says the cheap answer is not good enough. The idea is that many requests are easy, so paying for the large model on all of them wastes money. Chen, Zaharia, and Zou describe cascades among the cost-reduction strategies in their FrugalGPT paper.
The mechanism
For each request:
- The small model produces an answer.
- A check assigns a score to that answer, for example a verifier’s rating, a self-reported confidence, or a score derived from token probabilities.
- If the score is at least a threshold \(\tau\), the answer is returned. Otherwise the request goes to the large model and its answer is returned.
The rule in step 3 is the deferral rule. Raising \(\tau\) escalates more requests, which raises cost. Quality improves only if the large model is more accurate on the additionally escalated requests; it can fall when correct small answers are replaced by wrong large answers.
Compare this with a router, which chooses a model before any answer exists, from the request alone. A cascade sees the cheap answer before deciding, which gives the check more information, at the price of paying for the small call on every request.
Cost and latency arithmetic
Let \(c_S\) and \(c_L\) be the cost of one small and one large call, and \(e\) the share of requests escalated. Every request pays for the small call; escalated ones also pay for the large call. This treats the check as free, as when it reads the small model’s own token probabilities:
\[ \text{expected cost} = c_S + e\,c_L. \]
The cascade is cheaper than always using the large model when \(c_S + e c_L < c_L\), that is, when \(e < 1 – c_S/c_L\). With \(c_S = 1\) and \(c_L = 10\) (hypothetical units), the break-even escalation rate is 0.9: at \(e = 0.4\) the cost is 5, at \(e = 0.9\) it equals the large model’s 10, and at \(e = 1\) it is 11, worse than skipping the small model. If the check costs \(c_V\) per request, as a verifier model call does, the expected cost becomes \(c_S + c_V + e c_L\) and the break-even rate falls to \(e < 1 – (c_S + c_V)/c_L\).
Latency adds, because the calls are sequential. If the small call takes 0.8 s and the large call 2.0 s, a non-escalated request takes 0.8 s and an escalated one 2.8 s, with the check’s own time taken as negligible; a verifier call adds its time to both. The cascade lowers the median when most requests stay on the small model and raises the tail, since the slowest requests pay for both.
A simulation
Consider synthetic requests in which the small model is correct 70 percent of the time and the large model 90 percent. The check score is drawn from a normal distribution with mean 0.70 when the small answer is correct and 0.45 when it is wrong, both with standard deviation 0.15. For 100,000 requests:
import numpy as np
rng = np.random.default_rng(0)
n = 100000
small = rng.random(n) < 0.70
large = rng.random(n) < 0.90
score = rng.normal(np.where(small,0.70,0.45),0.15)
print(f"small only 0.000 {small.mean():.3f} 1.00")
for tau in (0.4,0.5,0.6,0.7):
escalate = score < tau
quality = np.where(escalate,large,small).mean()
print(f"{tau:.1f} {escalate.mean():.3f} {quality:.3f} {1+10*escalate.mean():.2f}")
print(f"always escalate 1.000 {large.mean():.3f} 11.00")
print(f"large only 1.000 {large.mean():.3f} 10.00")
| threshold \(\tau\) | escalated | quality | cost (\(c_S=1, c_L=10\)) |
|---|---|---|---|
| small only | 0.000 | .701 | 1.00 |
| .4 | .126 | .798 | 2.26 |
| .5 | .251 | .863 | 3.51 |
| .6 | .427 | .910 | 5.27 |
| .7 | .636 | .923 | 7.36 |
| always escalate | 1.000 | .902 | 11.00 |
| large only | 1.000 | .902 | 10.00 |
The always-escalate row pays for both calls; the large-only baseline skips the small call. The two share the same large-model outcomes in this fixed-seed sample. At \(\tau = 0.6\) the cascade reaches 0.910 quality, above the sampled large model’s 0.902, at cost 5.27 versus 10 for large only. Quality can exceed the large model’s because the cascade keeps correct small answers that the large model would have gotten wrong. This depends on the check being informative; the synthetic score separates the two cases by 0.25 with spread 0.15, which is an assumption, not a typical value.
Conditions and failure modes
- The check carries the whole design. A false accept returns a wrong small answer, which costs quality. A false escalation re-answers a correct one, which costs money and time and can also lose quality if the large model replaces a correct answer with an incorrect one.
- Scores from a model are not probabilities of correctness by default. A threshold fitted on one model version or traffic mix can shift the escalation rate after a change, so the rate is monitored and the threshold re-fitted when the model, prompt, or traffic changes.
- Averages hide classes. Quality has to hold on the request types where errors are costly, not just overall.
- The threshold is fitted on one sample and reported on another; selecting \(\tau\) on the sample that is then used to report quality overstates it.
Discover more from Insightful Data Lab
Subscribe to get the latest posts sent to your email.
