Coders In Hoods
  • Courses
  • Roles
  • Blog
  • Setup

Coders In Hoods AI Academy

Every course is free. Sign in to start, and your progress, quiz scores and bookmarks follow you.

AI Academy

  • Courses
  • Paths
  • Setup guides
  • How we teach

Role roadmaps

  • AI Engineer
  • Forward Deployed Engineer
  • Machine Learning Engineer
  • All roles

Coders In Hoods

  • The agency
  • Coaching for teams
  • Blog
  • LinkedIn
  • X (Twitter)

Contact

codersinhoods@gmail.com

© Coders In Hoods · since 2019

Course overview

Serving Open-Weight Models

Free · sign in to start and track progress

1 · What the server does with your GPU

  • 1Inside an inference engine
  • 2GPU sizing arithmetic
  • 3Serving your adapter

2 · Smaller, faster, still correct

  • 4Quantisation with evidence
  • 5Latency, throughput and honest benchmarks

    Exercise answers

    • Answer: Turn ten result files into a benchmark report
    • Answer: Reproduce the chunk-budget trade on a GPU
  • 6Speculative decoding in practice
  • 7Structured outputs and tool calls

3 · Ship it and run it

  • 8What self-hosting makes you responsible for
  • 9Deployment and rollout
  • 10Observability and operations
CapstoneShip the triage endpointReference implementation

Module 2 · Smaller, faster, still correct · Lesson 5

Latency, throughput and honest benchmarks

Time to first token, inter-token latency and goodput pull against each other; the knobs are the token budget per scheduler step, the sequence cap, chunked prefill and prefix caching, and a benchmark is only as good as the load shape and the fields its report states.

90 min 2 videos 3 exercises 7-question quiz Answers
Setup for the exercises:Install Claude CodePython with uvThe Quillmoor triage kitServe a model with vLLMRun GPU code on Modal

By the end of this lesson you can

  • Define TTFT, TPOT, ITL, end-to-end latency, tokens per second per system and per user, and goodput, and say where benchmark tools disagree
  • Read a concurrency sweep, find the knee of the latency-throughput curve and compute goodput against a stated SLO
  • Explain the token budget per scheduler step, chunked prefill and preemption, and predict what `--max-num-batched-tokens` and `--max-num-seqs` do to TTFT and ITL tails
  • Choose between CUDA graphs and eager mode as a boot-time versus steady-state trade
  • Write a benchmark report with every field a reader needs to reproduce or distrust it

On this page

  • The metrics, precisely
  • Load: concurrency, not rate
  • Inside a scheduler step
  • Worked example: the kit's sweep
  • The report
  • Connections
  • Summary
  • Sources & further reading
  • Quiz

In this lesson

  1. 01The metrics, precisely
  2. 02Load: concurrency, not rate
  3. 03Inside a scheduler step
  4. 04Worked example: the kit's sweep
  5. 05The report
  6. 06Connections
  7. 07Summary

Sources & further reading

  • Taming Throughput-Latency Tradeoff in LLM Inference with Sarathi-ServePaper · Agrawal, Kedia, Panwar, Mohan, Kwatra et al. · Microsoft Research · 2024Chunked prefill and stall-free scheduling, with the measurements of how a long prefill stalls every decode in the same step. Sections 3 and 4 are the argument; Section 6 the numbers.
  • DistServe: Disaggregating Prefill and Decoding for Goodput-optimized Large Language Model ServingPaper · Zhong, Liu, Chen, Hu, Zhu et al. · 2024The definition of goodput as requests per second that meet both latency targets, and why optimising throughput alone misses the point. Section 2.
  • Orca: A Distributed Serving System for Transformer-Based Generative ModelsPaper · Yu, Jeong, Kim, Kim, Chun · 2022Iteration-level scheduling, the reason a scheduler step is the unit everything in this lesson is measured in.
  • BurstGPT: A Real-world Workload Dataset to Optimize LLM Serving SystemsPaper · Wang et al. · 2024Real traces of request arrivals and lengths; the evidence that production load is bursty and that a Poisson benchmark is the optimistic case.
  • LLM Inference Benchmarking: Fundamental ConceptsLab research · NVIDIA · 2025The metric definitions this lesson uses (TTFT includes queueing; ITL and TPOT; per-system and per-user tokens per second), why concurrency is the better load control, how far to sweep, and the GenAI-Perf versus LLMPerf difference.
  • vLLM benchmark CLIDocs · vLLM`vllm bench serve`: datasets (including the `custom` JSONL with a `prompt` key), `--max-concurrency`, `--request-rate`, `--burstiness`, `--save-result`, `--save-detailed`, and how it defines TTFT, ITL and TPOT.
  • vLLM optimization and tuningDocs · vLLMPreemption and the flags that cause it, chunked prefill's decode-first scheduling, the `max_num_batched_tokens` guidance (2048 for ITL, higher for TTFT and throughput), and `--enforce-eager` versus compiled CUDA graphs.
Free · sign in to start

Sign in to keep reading.

Free, no card. We use your account to save progress, quiz scores, bookmarks and occasionally send updates from our team.

  • 7 more sections
  • 3 hands-on exercises
  • A 7-question quiz
  • Progress, quiz scores and bookmarks