diff --git a/src/brevitas/quant/base.py b/src/brevitas/quant/base.py index e5286fd98..b509e6c16 100644 --- a/src/brevitas/quant/base.py +++ b/src/brevitas/quant/base.py @@ -404,12 +404,12 @@ def accumulator_bit_width_impl(accumulator_bit_width): class AccumulatorAwareZeroCenterWeightQuant(AccumulatorAwareWeightQuant): - """Experimental improved accumulator-aware weight quantized based on: `A2Q+: Improving - Accumulator-Aware Weight Quantization`. + """Experimental zero-centered accumulator-aware weight quantized based on: + `A2Q+: Improving Accumulator-Aware Weight Quantization`. When compared to A2Q, A2Q+ changes the following: - (1) an added zero-centering constraint on the weights (i.e., `PreZeroCenterZeroPoint`) - (2) an improved l1-norm bound that is derived in the referenced paper + (1) added zero-centering constraint on the weights (i.e., `PreZeroCenterZeroPoint`) + (2) a more relaxed l1-norm bound that is derived in the referenced paper """ pre_scaling_impl = AccumulatorAwareZeroCenterParameterPreScaling pre_zero_point_impl = PreZeroCenterZeroPoint diff --git a/src/brevitas/quant/scaled_int.py b/src/brevitas/quant/scaled_int.py index e00799849..5b7f16ad2 100644 --- a/src/brevitas/quant/scaled_int.py +++ b/src/brevitas/quant/scaled_int.py @@ -436,12 +436,12 @@ class Int8AccumulatorAwareWeightQuant(AccumulatorAwareWeightQuant): class Int8AccumulatorAwareZeroCenterWeightQuant(AccumulatorAwareZeroCenterWeightQuant): """ - Experimental 8-bit narrow signed improved accumulator-aware integer weight quantizer with learned - per-channel scaling factors based on `A2Q+: Improving Accumulator-Aware Weight Quantization` by - I. Colbert, A. Pappalardo, J. Petri-Koenig, and Y. Umuroglu. The quantizer learns scaling factors - in the float domain and learns norm parameter g in the log domain with the round-to-zero rounding - function. The norm is clamped according the specified accumulator bit-width using zero-centered - weights. The zero-centering is done before rounding and clippnig. + Experimental 8-bit narrow signed zero-centered accumulator-aware integer weight quantizer with + learned per-channel scaling factors based on `A2Q+: Improving Accumulator-Aware Weight Quantization` + by I. Colbert, A. Pappalardo, J. Petri-Koenig, and Y. Umuroglu (https://arxiv.org/abs/2401.10432). + The quantizer learns scaling factors in the float domain and learns norm parameter g in the log domain + with the round-to-zero rounding function. The norm is clamped according the specified accumulator + bit-width using zero-centered weights. The zero-centering is done before rounding and clipping. Examples: >>> from brevitas.nn import QuantConv2d