Skip to content
PodSubs
ShowsPeopleGuestsJobsNewsEvents
More
BlogPodCred
Menu
ShowsPeopleGuestsJobsNewsEventsBlogPodCredNetworksSign in
Join nowSign in
  • Shows
  • People
  • Jobs
  • News
  • More
    • Guests
    • Events
    • Blog
    • PodCred
    • Networks
    Join nowSign in

Learn AI in Bits

Learn AI in Bits artwork

081 - How Does AI Inference Work?

Oct 13, 20268 minAudioSeason 1, Episode 81
ShareXLinkedInFacebookWhatsAppEmail

When you type a question into an AI assistant and watch the answer appear word by word, what's happening underneath is inference: the process of running a trained model to produce that answer. This episode follows one request through the full inference path, from tokenization to the KV cache to production serving. A prompt is first assembled with any system instructions, conversation history, and context, then converted by a tokenizer into token IDs. The model processes that token sequence through its transformer layers, including attention, producing logits, which are scores for every possible next token. A decoding step turns those scores into a choice, whether through greedy decoding, which picks the top score, or sampling methods shaped by settings like top-k, top-p, and temperature. The model generates output one token at a time this way, rather than retrieving a complete answer from a database. The episode explains the prefill and decode split: prefill processes the input prompt and builds attention state, while decode generates output tokens one at a time, reusing that state through the key-value cache, or KV cache, so the model doesn't have to recompute previous context on every step. It distinguishes time to first token from inter-token latency, and explains how the KV cache becomes a major memory consideration as conversations and concurrent requests grow, which is why serving systems manage cache allocation, batching, and sometimes prefix reuse across requests. Zooming out to production, the episode covers how inference engines schedule and batch requests across accelerators, how quantization trades precision for memory and speed, and why practical performance is measured in latency, throughput, memory use, and cost per token rather than benchmark scores alone. It also distinguishes the model's inference step from the rest of an application's pipeline, including retrieval, safety filters, and multimodal input encoding, and closes with a key clarification: running inference on a deployed model doesn't mean it's learning from your conversation as it happens, since that depends entirely on the service's own data and training policies. Sources & References NVIDIA TensorRT Model Connect: Inference Fundamentals - https://github.com/NVIDIA/TensorRT-Model-Connect/blob/main/website/docs/getting-started/inference-fundamentals.md vLLM: Inside vLLM: Anatomy of a High-Throughput LLM Inference System - https://vllm.ai/blog/2025-09-05-anatomy-of-vllm vLLM Documentation: Disaggregated Prefilling (experimental) - https://docs.vllm.ai/en/latest/features/disagg_prefill/ NVIDIA Technical Blog: Optimizing Inference for Long Context and Large Batch Sizes with NVFP4 KV Cache - https://developer.nvidia.com/blog/optimizing-inference-for-long-context-and-large-batch-sizes-with-nvfp4-kv-cache Voice narration is AI-generated.

Audio and video play straight from the show's own hosting. PodSubs stores and serves no media.

Hosts and Guests

Nobody is credited on this episode yet.

Credit the people on this episode

Be the first to rate this episode

More episodes

All episodes
  1. 099 - How Does an LLM Generate Text?

    Nov 23, 20265 minAudio

    Follow a prompt through the inner workings of a large language model. This episode explains tokenization, embeddings, transformer layers, attention, logits, probability selection, and the KV cache. It also compares...

    Credit the people on this episode

  2. 098 - Product Managers: What AI Skills Are Companies Looking for?

    Nov 23, 20265 minAudio

    Explore the AI skills employers increasingly expect from product managers working on AI products. This episode covers core product management, AI literacy, model and agent fundamentals, evaluation, product metrics, and...

    Credit the people on this episode

  3. 097 - Developers: What AI Skills Are Companies Looking?

    Nov 23, 20266 minAudio

    Companies are looking for developers who can combine strong software fundamentals with practical AI skills. This episode looks at AI-assisted development, model APIs, RAG, agents, evaluation, debugging, and system...

    Credit the people on this episode

  4. 096 - Structured Outputs — How to Make AI Return Valid JSON

    Nov 22, 20265 minAudio

    Structured outputs help AI models return data that software can reliably read. This episode explains JSON, JSON Schema, and the difference between JSON mode and schema-constrained responses. It also compares how OpenAI,...

    Credit the people on this episode

  5. 095 - Function Calling: How AI Uses Tools

    Nov 22, 20265 minAudio

    Function calling lets AI models work with external tools, APIs, and business systems. This episode explains the tool-calling loop, how applications define and execute functions, and how OpenAI, Claude, Gemini, and...

    Credit the people on this episode