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
  • 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

    Exercise answers

    • Answer: Deploy with a runbook: shadow, promote, roll back
    • Answer: Kubernetes manifests, validated without a cluster
  • 10Observability and operations
CapstoneShip the triage endpointReference implementation

Module 3 · Ship it and run it · Lesson 9

Deployment and rollout

An inference container is slow to start and expensive to idle, so deployment is about cached weights, warm-up, a health check that means "ready", an autoscaling policy chosen from the traffic shape, and a rollout you can judge with your evals and reverse in one command.

90 min 1 video 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 ModalHugging Face account and CLIDocker and Docker ComposeInstall llama.cpp

By the end of this lesson you can

  • Package the server as a container with cached weights and a pinned revision, and explain every flag
  • Wire readiness and liveness on /health, warm the model before it takes traffic, and handle the 503-while-starting pattern
  • Choose an autoscaling policy from the traffic shape and the cold-start cost, with the arithmetic to defend it
  • Roll out a new adapter or build with shadow traffic and a canary judged by the eval suite, and roll back in one step
  • Place Modal-style serverless, Docker Compose and the Kubernetes options on one map and pick the one the load needs

On this page

  • Intuition: a kiln, not a toaster
  • The container and its flags
  • Ready means ready: health, warm-up and the 503
  • Autoscaling from the traffic shape
  • Rollout you can reverse
  • Worked example: what the policy costs
  • Kubernetes and the other options
  • Misconceptions and limits
  • Connections
  • Summary
  • Sources & further reading
  • Quiz

In this lesson

  1. 01Intuition: a kiln, not a toaster
  2. 02The container and its flags
  3. 03Ready means ready: health, warm-up and the 503
  4. 04Autoscaling from the traffic shape
  5. 05Rollout you can reverse
  6. 06Worked example: what the policy costs
  7. 07Kubernetes and the other options
  8. 08Misconceptions and limits
  9. 09Connections
  10. 10Summary

Sources & further reading

  • DistServe: Disaggregating Prefill and Decoding for Goodput-optimized LLM ServingPaper · Zhong, Liu, Chen, Hu, Zhu et al. · 2024The research behind prefill/decode disaggregation and the definition of goodput as requests meeting both latency targets; section 1 and the evaluation are enough to know when the pattern pays.
  • Cold start performanceDocs · ModalWhere cold-start latency comes from (queueing for a container, first-call initialisation), weights in an Image or Volume, @modal.enter, memory snapshots, and the scaledown_window / min_containers / buffer_containers trade.
  • Scaling outDocs · ModalThe autoscaler parameters and `Function.autoscaler.update()`, which changes them on a deployed app without a redeploy.
  • Run OpenAI-compatible LLM inference with vLLMDocs · ModalThe @app.server example the course's Modal app extends: the FAST_BOOT trade (eager mode versus compiled kernels), the two cache Volumes, and polling /health through the 503s while no container is up.
  • Using DockerDocs · vLLMThe `vllm/vllm-openai` run command flag by flag, and why `--ipc=host` or `--shm-size` is needed (PyTorch shares memory between processes).
  • Using KubernetesDocs · vLLMThe reference Deployment (GPU limit, PVC at the cache path, a memory-backed /dev/shm, liveness and readiness on /health), the ClusterIP Service, and the list of higher-level projects (KServe, llm-d, production-stack, Dynamo, KubeRay).
  • Gateway API Inference ExtensionDocs · Kubernetes SIGsInferencePool and the Endpoint Picker: a Kubernetes-native way to route to model servers on signals such as prefix-cache status and adapter availability instead of round robin.
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.

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