use case · basics · Ultravox v0.5 Llama-3.2-1B · WebGPU decoder + WASM encoder · 1,382.7 MB

Where does the time go? Encoder vs cached audio features

Every new clip pays for one pass of the 32-layer Whisper-large-v3-turbo encoder on WASM. After that, the projected audio_features are cached per clip, so follow-up questions only pay Llama-3.2-1B prefill + decode on WebGPU. This page measures both, across three clip durations, and checks how greedy (temperature 0.0) and sampled (0.7) decoding differ.

1 · Model (auto-initialises from Cache Storage when already downloaded)

Checking for a cached copy of Ultravox…

2 · Clip-duration benchmark: cold encoder + TTFT vs warm cached turn

For each clip the page first drops the worker's audio-feature cache, asks for a one-line summary (cold: mel → WASM encoder → prefill), then asks a different question on the same clip (warm: cached audio_features, encoder skipped). Max 48 new tokens, greedy decoding.

Cold versus warm Ultravox turns per clip duration
Clip Duration · audio tokens Encoder ms (WASM) Cold TTFT Warm TTFT (cached) Speed-up Active frames · NaN
Run the benchmark once the model is ready.
Mean encoder ms–
Encoder ms per audio second–
Mean warm TTFT–
Mean cold→warm speed-up–

Cold vs warm time-to-first-token

3 · Temperature 0.0 vs 0.7 determinism check

Runs the same question on the same clip four times: twice greedy (do_sample: false) and twice sampled (temperature 0.7, top_p 0.9). Greedy runs should be byte-identical; sampled runs usually differ in wording while staying on topic.

Greedy runs identical–
Sampled runs identical–
Sampled word overlap–
Greedy vs sampled overlap–

4 · Show the code

Show the code · ultravox-core.mjs — summarizeCacheBenchmark()
Show the code · ultravox-core.mjs — compareDeterminism()