Skip to content

Commit

Permalink
deploy: fa8e66a
Browse files Browse the repository at this point in the history
  • Loading branch information
yiliu30 committed Jan 25, 2024
1 parent 19c7b8c commit bc6a44a
Show file tree
Hide file tree
Showing 597 changed files with 609 additions and 808 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ Classes
neural_compressor.common.base_config.ConfigRegistry
neural_compressor.common.base_config.BaseConfig
neural_compressor.common.base_config.ComposableConfig
neural_compressor.common.base_config.Options



Expand All @@ -27,6 +26,7 @@ Functions
.. autoapisummary::

neural_compressor.common.base_config.register_config
neural_compressor.common.base_config.get_all_config_set_from_config_registry



Expand Down Expand Up @@ -72,43 +72,5 @@ Attributes
The base config for all algorithm configs.


.. py:class:: Options(random_seed=1978, workspace=DEFAULT_WORKSPACE, resume_from=None, tensorboard=False)
Option Class for configs.

This class is used for configuring global variables. The global variable options is created with this class.
If you want to change global variables, you should use functions from neural_compressor.common.utils.utility.py:
set_random_seed(seed: int)
set_workspace(workspace: str)
set_resume_from(resume_from: str)
set_tensorboard(tensorboard: bool)

:param random_seed: Random seed used in neural compressor.
Default value is 1978.
:type random_seed: int
:param workspace: The directory where intermediate files and tuning history file are stored.
Default value is:
"./nc_workspace/{}/".format(datetime.datetime.now().strftime("%Y-%m-%d_%H-%M-%S")).
:type workspace: str
:param resume_from: The directory you want to resume tuning history file from.
The tuning history was automatically saved in the workspace directory
during the last tune process.
Default value is None.
:type resume_from: str
:param tensorboard:
This flag indicates whether to save the weights of the model and the inputs of each layer
for visual display.
Default value is False.
:type tensorboard: bool

Example::

from neural_compressor.common import set_random_seed, set_workspace, set_resume_from, set_tensorboard
set_random_seed(2022)
set_workspace("workspace_path")
set_resume_from("workspace_path")
set_tensorboard(True)



Original file line number Diff line number Diff line change
Expand Up @@ -65,12 +65,12 @@ Functions
It assists validation teams in retrieving logs.


.. py:class:: TuningConfig(quant_configs=None, timeout=0, max_trials=100, sampler: Sampler = None)
.. py:class:: TuningConfig(config_set=None, timeout=0, max_trials=100, sampler: Sampler = None)
Base Class for Tuning Criterion.

:param quant_configs: quantization configs. Default value is empty.
:param config_set: quantization configs. Default value is empty.
:param timeout: Tuning timeout (seconds). Default value is 0 which means early stop.
:param max_trials: Max tuning times. Default value is 100. Combine with timeout field to decide when to exit.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ Functions

.. autoapisummary::

neural_compressor.torch.quantization.autotune.get_default_tune_config
neural_compressor.torch.quantization.autotune.get_all_config_set
neural_compressor.torch.quantization.autotune.autotune


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,6 @@ Classes

neural_compressor.torch.quantization.config.RTNConfig
neural_compressor.torch.quantization.config.GPTQConfig
neural_compressor.torch.quantization.config.StaticQuantConfig
neural_compressor.torch.quantization.config.SmoothQuantConfig
neural_compressor.torch.quantization.config.FP8QConfig



Expand All @@ -29,8 +26,6 @@ Functions

neural_compressor.torch.quantization.config.get_default_rtn_config
neural_compressor.torch.quantization.config.get_default_gptq_config
neural_compressor.torch.quantization.config.get_default_static_config
neural_compressor.torch.quantization.config.get_default_sq_config



Expand Down Expand Up @@ -67,41 +62,3 @@ Functions
:returns: the default gptq config.


.. py:class:: StaticQuantConfig(w_dtype: str = 'int8', w_sym: bool = True, w_granularity: str = 'per_channel', w_algo: str = 'minmax', act_dtype: str = 'uint8', act_sym: bool = False, act_granularity: str = 'per_tensor', act_algo: str = 'kl', white_list: Optional[List[neural_compressor.common.utils.OP_NAME_OR_MODULE_TYPE]] = DEFAULT_WHITE_LIST)
Config class for static quantization.


.. py:function:: get_default_static_config() -> StaticQuantConfig
Generate the default static quant config.

:returns: the default static quant config.


.. py:class:: SmoothQuantConfig(w_dtype: str = 'int8', w_sym: bool = True, w_granularity: str = 'per_channel', w_algo: str = 'minmax', act_dtype: str = 'uint8', act_sym: bool = False, act_granularity: str = 'per_tensor', act_algo: str = 'kl', alpha: float = 0.5, folding: bool = False, scale_sharing: bool = False, init_alpha: float = 0.5, alpha_min: float = 0.0, alpha_max: float = 1.0, alpha_step: float = 0.1, shared_criterion: str = 'max', enable_blockwise_loss: bool = False, auto_alpha_args: dict = None, white_list: Optional[List[neural_compressor.common.utils.OP_NAME_OR_MODULE_TYPE]] = DEFAULT_WHITE_LIST)
Config class for smooth quantization.


.. py:function:: get_default_sq_config() -> SmoothQuantConfig
Generate the default smoothquant config.

:returns: the default smoothquant config.


.. py:class:: FP8QConfig(weight_dtype: DTYPE_RANGE = torch.float8_e4m3fn, act_dtype: DTYPE_RANGE = torch.float8_e4m3fn, act_algo: Union[str, List[str]] = 'minmax', approach: Union[str, List[str]] = 'static', device: Union[str, List[str]] = 'hpu', white_list: Optional[List[neural_compressor.common.utils.OP_NAME_OR_MODULE_TYPE]] = DEFAULT_WHITE_LIST)
Config class for FP8 quantization.


2 changes: 1 addition & 1 deletion latest/autoapi/block_mask/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@
Built with <a href="https://www.sphinx-doc.org/">Sphinx</a> using a
<a href="https://github.com/readthedocs/sphinx_rtd_theme">theme</a>
provided by <a href="https://readthedocs.org">Read the Docs</a>.
<jinja2.runtime.BlockReference object at 0x7f9195e444c0>
<jinja2.runtime.BlockReference object at 0x7f45fdfe78b0>
<p></p><div><a href='https://www.intel.com/content/www/us/en/privacy/intel-cookie-notice.html' data-cookie-notice='true'>Cookies</a> <a href='https://www.intel.com/content/www/us/en/privacy/intel-privacy-notice.html'>| Privacy</a></div>


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ <h3>Functions<a class="headerlink" href="#functions" title="Permalink to this he
Built with <a href="https://www.sphinx-doc.org/">Sphinx</a> using a
<a href="https://github.com/readthedocs/sphinx_rtd_theme">theme</a>
provided by <a href="https://readthedocs.org">Read the Docs</a>.
<jinja2.runtime.BlockReference object at 0x7f9191b2b250>
<jinja2.runtime.BlockReference object at 0x7f45fa359660>
<p></p><div><a href='https://www.intel.com/content/www/us/en/privacy/intel-cookie-notice.html' data-cookie-notice='true'>Cookies</a> <a href='https://www.intel.com/content/www/us/en/privacy/intel-privacy-notice.html'>| Privacy</a></div>


Expand Down
2 changes: 1 addition & 1 deletion latest/autoapi/neural_compressor/adaptor/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -217,7 +217,7 @@ <h2>Package Contents<a class="headerlink" href="#package-contents" title="Permal
Built with <a href="https://www.sphinx-doc.org/">Sphinx</a> using a
<a href="https://github.com/readthedocs/sphinx_rtd_theme">theme</a>
provided by <a href="https://readthedocs.org">Read the Docs</a>.
<jinja2.runtime.BlockReference object at 0x7f9191ca5de0>
<jinja2.runtime.BlockReference object at 0x7f45f9e3b880>
<p></p><div><a href='https://www.intel.com/content/www/us/en/privacy/intel-cookie-notice.html' data-cookie-notice='true'>Cookies</a> <a href='https://www.intel.com/content/www/us/en/privacy/intel-privacy-notice.html'>| Privacy</a></div>


Expand Down
2 changes: 1 addition & 1 deletion latest/autoapi/neural_compressor/adaptor/keras/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ <h3>Classes<a class="headerlink" href="#classes" title="Permalink to this headin
Built with <a href="https://www.sphinx-doc.org/">Sphinx</a> using a
<a href="https://github.com/readthedocs/sphinx_rtd_theme">theme</a>
provided by <a href="https://readthedocs.org">Read the Docs</a>.
<jinja2.runtime.BlockReference object at 0x7f9191ca6d40>
<jinja2.runtime.BlockReference object at 0x7f45f9e392d0>
<p></p><div><a href='https://www.intel.com/content/www/us/en/privacy/intel-cookie-notice.html' data-cookie-notice='true'>Cookies</a> <a href='https://www.intel.com/content/www/us/en/privacy/intel-privacy-notice.html'>| Privacy</a></div>


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@
Built with <a href="https://www.sphinx-doc.org/">Sphinx</a> using a
<a href="https://github.com/readthedocs/sphinx_rtd_theme">theme</a>
provided by <a href="https://readthedocs.org">Read the Docs</a>.
<jinja2.runtime.BlockReference object at 0x7f9191a5e830>
<jinja2.runtime.BlockReference object at 0x7f45f9e38160>
<p></p><div><a href='https://www.intel.com/content/www/us/en/privacy/intel-cookie-notice.html' data-cookie-notice='true'>Cookies</a> <a href='https://www.intel.com/content/www/us/en/privacy/intel-privacy-notice.html'>| Privacy</a></div>


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@
Built with <a href="https://www.sphinx-doc.org/">Sphinx</a> using a
<a href="https://github.com/readthedocs/sphinx_rtd_theme">theme</a>
provided by <a href="https://readthedocs.org">Read the Docs</a>.
<jinja2.runtime.BlockReference object at 0x7f9191b29300>
<jinja2.runtime.BlockReference object at 0x7f45f9e3a0b0>
<p></p><div><a href='https://www.intel.com/content/www/us/en/privacy/intel-cookie-notice.html' data-cookie-notice='true'>Cookies</a> <a href='https://www.intel.com/content/www/us/en/privacy/intel-privacy-notice.html'>| Privacy</a></div>


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@
Built with <a href="https://www.sphinx-doc.org/">Sphinx</a> using a
<a href="https://github.com/readthedocs/sphinx_rtd_theme">theme</a>
provided by <a href="https://readthedocs.org">Read the Docs</a>.
<jinja2.runtime.BlockReference object at 0x7f9191e0fd60>
<jinja2.runtime.BlockReference object at 0x7f45fa24b5e0>
<p></p><div><a href='https://www.intel.com/content/www/us/en/privacy/intel-cookie-notice.html' data-cookie-notice='true'>Cookies</a> <a href='https://www.intel.com/content/www/us/en/privacy/intel-privacy-notice.html'>| Privacy</a></div>


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@
Built with <a href="https://www.sphinx-doc.org/">Sphinx</a> using a
<a href="https://github.com/readthedocs/sphinx_rtd_theme">theme</a>
provided by <a href="https://readthedocs.org">Read the Docs</a>.
<jinja2.runtime.BlockReference object at 0x7f9196dd6fe0>
<jinja2.runtime.BlockReference object at 0x7f4602340400>
<p></p><div><a href='https://www.intel.com/content/www/us/en/privacy/intel-cookie-notice.html' data-cookie-notice='true'>Cookies</a> <a href='https://www.intel.com/content/www/us/en/privacy/intel-privacy-notice.html'>| Privacy</a></div>


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@
Built with <a href="https://www.sphinx-doc.org/">Sphinx</a> using a
<a href="https://github.com/readthedocs/sphinx_rtd_theme">theme</a>
provided by <a href="https://readthedocs.org">Read the Docs</a>.
<jinja2.runtime.BlockReference object at 0x7f9191e0c160>
<jinja2.runtime.BlockReference object at 0x7f45f9e38c70>
<p></p><div><a href='https://www.intel.com/content/www/us/en/privacy/intel-cookie-notice.html' data-cookie-notice='true'>Cookies</a> <a href='https://www.intel.com/content/www/us/en/privacy/intel-privacy-notice.html'>| Privacy</a></div>


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@
Built with <a href="https://www.sphinx-doc.org/">Sphinx</a> using a
<a href="https://github.com/readthedocs/sphinx_rtd_theme">theme</a>
provided by <a href="https://readthedocs.org">Read the Docs</a>.
<jinja2.runtime.BlockReference object at 0x7f9191e0cc40>
<jinja2.runtime.BlockReference object at 0x7f45f9e39c90>
<p></p><div><a href='https://www.intel.com/content/www/us/en/privacy/intel-cookie-notice.html' data-cookie-notice='true'>Cookies</a> <a href='https://www.intel.com/content/www/us/en/privacy/intel-privacy-notice.html'>| Privacy</a></div>


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@
Built with <a href="https://www.sphinx-doc.org/">Sphinx</a> using a
<a href="https://github.com/readthedocs/sphinx_rtd_theme">theme</a>
provided by <a href="https://readthedocs.org">Read the Docs</a>.
<jinja2.runtime.BlockReference object at 0x7f9191ddc970>
<jinja2.runtime.BlockReference object at 0x7f45f9fd8c40>
<p></p><div><a href='https://www.intel.com/content/www/us/en/privacy/intel-cookie-notice.html' data-cookie-notice='true'>Cookies</a> <a href='https://www.intel.com/content/www/us/en/privacy/intel-privacy-notice.html'>| Privacy</a></div>


Expand Down
2 changes: 1 addition & 1 deletion latest/autoapi/neural_compressor/adaptor/mxnet/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ <h3>Classes<a class="headerlink" href="#classes" title="Permalink to this headin
Built with <a href="https://www.sphinx-doc.org/">Sphinx</a> using a
<a href="https://github.com/readthedocs/sphinx_rtd_theme">theme</a>
provided by <a href="https://readthedocs.org">Read the Docs</a>.
<jinja2.runtime.BlockReference object at 0x7f9191e0e740>
<jinja2.runtime.BlockReference object at 0x7f45fa3584f0>
<p></p><div><a href='https://www.intel.com/content/www/us/en/privacy/intel-cookie-notice.html' data-cookie-notice='true'>Cookies</a> <a href='https://www.intel.com/content/www/us/en/privacy/intel-privacy-notice.html'>| Privacy</a></div>


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ <h2>Submodules<a class="headerlink" href="#submodules" title="Permalink to this
Built with <a href="https://www.sphinx-doc.org/">Sphinx</a> using a
<a href="https://github.com/readthedocs/sphinx_rtd_theme">theme</a>
provided by <a href="https://readthedocs.org">Read the Docs</a>.
<jinja2.runtime.BlockReference object at 0x7f9191a5ee30>
<jinja2.runtime.BlockReference object at 0x7f45fa248190>
<p></p><div><a href='https://www.intel.com/content/www/us/en/privacy/intel-cookie-notice.html' data-cookie-notice='true'>Cookies</a> <a href='https://www.intel.com/content/www/us/en/privacy/intel-privacy-notice.html'>| Privacy</a></div>


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -679,7 +679,7 @@ <h3>Functions<a class="headerlink" href="#functions" title="Permalink to this he
Built with <a href="https://www.sphinx-doc.org/">Sphinx</a> using a
<a href="https://github.com/readthedocs/sphinx_rtd_theme">theme</a>
provided by <a href="https://readthedocs.org">Read the Docs</a>.
<jinja2.runtime.BlockReference object at 0x7f9191ddfc40>
<jinja2.runtime.BlockReference object at 0x7f45fa249540>
<p></p><div><a href='https://www.intel.com/content/www/us/en/privacy/intel-cookie-notice.html' data-cookie-notice='true'>Cookies</a> <a href='https://www.intel.com/content/www/us/en/privacy/intel-privacy-notice.html'>| Privacy</a></div>


Expand Down
2 changes: 1 addition & 1 deletion latest/autoapi/neural_compressor/adaptor/onnxrt/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,7 @@ <h3>Classes<a class="headerlink" href="#classes" title="Permalink to this headin
Built with <a href="https://www.sphinx-doc.org/">Sphinx</a> using a
<a href="https://github.com/readthedocs/sphinx_rtd_theme">theme</a>
provided by <a href="https://readthedocs.org">Read the Docs</a>.
<jinja2.runtime.BlockReference object at 0x7f9191dddb70>
<jinja2.runtime.BlockReference object at 0x7f45fa24ae90>
<p></p><div><a href='https://www.intel.com/content/www/us/en/privacy/intel-cookie-notice.html' data-cookie-notice='true'>Cookies</a> <a href='https://www.intel.com/content/www/us/en/privacy/intel-privacy-notice.html'>| Privacy</a></div>


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ <h3>Classes<a class="headerlink" href="#classes" title="Permalink to this headin
Built with <a href="https://www.sphinx-doc.org/">Sphinx</a> using a
<a href="https://github.com/readthedocs/sphinx_rtd_theme">theme</a>
provided by <a href="https://readthedocs.org">Read the Docs</a>.
<jinja2.runtime.BlockReference object at 0x7f9191ddf9d0>
<jinja2.runtime.BlockReference object at 0x7f45fa24b610>
<p></p><div><a href='https://www.intel.com/content/www/us/en/privacy/intel-cookie-notice.html' data-cookie-notice='true'>Cookies</a> <a href='https://www.intel.com/content/www/us/en/privacy/intel-privacy-notice.html'>| Privacy</a></div>


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -226,7 +226,7 @@ <h3>Functions<a class="headerlink" href="#functions" title="Permalink to this he
Built with <a href="https://www.sphinx-doc.org/">Sphinx</a> using a
<a href="https://github.com/readthedocs/sphinx_rtd_theme">theme</a>
provided by <a href="https://readthedocs.org">Read the Docs</a>.
<jinja2.runtime.BlockReference object at 0x7f919a011b40>
<jinja2.runtime.BlockReference object at 0x7f45f9e39690>
<p></p><div><a href='https://www.intel.com/content/www/us/en/privacy/intel-cookie-notice.html' data-cookie-notice='true'>Cookies</a> <a href='https://www.intel.com/content/www/us/en/privacy/intel-privacy-notice.html'>| Privacy</a></div>


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@ <h2>Submodules<a class="headerlink" href="#submodules" title="Permalink to this
Built with <a href="https://www.sphinx-doc.org/">Sphinx</a> using a
<a href="https://github.com/readthedocs/sphinx_rtd_theme">theme</a>
provided by <a href="https://readthedocs.org">Read the Docs</a>.
<jinja2.runtime.BlockReference object at 0x7f9199e836d0>
<jinja2.runtime.BlockReference object at 0x7f45fa2b6980>
<p></p><div><a href='https://www.intel.com/content/www/us/en/privacy/intel-cookie-notice.html' data-cookie-notice='true'>Cookies</a> <a href='https://www.intel.com/content/www/us/en/privacy/intel-privacy-notice.html'>| Privacy</a></div>


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ <h3>Classes<a class="headerlink" href="#classes" title="Permalink to this headin
Built with <a href="https://www.sphinx-doc.org/">Sphinx</a> using a
<a href="https://github.com/readthedocs/sphinx_rtd_theme">theme</a>
provided by <a href="https://readthedocs.org">Read the Docs</a>.
<jinja2.runtime.BlockReference object at 0x7f9191b28dc0>
<jinja2.runtime.BlockReference object at 0x7f45fa2b6860>
<p></p><div><a href='https://www.intel.com/content/www/us/en/privacy/intel-cookie-notice.html' data-cookie-notice='true'>Cookies</a> <a href='https://www.intel.com/content/www/us/en/privacy/intel-privacy-notice.html'>| Privacy</a></div>


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ <h3>Classes<a class="headerlink" href="#classes" title="Permalink to this headin
Built with <a href="https://www.sphinx-doc.org/">Sphinx</a> using a
<a href="https://github.com/readthedocs/sphinx_rtd_theme">theme</a>
provided by <a href="https://readthedocs.org">Read the Docs</a>.
<jinja2.runtime.BlockReference object at 0x7f919a4b8940>
<jinja2.runtime.BlockReference object at 0x7f45fa16c820>
<p></p><div><a href='https://www.intel.com/content/www/us/en/privacy/intel-cookie-notice.html' data-cookie-notice='true'>Cookies</a> <a href='https://www.intel.com/content/www/us/en/privacy/intel-privacy-notice.html'>| Privacy</a></div>


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ <h3>Classes<a class="headerlink" href="#classes" title="Permalink to this headin
Built with <a href="https://www.sphinx-doc.org/">Sphinx</a> using a
<a href="https://github.com/readthedocs/sphinx_rtd_theme">theme</a>
provided by <a href="https://readthedocs.org">Read the Docs</a>.
<jinja2.runtime.BlockReference object at 0x7f9191b28dc0>
<jinja2.runtime.BlockReference object at 0x7f4602c922c0>
<p></p><div><a href='https://www.intel.com/content/www/us/en/privacy/intel-cookie-notice.html' data-cookie-notice='true'>Cookies</a> <a href='https://www.intel.com/content/www/us/en/privacy/intel-privacy-notice.html'>| Privacy</a></div>


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ <h3>Classes<a class="headerlink" href="#classes" title="Permalink to this headin
Built with <a href="https://www.sphinx-doc.org/">Sphinx</a> using a
<a href="https://github.com/readthedocs/sphinx_rtd_theme">theme</a>
provided by <a href="https://readthedocs.org">Read the Docs</a>.
<jinja2.runtime.BlockReference object at 0x7f9191ddfd90>
<jinja2.runtime.BlockReference object at 0x7f45fa2b4100>
<p></p><div><a href='https://www.intel.com/content/www/us/en/privacy/intel-cookie-notice.html' data-cookie-notice='true'>Cookies</a> <a href='https://www.intel.com/content/www/us/en/privacy/intel-privacy-notice.html'>| Privacy</a></div>


Expand Down
Loading

0 comments on commit bc6a44a

Please sign in to comment.