Guide

Chat LLMs dominate the discourse, but production AI platforms spend a surprising fraction of GPU time on everything else: embedding millions of chunks for RAG, reranking candidates, transcribing audio, synthesizing speech, generating images, and scoring tabular features with a GBDT. Those models do not share the prefill/decode KV story. Treat them like chat and you will over-provision the wrong resource, batch the wrong way, and miss SLOs that were easy on paper.

One gateway, many model types is fine. One autoscaling signal for all is not. Scale embedding Deployments on batch queue depth, diffusion on GPU util or queue time, LLMs on KV and waiting queue as in autoscaling, speech on audio-seconds queued, classic ML on p99 score latency.

Inventory every model on the critical path of a RAG+chat or voice product: query embedder, document embedder (batch), reranker, LLM, maybe ASR/TTS. Give each its own Deployment (or Triton model) with an appropriate batcher and SLO. Benchmark with realistic length mixes — synthetic all-128-token batches lie about padding waste.

For embedding product design see embeddings. For generative image and video theory see generative models. For voice UX see voice agents.

Batching by model type

Model typeBatch onLimit byMetric
Chat LLMTokens / sequences (continuous)KV + SLOtok/s, TTFT, TPOT
Embedding / rerankTexts bucketed by lengthPadding waste, VRAMtexts/s, p95 ms
ASRAudio clips by durationMel memory, encoder sizeRTF, hours/day
TTSUtterances / framesFirst-audio SLOms to first audio
DiffusionPrompts (often small B)Step count × VRAMimages/min, e2e s
GBDT / small ONNXRows if anyp99 msscorings/s

Teams often ask whether embeddings can share the LLM’s H100s “when idle.” Sometimes yes for nightly indexing. Rarely yes for online query embedding next to chat decode. LLM decode wants large KV arenas. Embedding batches want contiguous free memory for big padded tensors. They fight. A chat spike starves the embedder and blows RAG p95. Share only for offline jobs with preemption. Give online embedders, rerankers and TTS their own smaller GPUs (L4/A10) or CPU pools.

Concepts in this section

StepConceptWhat it answers
1Embeddings and rerankersHow do you batch encoders and cap rerank cost?
2Speech servingBatch ASR vs streaming TTS — which clock?
3Diffusion servingWhy is latency steps times step time?
4Classic ML servingWhy do GBDTs belong on CPU?

Tag every metric with model_name and model_type. Without that, on-call pages “GPU high” with no idea which of five colocated models is guilty.

Common mistakes

  • Padding a mixed-length embedding batch to 512 when p50 length is 64 → about 4–8× wasted FLOPs.
  • Running Whisper large on CPU for "cost savings" until the backlog grows faster than realtime.
  • Serving SDXL at 50 steps on an interactive button with no distillation.
  • Putting XGBoost on a GPU "for consistency" and paying more latency than a local CPU library.
  • Autoscaling diffusion on CPU util while GPUs are saturated.

Key takeaways

  • Encoders and rerankers are one-shot and often compute-bound. Batch by length buckets. Meter texts/s.
  • Indexing millions of chunks is an offline throughput problem. Query embedding is a latency problem. Split them.
  • Speech splits into batch ASR (efficiency) vs streaming TTS/ASR (first audio / partials).
  • Diffusion cost is step count × step time. Distillation beats micro-optimizing a 50-step loop.
  • Classic ML belongs on CPU ONNX or Triton FIL, not on an H100 chat pool.
  • Match batching policy and scale signals to the model type.

Further learning

NVIDIA Triton Inference ServerThe Triton Inference Server provides an optimized cloud and edge inferencing solution. - triton-inference-server/serverGitHub Text Embeddings Inference (Hugging Face)A blazing fast inference solution for text embeddings models - huggingface/text-embeddings-inferenceGitHub

Practical Whisper pipeline context:

Fine tuning Whisper for Speech TranscriptionTrelis Research