-
Notifications
You must be signed in to change notification settings - Fork 262
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
544 changed files
with
2,310 additions
and
527 deletions.
There are no files selected for viewing
52 changes: 52 additions & 0 deletions
52
latest/_sources/autoapi/neural_compressor/common/base_config/index.rst.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
:orphan: | ||
|
||
:py:mod:`neural_compressor.common.base_config` | ||
============================================== | ||
|
||
.. py:module:: neural_compressor.common.base_config | ||
Module Contents | ||
--------------- | ||
|
||
Classes | ||
~~~~~~~ | ||
|
||
.. autoapisummary:: | ||
|
||
neural_compressor.common.base_config.BaseConfig | ||
|
||
|
||
|
||
Functions | ||
~~~~~~~~~ | ||
|
||
.. autoapisummary:: | ||
|
||
neural_compressor.common.base_config.register_config | ||
|
||
|
||
|
||
.. py:function:: register_config(framework_name='None', algo_name=None) | ||
Register config decorator. | ||
|
||
The register the configuration classes for different algorithms within specific frameworks. | ||
|
||
Usage example: | ||
@register_config(framework_name="PyTorch", algo_name="ExampleAlgorithm") | ||
class ExampleAlgorithmConfig: | ||
# Configuration details for the ExampleAlgorithm | ||
|
||
:param framework_name: the framework name. Defaults to "None". | ||
:param algo_name: the algorithm name. Defaults to None. | ||
|
||
|
||
.. py:class:: BaseConfig | ||
The base config for all algorithm configs. | ||
|
||
|
8 changes: 8 additions & 0 deletions
8
latest/_sources/autoapi/neural_compressor/common/index.rst.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
:orphan: | ||
|
||
:py:mod:`neural_compressor.common` | ||
================================== | ||
|
||
.. py:module:: neural_compressor.common | ||
8 changes: 8 additions & 0 deletions
8
latest/_sources/autoapi/neural_compressor/common/utility/index.rst.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
:orphan: | ||
|
||
:py:mod:`neural_compressor.common.utility` | ||
========================================== | ||
|
||
.. py:module:: neural_compressor.common.utility | ||
8 changes: 8 additions & 0 deletions
8
latest/_sources/autoapi/neural_compressor/torch/algorithms/index.rst.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
:orphan: | ||
|
||
:py:mod:`neural_compressor.torch.algorithms` | ||
============================================ | ||
|
||
.. py:module:: neural_compressor.torch.algorithms | ||
8 changes: 8 additions & 0 deletions
8
.../_sources/autoapi/neural_compressor/torch/algorithms/rtn_quantize/index.rst.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
:orphan: | ||
|
||
:py:mod:`neural_compressor.torch.algorithms.rtn_quantize` | ||
========================================================= | ||
|
||
.. py:module:: neural_compressor.torch.algorithms.rtn_quantize | ||
8 changes: 8 additions & 0 deletions
8
latest/_sources/autoapi/neural_compressor/torch/index.rst.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
:orphan: | ||
|
||
:py:mod:`neural_compressor.torch` | ||
================================= | ||
|
||
.. py:module:: neural_compressor.torch | ||
55 changes: 55 additions & 0 deletions
55
latest/_sources/autoapi/neural_compressor/torch/quantization/config/index.rst.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
:orphan: | ||
|
||
:py:mod:`neural_compressor.torch.quantization.config` | ||
===================================================== | ||
|
||
.. py:module:: neural_compressor.torch.quantization.config | ||
Module Contents | ||
--------------- | ||
|
||
Classes | ||
~~~~~~~ | ||
|
||
.. autoapisummary:: | ||
|
||
neural_compressor.torch.quantization.config.Backend | ||
neural_compressor.torch.quantization.config.RTNWeightQuantConfig | ||
|
||
|
||
|
||
Functions | ||
~~~~~~~~~ | ||
|
||
.. autoapisummary:: | ||
|
||
neural_compressor.torch.quantization.config.get_default_rtn_config | ||
|
||
|
||
|
||
.. py:class:: Backend | ||
Generic enumeration. | ||
|
||
Derive from this class to define new enumerations. | ||
|
||
|
||
.. py:class:: RTNWeightQuantConfig(weight_dtype: str = 'int', weight_bits: int = 4, weight_group_size: int = 32, weight_sym: bool = True, act_dtype: str = 'fp32', enable_full_range: bool = False, enable_mse_search: bool = False, group_dim: int = 1) | ||
Config class for round-to-nearest weight-only quantization. | ||
|
||
|
||
.. py:function:: get_default_rtn_config() -> RTNWeightQuantConfig | ||
Generate the default rtn config. | ||
|
||
:returns: the default rtn config. | ||
|
||
|
8 changes: 8 additions & 0 deletions
8
latest/_sources/autoapi/neural_compressor/torch/quantization/index.rst.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
:orphan: | ||
|
||
:py:mod:`neural_compressor.torch.quantization` | ||
============================================== | ||
|
||
.. py:module:: neural_compressor.torch.quantization | ||
33 changes: 33 additions & 0 deletions
33
...st/_sources/autoapi/neural_compressor/torch/quantization/quantize/index.rst.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
:orphan: | ||
|
||
:py:mod:`neural_compressor.torch.quantization.quantize` | ||
======================================================= | ||
|
||
.. py:module:: neural_compressor.torch.quantization.quantize | ||
Module Contents | ||
--------------- | ||
|
||
|
||
Functions | ||
~~~~~~~~~ | ||
|
||
.. autoapisummary:: | ||
|
||
neural_compressor.torch.quantization.quantize.quantize | ||
|
||
|
||
|
||
.. py:function:: quantize(model: torch.nn.Module, quant_config: neural_compressor.common.base_config.BaseConfig, calib_func: Callable = None, calib_func_arg: Any = None) -> torch.nn.Module | ||
The main entry to quantize model. | ||
|
||
:param model: a float model to be quantized. | ||
:param quant_config: a quantization configuration. | ||
:param calib_func: a calibration function for calibrating the model. Defaults to None. | ||
:param calib_func_arg: positional arguments for `calib_func`. Defaults to None. | ||
|
||
:returns: The quantized model. | ||
|
||
|
37 changes: 37 additions & 0 deletions
37
latest/_sources/autoapi/neural_compressor/torch/utils/index.rst.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
:orphan: | ||
|
||
:py:mod:`neural_compressor.torch.utils` | ||
======================================= | ||
|
||
.. py:module:: neural_compressor.torch.utils | ||
Module Contents | ||
--------------- | ||
|
||
|
||
Functions | ||
~~~~~~~~~ | ||
|
||
.. autoapisummary:: | ||
|
||
neural_compressor.torch.utils.register_algo | ||
|
||
|
||
|
||
.. py:function:: register_algo(name) | ||
Decorator function to register algorithms in the algos_mapping dictionary. | ||
|
||
Usage example: | ||
@register_algo(name=example_algo) | ||
def example_algo(model: torch.nn.Module, quant_config: RTNWeightQuantConfig) -> torch.nn.Module: | ||
... | ||
|
||
:param name: The name under which the algorithm function will be registered. | ||
:type name: str | ||
|
||
:returns: The decorator function to be used with algorithm functions. | ||
:rtype: decorator | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.