AI Inference: 10x Faster Models & Self-Optimization

Philip Kiely and Ali Taha of Baseten discuss AI inference, LLM optimization, speculative decoding, and the engineering behind cutting-edge AI models.

9 min read
Three AI professionals in a discussion panel setting, with a large screen displaying AI-related graphics behind them.
Latent Space

Visual TL;DR. AI Inference Speed drives Custom GPU Kernels. AI Inference Speed drives Speculative Decoding. Custom GPU Kernels enables Self-Optimization Loop. Speculative Decoding leads to 10x Faster Models. Self-Optimization Loop contributes to 10x Faster Models. Long Query Challenges addressed by Engineering Models. Engineering Models aims for Peak AI Performance. 10x Faster Models achieves Peak AI Performance.

  1. AI Inference Speed: optimizing LLMs for faster response and higher efficiency in real-world applications
  2. Custom GPU Kernels: LLMs like GLM-5.2 write and optimize their own GPU kernels for inference engines
  3. Speculative Decoding: a key technique to accelerate LLM output generation by predicting future tokens
  4. Self-Optimization Loop: model analyzes traces, identifies bottlenecks, writes new kernels, then re-evaluates
  5. Long Query Challenges: navigating complex, extended user inputs and multi-step tool calling processes
  6. Engineering Models: Baseten's Ali Taha and Philip Kiely discuss practical implementation and support
  7. 10x Faster Models: achieving significant speed improvements in LLM inference performance and throughput
  8. Peak AI Performance: getting AI models to perform at their highest potential beyond standard benchmarks
Visual TL;DR
Visual TL;DR, startuphub.ai AI Inference Speed drives Custom GPU Kernels. AI Inference Speed drives Speculative Decoding. Speculative Decoding leads to 10x Faster Models. 10x Faster Models achieves Peak AI Performance drives drives leads to achieves AI Inference Speed Custom GPU Kernels Speculative Decoding 10x Faster Models Peak AI Performance From startuphub.ai · The publishers behind this format
Visual TL;DR, startuphub.ai AI Inference Speed drives Custom GPU Kernels. AI Inference Speed drives Speculative Decoding. Speculative Decoding leads to 10x Faster Models. 10x Faster Models achieves Peak AI Performance drives drives leads to achieves AI InferenceSpeed Custom GPUKernels SpeculativeDecoding 10x Faster Models Peak AIPerformance From startuphub.ai · The publishers behind this format
Visual TL;DR, startuphub.ai AI Inference Speed drives Custom GPU Kernels. AI Inference Speed drives Speculative Decoding. Speculative Decoding leads to 10x Faster Models. 10x Faster Models achieves Peak AI Performance drives drives leads to achieves AI Inference Speed optimizing LLMs for faster response andhigher efficiency in real-worldapplications Custom GPU Kernels LLMs like GLM-5.2 write and optimize theirown GPU kernels for inference engines Speculative Decoding a key technique to accelerate LLM outputgeneration by predicting future tokens 10x Faster Models achieving significant speed improvementsin LLM inference performance andthroughput Peak AI Performance getting AI models to perform at theirhighest potential beyond standardbenchmarks From startuphub.ai · The publishers behind this format
Visual TL;DR, startuphub.ai AI Inference Speed drives Custom GPU Kernels. AI Inference Speed drives Speculative Decoding. Speculative Decoding leads to 10x Faster Models. 10x Faster Models achieves Peak AI Performance drives drives leads to achieves AI InferenceSpeed optimizing LLMs forfaster response andhigher efficiency… Custom GPUKernels LLMs like GLM-5.2write and optimizetheir own GPU… SpeculativeDecoding a key technique toaccelerate LLMoutput generation… 10x Faster Models achievingsignificant speedimprovements in LLM… Peak AIPerformance getting AI modelsto perform at theirhighest potential… From startuphub.ai · The publishers behind this format
Visual TL;DR, startuphub.ai AI Inference Speed drives Custom GPU Kernels. AI Inference Speed drives Speculative Decoding. Custom GPU Kernels enables Self-Optimization Loop. Speculative Decoding leads to 10x Faster Models. Self-Optimization Loop contributes to 10x Faster Models. Long Query Challenges addressed by Engineering Models. Engineering Models aims for Peak AI Performance. 10x Faster Models achieves Peak AI Performance drives drives enables leads to contributes to addressed by aims for achieves AI Inference Speed optimizing LLMs for faster response andhigher efficiency in real-worldapplications Custom GPU Kernels LLMs like GLM-5.2 write and optimize theirown GPU kernels for inference engines Speculative Decoding a key technique to accelerate LLM outputgeneration by predicting future tokens Self-Optimization Loop model analyzes traces, identifiesbottlenecks, writes new kernels, thenre-evaluates Long Query Challenges navigating complex, extended user inputsand multi-step tool calling processes Engineering Models Baseten's Ali Taha and Philip Kielydiscuss practical implementation andsupport 10x Faster Models achieving significant speed improvementsin LLM inference performance andthroughput Peak AI Performance getting AI models to perform at theirhighest potential beyond standardbenchmarks From startuphub.ai · The publishers behind this format
Visual TL;DR, startuphub.ai AI Inference Speed drives Custom GPU Kernels. AI Inference Speed drives Speculative Decoding. Custom GPU Kernels enables Self-Optimization Loop. Speculative Decoding leads to 10x Faster Models. Self-Optimization Loop contributes to 10x Faster Models. Long Query Challenges addressed by Engineering Models. Engineering Models aims for Peak AI Performance. 10x Faster Models achieves Peak AI Performance drives drives enables leads to contributes to addressed by aims for achieves AI InferenceSpeed optimizing LLMs forfaster response andhigher efficiency… Custom GPUKernels LLMs like GLM-5.2write and optimizetheir own GPU… SpeculativeDecoding a key technique toaccelerate LLMoutput generation… Self-OptimizationLoop model analyzestraces, identifiesbottlenecks, writes… Long QueryChallenges navigating complex,extended userinputs and… EngineeringModels Baseten's Ali Tahaand Philip Kielydiscuss practical… 10x Faster Models achievingsignificant speedimprovements in LLM… Peak AIPerformance getting AI modelsto perform at theirhighest potential… From startuphub.ai · The publishers behind this format

In a recent episode of the Latent Space podcast, hosts and guests delved into the intricate world of AI inference, exploring how large language models (LLMs) are being optimized for speed and efficiency. Philip Kiely, author of "Inference Engineering," and Ali Taha, Head of Model Performance at Baseten, shared insights into the techniques and challenges involved in getting AI models to perform at their peak.

AI Inference: 10x Faster Models & Self-Optimization - Latent Space
AI Inference: 10x Faster Models & Self-Optimization — from Latent Space

The Power of Custom Kernels and Speculative Decoding

The conversation highlighted the remarkable capability of LLMs, such as GLM-5.2, to not only generate text but also to write optimized GPU kernels. This process involves a loop where the model analyzes profiling traces, identifies bottlenecks in its inference engine, writes new kernels, and then re-evaluates. "Some of the GPU kernels that we run GLM-5.2 with in our inference engine is written by GLM-5.2," explained one of the speakers, showcasing the self-optimizing potential of AI.

Speculative decoding emerged as a key technique for accelerating LLM inference. This method involves attaching a smaller, faster model that predicts several tokens ahead. The larger, original model then verifies these predictions in a single forward pass. Philip Kiely explained, "We attach like this little like kind of parasite like this layer that goes on top of the model. And this model just has to predict it does three very fast ultra reagressive over passes and it will predict like you know three certain tokens and then you do one forward stage over the entire original model in order to see if those predictions were correct or not and then you accept them or you reject them." The effectiveness of this approach hinges on the specificity of the task; a speculative model trained on, for example, summarizing Harry Potter books, would yield higher acceptance rates than a general-purpose one.

Navigating Long Queries and Tool Calling Challenges

When handling long queries, such as those with 200,000 tokens, the process prioritizes caching. "The first thing that I'm going to ask is, have you sent me this query before or at least part of it?" noted Ali Taha. "Ideally some cached input already there so that we can skip prefill on at least part of these 200,000 tokens." This strategy is particularly useful for applications like coding or multi-turn agents where context is expected to be preserved.

The discussion also touched upon the complexities of tool calling. While the core idea is to generate structured output like JSON, the challenge lies in training models for specific tool-calling scenarios. "The challenge with tool calling more and more seems to be that the companies want certain tool calling which is a very sensitive thing to train," Taha observed. He elaborated on the difficulties arising from JSON output formatting, where improper closure can lead to hallucinations. To address this, the team has implemented a state machine approach to constrain the output format, ensuring structured and reliable results.

The Engineering Behind Model Support and Open Source Collaboration

Supporting new model releases, like GLM-5.2 or Mixtral-8x7B, involves significant engineering effort beyond just making them functional. This includes redoing quantization work, such as converting models to NVFP4 for optimal performance, and ensuring that these optimizations don't degrade the model's intelligence. "We have to perform that quantization and calibrate the quantization to make sure that we're not causing any kind of regression in the model's intelligence," explained one of the speakers.

The power of open-source AI was a recurring theme. The ability to combine components from different models, such as "Kimi vision encoder onto GLM-5.2," exemplifies how the community can collaboratively build more capable systems. This modular approach allows for rapid innovation and the creation of models that surpass the individual capabilities of their constituent parts.

Optimizing for Performance: Beyond Benchmarks

The conversation highlighted the continuous drive for inference speed improvements, with providers often engaging in an "inference speed race." While tokens per second (TPS) is a common metric, the speakers emphasized the importance of understanding the nuances, such as inter-token latency. They noted that significant gains, often multiples of current performance, are achievable through stacked optimizations like quantization, speculative decoding, and efficient KV caching.

The discussion also touched upon the challenges of benchmarking and the non-deterministic nature of models, which can sometimes be influenced by hardware and subtle software issues. Ultimately, the goal in inference engineering is to achieve faster inference while maintaining fidelity to the original model's performance, ensuring that users cannot discern a difference between the optimized API and the original model.

© 2026 StartupHub.ai. All rights reserved. Do not enter, scrape, copy, reproduce, or republish this article in whole or in part. Use as input to AI training, fine-tuning, retrieval-augmented generation, or any machine-learning system is prohibited without written license. Substantially-similar derivative works will be pursued to the fullest extent of applicable copyright, database, and computer-misuse laws. See our terms.