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

‹Tokens, Cost and Latency
  1. Topics
  2. AI Skills for VLSI Engineers
  3. Tokens, Cost and Latency
  4. Latency and Throughput

Reference: Tokens, Cost and Latency · Beginner to Intermediate

Latency and Throughput

Time to first token, decode speed, and a simple latency model with examples.

  • 4topics
  • 4lessons

A request to an assistant spends time waiting in line, reading the prompt, and generating one token at a time. This topic names those parts, models the total with example parameters, and shows how streaming, batching and retries fit around it.

Term

Meaning

Time to first token

Wait from sending a request to seeing the first token.

Time per output token

Steady pace of each further token once generation starts.

Prefill

Work that reads the prompt before the first token.

Queue

Wait for a free slot when the service is busy.

Throughput

Tokens finished per second across requests.

Request timeline from arrival to last token.
A request waits, reads the prompt, shows a first token, then decodes the rest one by one.

Lesson

What it covers

Time to first token and decode speed

Two clocks, what sets each, and a worked short-versus-long comparison.

A simple latency model

Total as queue plus prefill plus tokens times pace, with a runnable model.

Streaming, batching and interactive use

Streaming for visibility, batching for throughput, and which use case wants which.

Rate limits and retries

Request and token budgets, doubling backoff, and retries that stop in time.

Check yourself Prefill is 0.40 s, 100 output tokens cost 0.020 s each, and there is no queue. What is the total, and what would streaming change?

0.40 + 100 x 0.020 = 2.40 s. Streaming shows tokens as they arrive but leaves the total unchanged.

Interview

Carry one sentence per lesson: first token versus steady pace, total as queue plus prefill plus tokens times pace, streaming for visibility and batching for throughput, budgets with bounded doubling retries.

PreviousNext: Time to First Token and Decode Speed

Up next

Up nextTime to First Token and Decode Speed

Sign in to save progress

Practice this lessonReport an error

See also

  • Cost Arithmetic
  • Reducing Tokens