量化感知训练Quantization-Aware Training
Quantization-Aware Training
在训练时就模拟低精度误差,让模型量化后掉点更少。Simulate low-precision error during training so the quantised model loses less accuracy.
前向用 fake-quant 模拟 INT4 或 INT8 的取整与截断,反向仍用高精度梯度更新。
与训练后量化(PTQ)的区别:PTQ 不动权重,QAT 让模型提前适应量化误差。
代价是训练成本与调参复杂度;收益是低比特下更好的精度保持。
不是所有模型都值得做 QAT:基座已开源、量化工具成熟时,先跑 PTQ 对比更划算。
The forward pass uses fake-quant to simulate INT4 or INT8 rounding and clipping, while the backward pass still updates with high-precision gradients.
Unlike post-training quantisation, which leaves weights untouched, QAT lets the model adapt to quantisation error in advance.
The cost is training compute and tuning complexity; the benefit is better accuracy at low bit-width.
Not every model is worth QAT: when a base is open and quantisation tools are mature, running PTQ first is often cheaper.
本地部署越来越依赖 4bit;QAT 与 PTQ 的差别直接决定「量化后还能不能用」。Local deployment increasingly relies on 4-bit; the gap between QAT and PTQ decides whether a quantised model is still usable.
QAT
回到名词地图看第5段的其他 45 个词 →Back to the map: the other 45 terms in stage 5 →