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

    Exercise answers

    • Answer: Quantise and prove it
    • Answer: FP8 KV cache: tokens gained against 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
  • 10Observability and operations
CapstoneShip the triage endpointReference implementation

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

Quantisation with evidence

Quantisation trades bits for memory bandwidth, so it is the biggest latency and cost lever you own; the only acceptable proof that it didn't break your model is a paired run of your own evals plus a KL check against the full-precision weights.

90 min 2 videos 3 exercises 7-question quiz Answers
Setup for the exercises:Install Claude CodePython with uvInstall llama.cppThe Quillmoor triage kitServe a model with vLLMRun GPU code on ModalHugging Face account and CLI

By the end of this lesson you can

  • Explain weight-only (GPTQ, AWQ, GGUF k-quants) and weight-and-activation (SmoothQuant, FP8, NVFP4) quantisation and name the hardware each needs
  • Predict the memory and batch-1 decode change of a scheme from bytes per parameter and bandwidth, and say why 4-bit weights help latency more than throughput
  • Quantise a model offline with a calibration set drawn from your own traffic, with LLM Compressor or llama-quantize
  • Measure the cost with a paired eval (negative flips, not averages) and a KL-divergence check, and apply a ship threshold set before measuring
  • Quantise the KV cache to FP8 and say what it buys and what to watch

On this page

  • Intuition: fewer bytes, same reads
  • What gets quantised, and to what
  • Weight-only integer: GPTQ, AWQ and the GGUF k-quants
  • Weight-and-activation: SmoothQuant, FP8, NVFP4
  • The KV cache
  • Worked example: Quillmoor's model at three precisions
  • Calibrate on your own traffic
  • Evidence: paired deltas, negative flips and KL
  • Choosing for Quillmoor
  • Connections
  • Summary
  • Sources & further reading
  • Quiz

In this lesson

  1. 01Intuition: fewer bytes, same reads
  2. 02What gets quantised, and to what
  3. 03Worked example: Quillmoor's model at three precisions
  4. 04Calibrate on your own traffic
  5. 05Evidence: paired deltas, negative flips and KL
  6. 06Choosing for Quillmoor
  7. 07Connections
  8. 08Summary

Sources & further reading

  • GPTQ: Accurate Post-Training Quantization for Generative Pre-trained TransformersPaper · Frantar, Ashkboos, Hoefler, Alistarh · 2022The one-shot weight quantisation method behind most W4A16 checkpoints. Section 3 for the layer-wise error-compensation idea; Section 4 for why it needs calibration data.
  • AWQ: Activation-aware Weight Quantization for LLM Compression and AccelerationPaper · Lin, Tang, Tang, Yang, Chen et al. · MIT · 2023Protect the one percent of salient weights by scaling, chosen from activation statistics rather than weight magnitude. Section 3 is the argument; the MLSys 2024 version has the serving numbers.
  • SmoothQuant: Accurate and Efficient Post-Training Quantization for Large Language ModelsPaper · Xiao, Lin, Seznec, Wu, Demouth, Han · 2022Why activations are harder to quantise than weights (outlier channels) and how to migrate the difficulty into the weights. Sections 3 and 4.
  • KVQuant: Towards 10 Million Context Length LLM Inference with KV Cache QuantizationPaper · Hooper, Kim, Mohammadzadeh, Mahoney, Shao et al. · Berkeley · 2024What goes wrong when you quantise keys and values naively (per-channel key outliers, pre-RoPE), and why the KV cache deserves its own scheme. Section 3.
  • Introducing NVFP4 for Efficient and Accurate Low-Precision InferenceLab research · NVIDIA · 2025The block-scaled 4-bit floating-point format on Blackwell, its two-level scaling, and the accuracy claims against FP8 that this lesson restates.
  • Overview of natively supported quantization schemes in TransformersLab research · Hugging Face · 2023A measured comparison of 4-bit GPTQ and bitsandbytes against fp16 on a public leaderboard, and the fine-tune-then-quantise workflow this course follows.
  • vLLM quantizationDocs · vLLMWhich formats vLLM loads and the hardware table (which compute capability runs AWQ, GPTQ, FP8, GGUF); the quantized KV cache page beside it for `--kv-cache-dtype`.
  • llama.cpp quantizeDocs · ggml`llama-quantize`, the importance matrix option, and the bits-per-weight table for the k-quants that the GGUF numbers here are scaled from.
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.

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