Latent Space: The AI Engineer Podcast
Latent Space: The AI Engineer Podcast

The Inference Engineering Masterclass — Philip Kiely & Ali Taha, Baseten

Watch the full episode on YouTube: We first covered Baseten last year when DeepSeek mania was at peak hype. Now they have raised a monster $13B round and become one of the new cohort of AI Infra decacorns that are (with Nvidia, Intel, and the semis complex) chief beneficiaries of the Inference Infle

Featured Speakers

Latent.Space Host

Topics Discussed

Episode Summary

Executive Summary: The conversation explores modern inference engineering end-to-end: routing, caching, speculative decoding, quantization, disaggregated prefill/decode, parallelism, and hardware-aware optimization across models like GLM, Kimi, DeepSeek, and video/audio systems. The speakers argue that inference quality and training are increasingly intertwined, with future gains coming from systems-level improvements, faster networking, and continual learning loops.

Main Topics: End-to-end request handling and long-context serving (Priority: 5/5): They break down what happens when a huge prompt hits a production API: cache-aware routing, prefill/decode disaggregation, KV cache reuse, speculative decoding, streaming, and billing. The main point is that long queries are expensive unless prior context can be reused. Speculative decoding and dedicated deployments (Priority: 5/5): The speakers explain how draft models accelerate decoding, why traffic-specific speculators work better, and why dedicated deployments outperform shared endpoints when workload patterns are known. They also discuss when customers should move off serverless APIs. Model support, quantization, and production readiness (Priority: 5/5): A major theme is the engineering required when a new model drops: adapting kernels, handling architectural quirks, calibrating quantization, training speculators, and fixing bugs discovered only in real traffic. Support means much more than simply producing one token. Structured outputs, tool calling, and agent reliability (Priority: 4/5): They discuss JSON/tool calling, constrained decoding, state machines, and structured output formats as ways to make LLM actions reliable. The emphasis is that LLMs only suggest actions; software must constrain and interpret those suggestions correctly. Parallelism, hardware specialization, and scaling limits (Priority: 5/5): Tensor parallelism, expert parallelism, and pipeline parallelism are explained as ways to distribute large models across GPUs/nodes. The speakers connect these choices to interconnect speed, HBM capacity, and the growing importance of hardware-aware model design. Quantization trade-offs and fidelity-preserving optimization (Priority: 5/5): Quantization is presented as the main lossy optimization, but not always linearly worse: careful layer selection and calibration can cancel errors and improve fidelity. They cite research on better quantized performance and argue quality should be measured against the original model's logit distribution. Future modalities: video, audio, diffusion, and continual learning (Priority: 4/5): The discussion widens to video generation, audio, and diffusion models. Video is framed as especially hard due to quadratic attention costs, while audio/speech is closer to autoregressive text. They end with continual learning and KV-cache compaction as a path toward models that learn online.

Key Arguments: Inference performance depends heavily on workload-aware routing, KV-cache reuse, and prefill/decode separation; without reuse, long-context requests are far more costly. Speculative decoding works best when draft models are trained for the dominant traffic pattern; shared endpoints cannot optimize as aggressively because they do not know the task distribution. Model support is a production engineering problem, not just a compatibility problem: every new architecture requires quantization, kernel adaptation, speculator training, and real-world debugging. Structured output and tool calling require both training and decoding constraints; formatting alone helps, but reliability ultimately comes from systems that can enforce valid outputs. Quantization is lossy, but intelligent layer selection plus calibration can preserve or even improve effective fidelity by making quantization errors cancel out. Inference and training are converging: inference optimizations improve training rollouts, while training methods like distillation and QAT are now needed to make fast inference possible. The biggest scaling bottlenecks are increasingly interconnect and KV-cache movement, not just compute; future gains may come from faster networking and better cluster orchestration. Video models lag behind text because long sequences make full attention prohibitively expensive; long-form generation likely needs autoregressive or hybrid approaches, not naive diffusion alone. Continual learning may be achieved through KV-cache compaction or other memory mechanisms rather than constantly rewriting model weights. Open-source model ecosystems benefit from composability: teams can graft vision encoders, swap attention layers, or borrow architectural ideas across models to improve production systems.

Data Points: Long query size: 200,000 tokens - Used as the opening example for explaining request routing, caching, and prefill/decode behavior. Model throughput baseline: 30–50 tokens/sec - Described as a typical range for a standard API without major optimizations on a large model. Optimized throughput target: ~10x baseline - The speakers suggest stacking optimizations can yield order-of-magnitude gains in inference speed. Observed provider benchmark range: 70 to 90 tokens/sec - Cited as a common public benchmarking comparison before more aggressive optimization. High-end optimized throughput: 300–400 tokens/sec - Mentioned as plausible on strong hardware with quantization, speculators, KV routing, and tuned parallelism. Quantization precision: 16 bits to 4 bits - Used to explain the information loss involved in moving model weights from BF16/FP16-style precision to NVFP4-like formats. Quantization uplift claim: 20% more quantized - Referenced in the discussion of research showing certain layer choices can improve fidelity while increasing quantization. Context length example: 1 million tokens - Used to illustrate that providers may offer different API context lengths for performance reasons. Parameter count example: 1 trillion parameters - Used as a rough reference point for large-model API performance expectations. Video token load example: ~35,000 tokens for 5 seconds - Illustrated why video attention becomes computationally expensive even for short clips. Image/video model size example: <1B parameters for the vision encoder - The added vision encoder was described as a relatively small component compared with the main LLM weights. MMLU Pro result: 56% - Mentioned in relation to a vision-retrofitting research prototype that was still not production-ready. Model size example: 2.8T parameters / 1.4 TB - Used to explain why a very large model requires massive memory capacity and careful KV-cache planning. GPU memory example: 288 GB per GB300 GPU - Used in the hardware math for fitting a very large model across an eight-GPU node. NVL72 rack memory: ~20 TB - Referenced while discussing large-rack deployments and the memory headroom they offer.

Pivotal Quotes: "The biggest one, of course, just being like you don't have to deal with someone else throwing 100 million of tokens of benchmarking traffic at the endpoint when you happen to be trying to serve your users." — Philip: Explaining why dedicated deployments are preferable to shared endpoints for serious production workloads. "The LLM is actually not capable of doing anything. It's only capable of making suggestions of what to do." — Ali: Clarifying the relationship between model outputs, tool calling, and software execution. "The thing to remember is just how long these hardware cycles are." — Philip: Discussing why GPU architectures and inference stacks must anticipate future workloads years in advance.

Implications: Inference engineering is becoming a core infrastructure discipline: faster networking, smarter caching, safer structured outputs, and hardware-aware optimization will matter as much as model quality. Training, inference, and continual learning are converging into one loop.

🔓 Sign Up for Unlimited Episode Search

About Latent Space: The AI Engineer Podcast

The podcast by and for AI Engineers! In 2025, over 10 million readers and listeners came to Latent Space to hear about news, papers and interviews in Software 3.0. We cover Foundation Models changing every domain in Code Generation, Multimodality, AI Agents, GPU Infra and more, directly from the founders, builders, and thinkers involved in pushing the cutting edge. Striving to give you both the definitive take on the Current Thing down to the first introduction to the tech you'll be using in the next 3 months! We break news and exclusive interviews from OpenAI, Anthropic, Gemini, Meta (Soumith Chintala), Sierra (Bret Taylor), tiny (George Hotz), Databricks/MosaicML (Jon Frankle), Modular (Chris Lattner), Answer.ai (Jeremy Howard), et al. Full show notes always on https://latent.space

View all episodes from Latent Space: The AI Engineer Podcast