quark.torch.quantization

quark.torch.quantization#

Submodules#

Package Contents#

Classes#

Config

A class that encapsulates comprehensive quantization configurations for a machine learning model, allowing for detailed and hierarchical control over quantization parameters across different model components.

QuantizationConfig

A data class that specifies quantization configurations for different components of a module, allowing hierarchical control over how each tensor type is quantized.

Uint4PerTensorSpec

Helper class that provides a standard way to create an ABC using

Uint4PerChannelSpec

Helper class that provides a standard way to create an ABC using

Uint4PerGroupSpec

Helper class that provides a standard way to create an ABC using

Int4PerTensorSpec

Helper class that provides a standard way to create an ABC using

Int4PerChannelSpec

Helper class that provides a standard way to create an ABC using

Int4PerGroupSpec

Helper class that provides a standard way to create an ABC using

Uint8PerTensorSpec

Helper class that provides a standard way to create an ABC using

Uint8PerChannelSpec

Helper class that provides a standard way to create an ABC using

Uint8PerGroupSpec

Helper class that provides a standard way to create an ABC using

Int8PerTensorSpec

Helper class that provides a standard way to create an ABC using

Int8PerChannelSpec

Helper class that provides a standard way to create an ABC using

Int8PerGroupSpec

Helper class that provides a standard way to create an ABC using

FP8E4M3PerTensorSpec

Helper class that provides a standard way to create an ABC using

FP8E4M3PerChannelSpec

Helper class that provides a standard way to create an ABC using

FP8E4M3PerGroupSpec

Helper class that provides a standard way to create an ABC using

FP8E5M2PerTensorSpec

Helper class that provides a standard way to create an ABC using

FP8E5M2PerChannelSpec

Helper class that provides a standard way to create an ABC using

FP8E5M2PerGroupSpec

Helper class that provides a standard way to create an ABC using

Float16Spec

Helper class that provides a standard way to create an ABC using

Bfloat16Spec

Helper class that provides a standard way to create an ABC using

MXSpec

Helper class that provides a standard way to create an ABC using

MX6Spec

Helper class that provides a standard way to create an ABC using

MX9Spec

Helper class that provides a standard way to create an ABC using

BFP16Spec

Helper class that provides a standard way to create an ABC using

QuantizationSpec

A data class that defines the specifications for quantizing tensors within a model.

AWQConfig

Configuration for Activation-aware Weight Quantization (AWQ).

GPTQConfig

A data class that defines the specifications for Accurate Post-Training Quantization for Generative Pre-trained Transformers (GPTQ).

RotationConfig

A data class that defines the specifications for rotation settings in processing algorithms.

SmoothQuantConfig

A data class that defines the specifications for Smooth Quantization.

AutoSmoothQuantConfig

A data class that defines the specifications for AutoSmoothQuant.

QuaRotConfig

A data class that defines the specifications for the QuaRot algorithm.

Functions#

load_pre_optimization_config_from_file(→ PreQuantOptConfig)

Load pre-optimization configuration from a JSON file.

load_quant_algo_config_from_file(→ AlgoConfig)

Load quantization algorithm configuration from a JSON file.