A modality changes more than the payload. A vision language model (VLM) converts images or video into visual tokens before language decode. An embedding model emits one vector instead of a sequence. Automatic speech recognition (ASR) maps audio to text, while text to speech (TTS) adds an audio-token decoder and waveform stage. Image and video generators usually refine noise through repeated denoising rather than autoregressive token generation. The right optimization follows the pipeline: reduce visual context, batch embeddings, orchestrate speech chunks, tune diffusion kernels, or distribute video attention. The right metric follows the user-visible unit, not a universal token counter.
Why it matters
The input-output boundary determines where work accumulates. Pixels add encoder work and context; audio introduces chunking and transport; vectors move cost into storage and similarity search; denoising repeats a large compute path many times.
A product may coordinate preprocessors, specialized models, and decoders rather than one model. Each stage needs its own latency, capacity, and quality budget, or a small auxiliary component can throttle the expensive accelerator behind it.
Token metrics do not transfer unchanged. A speech listener cares about the first intelligible phrase, a transcription job about audio processed per wall-clock second, and an image user about completion time plus visual preference.
Traffic shape changes the serving design. Interactive embedding lookup, million-item backfill, continuous voice, single-image generation, and eight-GPU video generation have different batching, queueing, scaling, and failure behavior even when they share lower-level libraries.
Mental model
Trace every request as conversions between representations. Record the raw input, preprocessing, model-native representation, dominant execution loop, postprocessing, transport, and the first useful output. Then attach a resource and metric to each boundary. This reveals whether to optimize a model kernel, remove an unnecessary conversion, parallelize independent chunks, or change the product protocol.
One serving question, five pipeline shapes
Input flows through five contrasting paths: Vision understanding converts pixels into visual tokens before text decode; Embedding compresses an item into one vector; Speech pipeline moves from audio through transcription and reasoning to synthesized audio; Image diffusion repeatedly refines a latent; Video diffusion spreads attention over width, height, and time.
Vision understanding
Pixels or frames become visual tokens, then text is decoded
Embedding
A variable input becomes one fixed-length semantic vector
Speech pipeline
Audio is segmented, transcribed, reasoned over, and synthesized
Image diffusion
A noisy latent is refined over repeated denoising steps
Video diffusion
A space-time latent makes attention and parallelism dominant
Vision understanding → Embedding: Change text output to vector output
Embedding → Speech pipeline: Change offline or lookup traffic to a live stream
Image diffusion → Video diffusion: Extend latent space through time
For visual understanding, the encoder patches and embeds images or sampled frames, then the language model processes those visual tokens with the prompt. Resolution and frame rate buy detail but expand prefill and the key-value cache. Process a coherent short clip in one call when motion matters; downsample enough to fit it, transcribe audio separately when required, and reuse repeated visual prefixes across follow-up questions.
For embeddings, separate the bulk lane from the lookup lane. Backfills favor large request batches, broad queues, and horizontal replicas. User-facing retrieval favors bounded queues and low tail latency. BERT-style encoder models remain useful for simple latency-sensitive work, while LLM-derived embedding models generally offer stronger capability. Output dimensionality mostly changes downstream vector storage, transfer, and similarity cost rather than model runtime, while vectors from different model spaces are not interchangeable. Migration therefore requires re-embedding the corpus and evaluating retrieval, not merely matching dimensions.
For live transcription, voice activity detection (VAD) segments one continuous audio stream into ordinary ASR calls and text returns over the same connection. Sequential placement can pass prior text as context. Long files invert the priority: remove silence, make meaningful chunks, distribute them across replicas, then stitch by timestamp. Track real-time factor (RTF), inspect suspicious repetition or implausible speaking rates, and retry affected chunks with a changed temperature or segmentation. Diarization is a separate segmentation-embedding-clustering pipeline rather than Whisper-like decoding; profile it independently because the edition reports even optimized diarization taking at least twice as long as transcription.
For speech synthesis, autoregressive generation produces audio tokens and a separate decoder converts them into a waveform. Optimize and batch both stages, but do not assume the decoder supports the engine's token-level scheduler. Once generation is faster than real-time playback, additional speed does not help one listener; spend the gain on more simultaneous streams. A cascaded voice product also budgets VAD, ASR, language reasoning, TTS, and network turns as one conversation loop. For speech-to-speech, this edition finds no commercially viable open model and describes closed alternatives as less capable and more expensive than cascaded systems; revalidate that rapidly changing trade-off.
For image diffusion, completion time grows with denoising passes. Memory-efficient attention and fusion must first expose the compute-bound path; lower-precision matrix work can then use faster tensor hardware. Quality-speed policy can reduce steps or stop prompt guidance after early composition is established. Video extends the latent through time, making attention the dominant cost. It commonly uses batch one across a full node, cached intermediate work, selective attention precision, and context parallelism instead of ordinary throughput batching.
Keep a modality-specific quality gate beside performance. Compare embedding vectors and retrieval outcomes after precision changes; inspect transcription errors and retry heuristics by audio condition; evaluate speech naturalness and intelligibility; use human preference for image and video changes because automated visual grading is directional. An optimization is valid only when its quality loss stays inside the product's declared tolerance. Run the gate through production preprocessing and postprocessing, and retain baseline outputs plus failure cases so later engine, precision, or hardware changes can replay the same judgment.
A useful benchmark matrix follows the variables the product actually exposes. For a visual assistant, cross image count, resolution, sampled frames, prompt length, cache state, and response length. For speech, cross language, noise, speaker pace, chunk size, silence, and simultaneous streams. For diffusion, cross resolution, clip duration, step schedule, guidance, precision, and GPU topology. Warm each path, repeat enough runs to see normal variation, and preserve raw distributions, resource traces, and representative outputs. This prevents a configuration tuned for one clean sample from becoming a claim about the entire modality, and lets a later rerun distinguish traffic drift from runtime or quality-policy regression.
Capacity planning for a composed system starts at the slowest stage, then follows variability upstream. If a voice activity detector can segment hundreds of streams but transcription handles tens, unrestricted admission only builds a transcription queue and amplifies overload. If speech synthesis produces audio faster than clients consume it, buffers, network egress, and connection slots become capacity. Assign every stage a measured service rate, finite buffer, timeout, retry budget, and backpressure action. Scale stages independently, but keep request identity, configuration, cancellation, and deadline visible across them so nested retries do not multiply expensive work or return a late result that the user has already abandoned.
Roll out modality changes by population, not only by aggregate averages. A lower visual resolution may preserve ordinary scenes while losing small text; a transcription chunk policy may work for quiet English and fail on noisy multilingual audio; a diffusion precision change may preserve composition but damage faces or motion. Route a controlled slice to the candidate, retain the baseline output when practical, and tag results with input traits, model revision, runtime, precision, and configuration. Promote only when tail latency, sustainable throughput, failure rate, unit cost, and the relevant human or task quality gate pass for each important slice; otherwise roll back or narrow eligibility instead of hiding the regression in an average.
Choose service metrics after identifying the model's generation archetype and useful output unit. Autoregressive models extend a tokenized sequence, while diffusion models iteratively denoise an output. The first family includes vision-language, embedding, automatic speech recognition, and text-to-speech models; image and video generation generally follow the second. Many LLM engines and techniques transfer to related autoregressive modalities, but diffusion optimization follows a different path. Latency, throughput, and quality must then be expressed in terms the modality's user can perceive. For TTS, one audio token is not meaningful on its own, so measure time to first word or first sentence rather than time to first token.
Core ideas
VLM and video input
The vision encoder may be smaller than the language model yet still determine runtime compatibility. Long visual sequences increase prefill and cache pressure; downsampling, optimized attention, cache reuse, quantization, parallelism, and phase separation remain useful levers.
Omni-modal or composed
A unified model can preserve cross-modal context and simplify the product boundary. A pipeline of optical character recognition, transcription, retrieval, language, and synthesis components can be faster or more accurate in narrow tasks and lets each stage scale independently.
Embedding inference
Encoder-style work processes tokens in parallel, so prefix caching and prefill-decode separation do not help. Favor single-GPU replicas, large batches, parallel tokenization, explicit queues, and a quality check when changing precision or vector length.
ASR inference
The autoregressive decoder usually dominates the encoder-decoder model. Live streams gain most from chunk orchestration and persistent transport, while long files gain from silence removal, parallel chunks, in-flight batching, and targeted retries.
TTS inference
Speech synthesis combines language-like audio-token generation with waveform decoding. Measure time to first byte (TTFB), time to a useful phrase, generation rate, and concurrent real-time streams; do not reward token speed that outruns playback without increasing capacity.
Image generation
Iterative denoising is compute-oriented and exposes direct step-count and guidance trade-offs. Kernel selection, fusion, compilation, matrix precision, and human preference tests matter more than language-serving cache policies.
Video generation
Joint space-time denoising improves coherence but makes attention enormous. With little batching headroom, throughput comes from faster attention, safe reuse, selective quantization, and splitting context calculations across tightly connected GPUs.
How it works
Draw the complete representation path from client payload to useful output. Include preprocessing, auxiliary models, decoding, storage, and transport rather than timing only the largest model.
Separate interactive, streaming, and bulk traffic. Give each lane a queue, concurrency limit, autoscaling signal, and service target that reflects its own arrival pattern.
Build a baseline with representative resolutions, frame rates, audio lengths, languages, vector batches, output sizes, denoising steps, and quality examples. Report distributions instead of one friendly input.
Profile by stage. Reduce visual tokens when context dominates, increase embedding batches when launch overhead dominates, parallelize independent audio chunks, compile an audio decoder, or replace slow diffusion attention only after evidence identifies that path.
Change one speed-quality control at a time, such as resolution, vector dimension, precision, chunking, denoising steps, guidance, or cache reuse. Compare against the same inputs and a declared acceptance gate.
For live audio, hold a persistent bidirectional connection, cap active streams at measured capacity, preserve ordering, and propagate backpressure before a growing queue destroys conversational latency.
Retest the entire product loop after optimization. A faster model can expose tokenization, waveform decode, stitching, network transfer, vector search, or client playback as the new limiter.
Metrics that matter
Visual understanding
P95 end-to-end latency
Slice by image count, resolution, sampled frames, visual tokens, cache reuse, and generated text length.
Embeddings
items/s and lookup P99
Pair throughput and tail latency with batch size, queue depth, vector dimension, and retrieval quality.
Live ASR
chunk round-trip ms
Measure capture-to-text delay, active streams, chunk duration, backlog, and transcript quality by condition.
Long-file ASR
RTF and completion time
Track audio duration divided by processing time, per-stage utilization, retries, and stitch correctness.
TTS
TTFB and first phrase
Also measure real-time streams per GPU, underruns, decoder latency, and whether generation stays ahead of playback.
Image generation
seconds per accepted image
Record step count, guidance schedule, resolution, accelerator time, and blinded human preference.
Video generation
seconds per accepted clip
Slice by duration and resolution; track attention share, cache reuse, GPU scaling efficiency, and quality regressions.
Trade-offs
Visual detail or context budget
Higher resolution and frame rate retain small details and motion but expand visual tokens, prefill, cache, and attention. Downsampling makes whole-clip reasoning feasible at the cost of information.
Unified or specialized pipeline
Omni-modal models preserve joint context and reduce handoffs; smaller optical, speech, or preprocessing models may be faster and more accurate within their domains but create orchestration work.
Vector richness or system cost
Longer vectors retain more semantic information but enlarge storage, transfer, and similarity work. Shorter Matryoshka-style outputs can lower downstream cost without materially changing inference time.
Sequential context or file parallelism
Sequential chunks can carry prior text into the next transcription. Parallel long-file chunks finish much faster but lose that continuity, so segmentation and retry logic must recover quality.
Diffusion speed or visual fidelity
Fewer steps, reduced guidance, cached states, and lower precision remove compute. Their errors can change composition, prompt adherence, detail, or temporal coherence, so each lever needs human-facing validation.
Replication or communication
Context parallelism replicates video-model weights to split attention over the latent sequence. It spends memory and interconnect bandwidth to make a single batch-one clip complete sooner.
Engineering checklist
Recheck every January 2026 model, runtime, accelerator, format, and performance statement against current releases before procurement or architecture choice.
Write the precise input and useful-output contract, including sizes, durations, formats, languages, quality thresholds, and deadline.
Inventory every preprocessor, model, decoder, queue, store, transport, and client step; give each an owner and latency budget.
Split online lookup, continuous streaming, long-running jobs, and backfills when their concurrency or scaling policies conflict.
Benchmark production-shaped distributions across input size, output size, batch, concurrency, cache state, step count, and accelerator topology.
Pair every performance experiment with the modality's quality test and retain examples that expose known failure modes.
Set queue and active-stream limits, propagate backpressure, and test slow consumers, retries, disconnects, and partial pipeline failure.
Approve changes on end-to-end percentile latency, sustainable capacity, unit cost, and accepted output quality rather than a model-only speedup.