quark.torch

quark.torch#

Package Contents#

Classes#

ModelQuantizer

Provides an API for quantizing deep learning models using PyTorch. This class handles the configuration and processing of the model for quantization based on user-defined parameters. It is essential to ensure that the 'config' provided has all necessary quantization parameters defined. This class assumes that the model is compatible with the quantization settings specified in 'config'.

ModelPruner

Provides an API for pruning deep learning models using PyTorch. This class handles the configuration and processing of the model for pruning based on user-defined parameters. It is essential to ensure that the 'config' provided has all necessary pruning parameters defined. This class assumes that the model is compatible with the pruning settings specified in 'config'.

ModelExporter

Provides an API for exporting quantized Pytorch deep learning models.

ModelImporter

Provides an API for importing quantized Pytorch deep learning models.

Functions#

load_params(→ torch.nn.Module)

Instantiate a quantized model from saved model files, which is generated from "save_params" function.

save_params(, quant_mode, compressed, reorder)

Save the network architecture or configurations and parameters of the quantized model.