Skip to content

Commit

Permalink
deploy: 2445811
Browse files Browse the repository at this point in the history
  • Loading branch information
XuehaoSun committed Sep 14, 2024
1 parent e968c1d commit 834d073
Show file tree
Hide file tree
Showing 561 changed files with 576 additions and 565 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ Functions
Module Contents
---------------

.. py:class:: AutoRoundQuantizer(quant_config: dict = {}, enable_full_range: bool = False, batch_size: int = 8, amp: bool = True, device: str = None, lr_scheduler=None, dataset: Union[str, list, tuple, torch.utils.data.DataLoader] = 'NeelNanda/pile-10k', enable_quanted_input: bool = True, enable_minmax_tuning: bool = True, lr: float = None, minmax_lr: float = None, low_gpu_mem_usage: bool = False, iters: int = 200, seqlen: int = 2048, nsamples: int = 128, sampler: str = 'rand', seed: int = 42, nblocks: int = 1, gradient_accumulate_steps: int = 1, not_use_best_mse: bool = False, dynamic_max_gap: int = -1, data_type: str = 'int', scale_dtype: str = 'fp16', quant_block_list: list = None, act_bits: int = 32, act_group_size: int = None, act_sym: bool = None, act_dynamic: bool = True, low_cpu_mem_usage: bool = False, **kwargs)
.. py:class:: AutoRoundQuantizer(quant_config: dict = {}, enable_full_range: bool = False, batch_size: int = 8, amp: bool = True, device: str = None, lr_scheduler=None, dataset: Union[str, list, tuple, torch.utils.data.DataLoader] = 'NeelNanda/pile-10k', enable_quanted_input: bool = True, enable_minmax_tuning: bool = True, lr: float = None, minmax_lr: float = None, low_gpu_mem_usage: bool = False, iters: int = 200, seqlen: int = 2048, nsamples: int = 128, sampler: str = 'rand', seed: int = 42, nblocks: int = 1, gradient_accumulate_steps: int = 1, not_use_best_mse: bool = False, dynamic_max_gap: int = -1, data_type: str = 'int', scale_dtype: str = 'fp16', quant_block_list: list = None, act_bits: int = 32, act_group_size: int = None, act_sym: bool = None, act_dynamic: bool = True, low_cpu_mem_usage: bool = False, export_format: str = 'itrex', **kwargs)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,14 +29,20 @@ Functions
Module Contents
---------------

.. py:function:: save(model, output_dir='./saved_results')
.. py:function:: save(model, output_dir='./saved_results', format=LoadFormat.DEFAULT, **kwargs)
Save the quantized model and config to the output path.

:param model: raw fp32 model or prepared model.
:type model: torch.nn.module
:param output_dir: output path to save.
:type output_dir: str, optional
:param format: The format in which to save the model. Options include "default" and "huggingface". Defaults to "default".
:type format: str, optional
:param kwargs: Additional arguments for specific formats. For example:
- safe_serialization (bool): Whether to use safe serialization when saving (only applicable for 'huggingface' format). Defaults to True.
- tokenizer (Tokenizer, optional): The tokenizer to be saved along with the model (only applicable for 'huggingface' format).
- max_shard_size (str, optional): The maximum size for each shard (only applicable for 'huggingface' format). Defaults to "5GB".


.. py:function:: load(model_name_or_path, original_model=None, format=LoadFormat.DEFAULT, device='cpu', **kwargs)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,7 @@ Module Contents
:returns: the default teq config.


.. py:class:: AutoRoundConfig(dtype: str = 'int', bits: int = 4, use_sym: bool = False, group_size: int = 128, act_bits: int = 32, act_group_size: int = None, act_sym: bool = None, act_dynamic: bool = True, enable_full_range: bool = False, batch_size: int = 8, lr_scheduler=None, enable_quanted_input: bool = True, enable_minmax_tuning: bool = True, lr: float = None, minmax_lr: float = None, low_gpu_mem_usage: bool = False, iters: int = 200, seqlen: int = 2048, nsamples: int = 128, sampler: str = 'rand', seed: int = 42, nblocks: int = 1, gradient_accumulate_steps: int = 1, not_use_best_mse: bool = False, dynamic_max_gap: int = -1, scale_dtype: str = 'fp16', use_layer_wise: bool = False, quant_block_list: list = None, white_list: Optional[List[neural_compressor.common.utils.OP_NAME_OR_MODULE_TYPE]] = DEFAULT_WHITE_LIST)
.. py:class:: AutoRoundConfig(dtype: str = 'int', bits: int = 4, use_sym: bool = False, group_size: int = 128, act_bits: int = 32, act_group_size: int = None, act_sym: bool = None, act_dynamic: bool = True, enable_full_range: bool = False, batch_size: int = 8, lr_scheduler=None, enable_quanted_input: bool = True, enable_minmax_tuning: bool = True, lr: float = None, minmax_lr: float = None, low_gpu_mem_usage: bool = False, iters: int = 200, seqlen: int = 2048, nsamples: int = 128, sampler: str = 'rand', seed: int = 42, nblocks: int = 1, gradient_accumulate_steps: int = 1, not_use_best_mse: bool = False, dynamic_max_gap: int = -1, scale_dtype: str = 'fp16', use_layer_wise: bool = False, quant_block_list: list = None, export_format: str = 'itrex', white_list: Optional[List[neural_compressor.common.utils.OP_NAME_OR_MODULE_TYPE]] = DEFAULT_WHITE_LIST)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ <h2>Submodules<a class="headerlink" href="#submodules" title="Link to this headi
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 0x7f548cdbf9d0>
<jinja2.runtime.BlockReference object at 0x7f75c6de0640>
<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 @@ -678,7 +678,7 @@ <h2>Module Contents<a class="headerlink" href="#module-contents" title="Link to
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 0x7f549432dde0>
<jinja2.runtime.BlockReference object at 0x7f75ce668760>
<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 @@ -125,7 +125,7 @@ <h2>Module Contents<a class="headerlink" href="#module-contents" title="Link to
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 0x7f549438f8b0>
<jinja2.runtime.BlockReference object at 0x7f75ce442f50>
<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 @@ -225,7 +225,7 @@ <h2>Module Contents<a class="headerlink" href="#module-contents" title="Link to
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 0x7f549438cf40>
<jinja2.runtime.BlockReference object at 0x7f75ce440b80>
<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 @@ -127,7 +127,7 @@ <h2>Submodules<a class="headerlink" href="#submodules" title="Link to this headi
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 0x7f548cd91f30>
<jinja2.runtime.BlockReference object at 0x7f75ce442710>
<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>Module Contents<a class="headerlink" href="#module-contents" title="Link to
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 0x7f548cd90250>
<jinja2.runtime.BlockReference object at 0x7f75c6dcf5e0>
<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 @@ -134,7 +134,7 @@ <h2>Module Contents<a class="headerlink" href="#module-contents" title="Link to
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 0x7f548cd92710>
<jinja2.runtime.BlockReference object at 0x7f75c6f70f70>
<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 @@ -134,7 +134,7 @@ <h2>Module Contents<a class="headerlink" href="#module-contents" title="Link to
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 0x7f548cd92260>
<jinja2.runtime.BlockReference object at 0x7f75c6f71cf0>
<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>Module Contents<a class="headerlink" href="#module-contents" title="Link to
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 0x7f548cd913c0>
<jinja2.runtime.BlockReference object at 0x7f75ce3690c0>
<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 @@ -134,7 +134,7 @@ <h2>Module Contents<a class="headerlink" href="#module-contents" title="Link to
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 0x7f548cd91b10>
<jinja2.runtime.BlockReference object at 0x7f75ce36beb0>
<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 @@ -134,7 +134,7 @@ <h2>Module Contents<a class="headerlink" href="#module-contents" title="Link to
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 0x7f5494126da0>
<jinja2.runtime.BlockReference object at 0x7f75ce24bac0>
<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 @@ -134,7 +134,7 @@ <h2>Module Contents<a class="headerlink" href="#module-contents" title="Link to
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 0x7f548cd904c0>
<jinja2.runtime.BlockReference object at 0x7f75c6f731f0>
<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 @@ -134,7 +134,7 @@ <h2>Module Contents<a class="headerlink" href="#module-contents" title="Link to
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 0x7f548cd93be0>
<jinja2.runtime.BlockReference object at 0x7f75c6f70f70>
<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 @@ -134,7 +134,7 @@ <h2>Module Contents<a class="headerlink" href="#module-contents" title="Link to
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 0x7f549435dc90>
<jinja2.runtime.BlockReference object at 0x7f75ce20a500>
<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 @@ -134,7 +134,7 @@ <h2>Module Contents<a class="headerlink" href="#module-contents" title="Link to
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 0x7f5494083370>
<jinja2.runtime.BlockReference object at 0x7f75ce2089d0>
<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 @@ -134,7 +134,7 @@ <h2>Module Contents<a class="headerlink" href="#module-contents" title="Link to
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 0x7f5494248190>
<jinja2.runtime.BlockReference object at 0x7f75ce283070>
<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 @@ <h2>Submodules<a class="headerlink" href="#submodules" title="Link to this headi
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 0x7f549438cac0>
<jinja2.runtime.BlockReference object at 0x7f75cb301540>
<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 @@ -125,7 +125,7 @@ <h2>Module Contents<a class="headerlink" href="#module-contents" title="Link to
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 0x7f548cdbc610>
<jinja2.runtime.BlockReference object at 0x7f75c6de3460>
<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 @@ -143,7 +143,7 @@ <h2>Module Contents<a class="headerlink" href="#module-contents" title="Link to
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 0x7f549404e140>
<jinja2.runtime.BlockReference object at 0x7f75c6dcc2e0>
<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 @@ -134,7 +134,7 @@ <h2>Module Contents<a class="headerlink" href="#module-contents" title="Link to
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 0x7f548cdbc130>
<jinja2.runtime.BlockReference object at 0x7f75c6de3640>
<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 @@ -134,7 +134,7 @@ <h2>Module Contents<a class="headerlink" href="#module-contents" title="Link to
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 0x7f548cdbf790>
<jinja2.runtime.BlockReference object at 0x7f75c6de1c00>
<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 @@ -159,7 +159,7 @@ <h2>Module Contents<a class="headerlink" href="#module-contents" title="Link to
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 0x7f548cdbf1c0>
<jinja2.runtime.BlockReference object at 0x7f75c6de1870>
<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 834d073

Please sign in to comment.