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. Time to First Token and Decode Speed

Reference: Tokens, Cost and Latency · Beginner to Intermediate

Time to First Token and Decode Speed

Time to first token versus per-token speed, and which one each reply feels.

On this page

    Two different clocks

    Time to first token is the wait from sending a request to seeing the first token. It covers queueing, reading the prompt, and producing that first token.

    Time per output token is the steady pace after that: how long each further token takes. Short replies are set by the first clock; long replies are set by the second.

    Measure

    What it is

    Felt when

    Time to first token

    Queue plus prompt read plus first decode step

    Every reply, and dominates short ones.

    Time per output token

    Cost of each further token

    Long replies, where it multiplies by count.

    Total

    First-token wait plus tokens times pace

    Planning capacity and deadlines.

    What sets each one

    Queue delay comes from load: requests ahead of this one. It changes with the moment, so treat it as a measured range rather than a constant.

    Prompt reading grows with input length, and decode pace varies by model and serving setup. Anything that differs between setups varies by model: measure it.

    A worked comparison

    Assume the stated example parameters below. The calc block compares a short reply with a long one.

    plaintext
    1
    2
    3
    4
    5
    6
    7
    example parameters (stated, not measured)
    time to first token = 0.80 s
    time per output token = 0.040 s
    short reply, 5 output tokens: 0.80 + 5 x 0.040 = 0.80 + 0.20 = 1.00 s
    long reply, 50 output tokens: 0.80 + 50 x 0.040 = 0.80 + 2.00 = 2.80 s
    first-token share: 0.80 / 1.00 = 80% for the short reply
    first-token share: 0.80 / 2.80 = 2/7, about 28.6%, for the long reply

    Common mistakes

    Common pitfall

    Averaging the two clocks into one number hides the trade. A use case that needs the first token fast and a use case that needs many tokens cheap need different fixes.

    Interview

    Likely probes: which clock dominates which reply.

    • Short replies follow time to first token; long replies follow decode pace.

    • Time to first token already includes queue and prompt reading.

    • Halving time per token barely moves a 5-token reply and nearly halves a 500-token one.

    Check yourself Time to first token is 0.80 s and each token costs 0.040 s. A 5-token reply takes 1.00 s. What share is the first token?

    0.80 s of 1.00 s, so 80%. The reply is dominated by time to first token.

    Check yourself Two setups match on long replies but differ on short ones. Which clock differs?

    Time to first token. The decode pace matches, so the gap sits in queue or prompt handling before the first token.

    Related topics

    • A simple latency model

    • Cost arithmetic

    Previous

    135 / 173

    Next: A Simple Latency Model

    Up next

    Up nextA Simple Latency Model

    Sign in to save progress

    Practice this lessonReport an error

    See also

    • Streaming, Batching and Interactive Use
    • Rate Limits and Retries