Model Online / On-Site
Duration
Modules 5 modules

Course Objective & Scope

In dynamic quantization weights are converted to lower precision ahead of time while activation scales are computed at inference time, delivering quick gains without preparing a calibration dataset. The programme examines the mathematical difference between dynamic and static quantization, per-tensor and per-token scaling strategies, and which layers (Linear, LSTM, attention projections) benefit most.

In the exercises BERT-style encoder models are accelerated on CPU with PyTorch torch.ao.quantization and ONNX Runtime, and an LLM is served in vLLM with FP8 dynamic quantization. Results are compared with static methods in terms of latency, accuracy and memory.

Who Should Attend?

  • ML and deep learning engineers doing model optimisation
  • Platform teams running inference on CPUs or limited GPUs
  • MLOps engineers deploying embedding, classification and LLM models
  • Prerequisite: PyTorch experience and basic quantization concepts

Key Takeaways

  • Explain the differences between dynamic, static and weight-only quantization
  • Apply dynamic quantization with PyTorch and ONNX Runtime
  • Configure FP8 dynamic quantization for LLMs
  • Run layer-wise sensitivity analysis and keep critical layers in higher precision
  • Select a method using latency, accuracy and memory measurements

Curriculum

Dynamic versus Static Quantization
  • Computing scale and zero-point, runtime scaling
  • Per-tensor, per-channel and per-token approaches
Dynamic Quantization with PyTorch
  • torch.ao.quantization and supported layers
  • CPU acceleration of encoder models
ONNX Runtime and Portable Models
  • ONNX export and dynamic INT8 quantization
  • Latency measurement on different hardware
FP8 Dynamic Quantization for LLMs
  • FP8 dynamic scaling with vLLM and LLM Compressor
  • Combining with KV cache quantization
Sensitivity Analysis and Decision
  • Layer-wise error analysis and mixed precision
  • Comparative report against static methods

Other Courses in This Category

Get in touch