Streaming Multimodal Interaction › Serving a Streaming System: A Latency Accounting

Michael BrenndoerferDecember 1, 20263 min read
Language AI HandbookAll chapters
Part 52 of 67Omni-Modal and Embodied Language Systems
Chapter 400Streaming Multimodal Interaction › Serving a Streaming System: A Latency Accounting
Reading section 12 of 17 · Serving a Streaming System: A Latency Accounting · 3 minSection 12 of 17 · 3 min

Section 12 of 17 · 3 min read

Reading settings

Definitions

Choose how many terms have tooltips.

Article links

Make inline references clickable

Notes & comments

If a critical path is purely serialized, its elapsed latency is the sum of its nonoverlapping stage durations. The next fixture assumes capture, VAD, partial transcription, endpointing, prefill, first token and playout all run serially. The first six intervals total 960 ms to the decoded token. The final 40 ms yields 1,000 ms from initial capture to first audio. These sums use hypothetical stage durations and are independent of the earlier trace.

In a live system, earlier chunks may be processed during the user’s turn and per-stage spans can overlap. Even when every stage is serial, summing stage quantiles generally gives a different result from taking a quantile of total latency. Measure the total for each trial to get the listener-facing distribution. Inspect the longest observed dependency chain when diagnosing a slow path.

PythonIn [18]
CollapseExpand
hops = {
    "capture": 30,
    "vad": 60,
    "asr partial": 150,
    "endpointing": 300,
    "model prefill": 300,
    "first token": 120,
    "playout startup": 40,
}
total = sum(hops.values())
ConsoleOut [19]
CollapseExpand
Serial capture to first audio: 1000 ms
VisualizationOut [21]
CollapseExpand
Horizontal bars compare seven stage durations in a serial audio pipeline.
The serialized illustration assigns each stage a separate duration. Endpointing and prefill are each 300 ms of the 1,000 ms total including playout startup.

The stages also motivate a scenario that separates prefill improvement from critical-path improvement. Suppose prefill decreases by 60 ms while 40 ms of that reduction occurs during work that was going to run anyway. The end-to-end gain is 20 ms under those assumptions. The same prefill change gives the full 60 ms in the serial fixture. A trace can test whether an optimization changed the critical path before attributing a system-level latency gain to its local measurements.

An experiment can measure concurrent stages from observed timestamps on the same replay trace. Record their intervals, predecessors, and whether the relevant endpoint needs all of them. For two parallel prerequisites with 50 ms and 80 ms remaining from a shared start, the earliest downstream start is 80 ms after that start. Further shortening the 50 ms prerequisite leaves this downstream start unchanged. Network wait, internal scheduling and playback startup belong in that model when they constrain start time.

Comments

Add to the conversation

A question, a correction, or an example from your own work.

No comments yet. Be the first to share your thoughts!

Newsletter

Stay up to date

Get new articles, book updates, and notes on AI and technology.

Unsubscribe at any time. Privacy policy