Draft Length Tuner

Built for Fireworks AI

Speculative decoding in your browser: faster output, same distribution.

Demo by Armaan Kazi
← Back to Demos

A bigram draft proposes k tokens and a trigram target checks them in one pass, keeping each with probability min(1, p/q). Both train here on a made-up corpus. Cost is modeled: a draft pass costs 0.1 of a target pass.

T
Output at k = 4
0 draft kept0 draft rejected, target resampled0 free token from the target pass
Measured speedup by k (dots: theory)

Measuring.

Running the same output check.

Built by Armaan Kazi. Not affiliated with Fireworks AI. Toy n-gram models, modeled cost.