← Back to LLMs Mind Map
⚡Flashcard Drill➔
⚡ LLMsID: ptq-qat

Quantization PTQ/QAT

量化 PTQ/QAT
🎯Core Definition
Quantization maps FP16 weights WW to low-bit integers xq=round(x/s)+zx_q = \text{round}(x/s) + z with scale s=(xmax⁡−xmin⁡)/(2b−1)s = (x_{\max}-x_{\min})/(2^b-1) and zero-point zz aligned to the b-bit range. PTQ (Post-Training Quantization) calibrates an already-trained model with a small calibration set, no retraining needed; QAT (Quantization-Aware Training) simulates quantization error during training via STE (straight-through estimator: quantized forward, approximate straight-through backward), making the model adapt to quantization.
💡Use Cases
PTQ dominates LLM inference deployment (GPTQ, AWQ, etc.) since large models cannot afford retraining — calibration takes minutes; QAT fits extreme low-bit (INT4/INT3 or lower) and accuracy-critical vertical scenarios, or joint quantization during fine-tuning.
⚡Key Problems Solved
naive uniform quantization collapses due to activation outliers and distribution mismatch; PTQ uses calibration and error compensation to contain the loss, while QAT trains weights to match the quantizer — a speed-vs-accuracy trade-off: PTQ is fast but lower ceiling, QAT is slow but higher ceiling.
🎯Core Interview Exam Points
Fundamentals · Production Scenarios · Deep Dive
Core Def
Explain the core definition, underlying mechanism/math, and key principles of Quantization PTQ/QAT.
Use Cases
In production engineering, what are the primary use cases for Quantization PTQ/QAT and what core pain points does it solve?
🔥 High-Frequency Deep-Dive Questions
1
Differences between PTQ and QAT, and when to use each?
2
Role of the calibration set in PTQ; how its size/distribution affect accuracy?
3
What is the straight-through estimator (STE) in QAT and why is it needed?
4
Why does PTQ dominate for LLMs, and when is QAT required?
5
How is quantization error measured, and what are common error sources?
Updated 2026-08-12
🎯
Verify Mastery: Practice Exam Questions for "Quantization PTQ/QAT"
Take pitfall multiple-choice questions with derivation options; mistakes are automatically logged.
🚀 Start Card Practice ➔
⚡
Test muscle memory on this topic via 3-Layer Flashcards
Active Recall: Mentally formulate Prompt ➔ Math Derivation ➔ Benchmark Implementation in 3 minutes.
🎯 Drill This Card Now➔
← Previous CardAlignment Tax & Preference DataNext Card →Low-Bit INT8/INT4

🔗 More LLMs Knowledge Cards

引用出处: TalentMe 450+ 工业级 AI 架构考点知识库 (Tech Vault) · 遵循 CC-BY-4.0 知识共享协议
URL: https://talentme.airsota.com/resources/tech/roadmap/mindmap/LLM/card/ptq-qat