Skip to content
DenseChip
Learn
PracticeCode labInterview

DenseChip

Navigate

Menu

LearnPracticeCode labInterview

Tools

All toolsSV editorCode repoResume
DenseChip

Practice, courses, and chip-design tools in one focused workspace.

LearnPracticeCode labInterviewToolsLearning paths

© 2026 DenseChip

AboutContactPrivacyTerms
Skip to lesson

Course contents

  • Getting Started with AI for VLSI Engineers5
  • Just Enough AI: Models and Context15
  • Prompting13
  • Trust and Verification14
  • Using AI for Engineering Work17
  • Engineering Walkthroughs7
  • Practical Foundations for AI Workflows4
  • Engineering Data5
  • Retrieval-Augmented Generation6
  • Agents and Tool Use18
  • Agent Design8
  • MCP and Skills6
  • Multi-Agent Design6
  • Practical Capstone6
  • Tokens, Cost and Latency12
    • Cost Arithmetic
    • Latency and Throughput
      • Time to First Token and Decode Speed
      • A Simple Latency Model
      • Streaming, Batching and Interactive Use
      • Rate Limits and Retries
    • Reducing Tokens
  • Agentic Workflows for Chip Teams18
  • Interview and Judgment10
  • AI Skills: Full Course Index
  • Working with AI Glossary
  • Working with AI Cheatsheet
Loading lesson

‹Latency and Throughput
  1. Topics
  2. AI Skills for VLSI Engineers
  3. Tokens, Cost and Latency
  4. Latency and Throughput
  5. Streaming, Batching and Interactive Use

Reference: Tokens, Cost and Latency · Beginner to Intermediate

Streaming, Batching and Interactive Use

Streaming for responsiveness, batching for throughput, and the trade between them.

On this page

    Streaming shows early tokens

    Streaming sends each token as it is generated instead of holding the whole reply. The first token arrives after time to first token, and the rest follow at decode pace.

    The total time is unchanged. What changes is when partial output becomes visible.

    Style

    First visible

    Full reply done

    Buffered

    When the last token finishes

    Queue plus prefill plus all decode steps.

    Streamed

    After time to first token

    Same total as buffered.

    Batching shares the work

    A server can decode several requests in one batch, sharing each step across them. Each request may run slower per token while the server finishes more tokens per second.

    The example below assumes batching slows each request from 0.020 s to 0.050 s per token. That assumption is stated because the real trade varies by setup: measure it.

    plaintext
    1
    2
    3
    4
    5
    example parameters (stated, not measured)
    alone: 0.020 s per token; batched: 0.050 s per token (assumed)
    one 100-token reply alone: 100 x 0.020 = 2.00 s
    eight 100-token replies in one batch: 100 x 0.050 = 5.00 s each
    batch tokens per second: 800 / 5.00 = 160 against 1 / 0.020 = 50 alone

    Interactive use versus bulk use

    Interactive use values the first token: short replies, streaming on, small batches. Bulk use values tokens per second: long replies, large batches, no need to watch output arrive.

    Pick the serving shape from the use case. One shape rarely serves both well.

    Use

    Goal

    Serving shape

    Interactive

    First token fast

    Streaming on, small batches.

    Bulk

    Tokens per second high

    Large batches, streaming optional.

    Common mistakes

    Common pitfall

    Turning batching up for an interactive demo, or switching streaming on for a bulk scorer and expecting it to run faster. Batching trades responsiveness for throughput, and streaming only changes visibility, never the total.

    Interview

    Likely probes: who wants which shape.

    • Name the goal first: first token fast, or tokens per second high.

    • Streaming moves visibility; batching moves throughput per request latency.

    • A demo and an overnight scorer want opposite shapes.

    Check yourself Time to first token is 0.80 s with 50 tokens at 0.040 s. When does the first token appear with streaming, and when is the full reply done?

    First token at 0.80 s; full reply at 2.80 s. Streaming moves visibility, not the total.

    Check yourself Eight 100-token replies share a batch at 0.050 s per token. How long does each take, and what rate does the batch deliver?

    5.00 s each. 800 tokens in 5.00 s is 160 tokens per second.

    Related topics

    • A simple latency model

    • Rate limits and retries

    Previous

    137 / 173

    Next: Rate Limits and Retries

    Up next

    Up nextRate Limits and Retries

    Sign in to save progress

    Practice this lessonReport an error

    See also

    • Time to First Token and Decode Speed