llmcompressor.observers.min_max
Classes:
-
MemorylessMinMaxObserver–Compute quantization parameters by taking the min/max of the observed value
-
MinMaxObserver–Compute quantization parameters by taking the moving average of all min/max values
-
StaticMinMaxObserver–Compute quantization parameters by taking the min/max of all observed values
MemorylessMinMaxObserver
MemorylessMinMaxObserver(
base_name: str,
args: QuantizationArgs,
module: Optional[Module] = None,
**observer_kwargs,
)
Bases: Observer
Compute quantization parameters by taking the min/max of the observed value
Parameters:
-
(base_namestr) –str used to name the observer attribute
-
(argsQuantizationArgs) –quantization args used to calibrate and quantize the observed value
-
(moduleOptional[Module], default:None) –optional module with attached quantization parameters. This argument is required to utilize existing qparams such as global_scale or g_idx
-
–**observer_kwargskeyword arguments for observer initialization
Source code in llmcompressor/observers/base.py
MinMaxObserver
MinMaxObserver(
base_name: str,
args: QuantizationArgs,
module: Optional[Module] = None,
**observer_kwargs,
)
Bases: MovingAverageObserverBase
Compute quantization parameters by taking the moving average of all min/max values
Parameters:
-
(base_namestr) –str used to name the observer attribute
-
(argsQuantizationArgs) –quantization args used to calibrate and quantize the observed value
-
(moduleOptional[Module], default:None) –optional module with attached quantization parameters. This argument is required to utilize existing qparams such as global_scale or g_idx
-
–**observer_kwargskeyword arguments for observer initialization
Source code in llmcompressor/observers/moving_base.py
StaticMinMaxObserver
Bases: Observer
Compute quantization parameters by taking the min/max of all observed values
Parameters:
-
–base_namestr used to name the observer attribute
-
–argsquantization args used to calibrate and quantize the observed value
-
–moduleoptional module with attached quantization parameters. This argument is required to utilize existing qparams such as global_scale or g_idx
-
–**observer_kwargskeyword arguments for observer initialization