-
Notifications
You must be signed in to change notification settings - Fork 258
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
update documentation for 3x API (#1923)
Signed-off-by: chensuyue <[email protected]> Signed-off-by: xin3he <[email protected]> Signed-off-by: yiliu30 <[email protected]>
- Loading branch information
Showing
23 changed files
with
152 additions
and
499 deletions.
There are no files selected for viewing
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
File renamed without changes.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
Design | ||
===== | ||
|
||
## Architecture | ||
|
||
<a target="_blank" href="imgs/architecture.png"> | ||
<img src="imgs/architecture.png" alt="Architecture"> | ||
</a> | ||
|
||
## Workflows | ||
|
||
Intel® Neural Compressor provides two workflows: Quantization and Auto-tune. | ||
|
||
<a target="_blank" href="imgs/workflow.png"> | ||
<img src="imgs/workflow.png" alt="Workflow"> | ||
</a> |
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,88 @@ | ||
# Getting Started | ||
|
||
1. [Quick Samples](#quick-samples) | ||
|
||
2. [Feature Matrix](#feature-matrix) | ||
|
||
## Quick Samples | ||
|
||
```shell | ||
# Install Intel Neural Compressor | ||
pip install neural-compressor-pt | ||
``` | ||
```python | ||
from transformers import AutoModelForCausalLM | ||
from neural_compressor.torch.quantization import RTNConfig, prepare, convert | ||
|
||
user_model = AutoModelForCausalLM.from_pretrained("EleutherAI/gpt-neo-125m") | ||
quant_config = RTNConfig() | ||
prepared_model = prepare(model=user_model, quant_config=quant_config) | ||
quantized_model = convert(model=prepared_model) | ||
``` | ||
|
||
## Feature Matrix | ||
Intel Neural Compressor 3.X extends PyTorch and TensorFlow's APIs to support compression techniques. | ||
The below table provides a quick overview of the APIs available in Intel Neural Compressor 3.X. | ||
The Intel Neural Compressor 3.X mainly focuses on quantization-related features, especially for algorithms that benefit LLM accuracy and inference. | ||
It also provides some common modules across different frameworks. For example, Auto-tune support accuracy driven quantization and mixed precision, benchmark aimed to measure the multiple instances performance of the quantized model. | ||
|
||
<table class="docutils"> | ||
<thead> | ||
<tr> | ||
<th colspan="8">Overview</th> | ||
</tr> | ||
</thead> | ||
<tbody> | ||
<tr> | ||
<td colspan="2" align="center"><a href="design.md#architecture">Architecture</a></td> | ||
<td colspan="2" align="center"><a href="design.md#workflow">Workflow</a></td> | ||
<td colspan="2" align="center"><a href="https://intel.github.io/neural-compressor/latest/docs/source/api-doc/apis.html">APIs</a></td> | ||
<td colspan="1" align="center"><a href="llm_recipes.md">LLMs Recipes</a></td> | ||
<td colspan="1" align="center">Examples</td> | ||
</tr> | ||
</tbody> | ||
<thead> | ||
<tr> | ||
<th colspan="8">PyTorch Extension APIs</th> | ||
</tr> | ||
</thead> | ||
<tbody> | ||
<tr> | ||
<td colspan="2" align="center"><a href="PyTorch.md">Overview</a></td> | ||
<td colspan="2" align="center"><a href="PT_StaticQuant.md">Static Quantization</a></td> | ||
<td colspan="2" align="center"><a href="PT_DynamicQuant.md">Dynamic Quantization</a></td> | ||
<td colspan="2" align="center"><a href="PT_SmoothQuant.md">Smooth Quantization</a></td> | ||
</tr> | ||
<tr> | ||
<td colspan="3" align="center"><a href="PT_WeightOnlyQuant.md">Weight-Only Quantization</a></td> | ||
<td colspan="3" align="center"><a href="PT_MXQuant.md">MX Quantization</a></td> | ||
<td colspan="2" align="center"><a href="PT_MixedPrecision.md">Mixed Precision</a></td> | ||
</tr> | ||
</tbody> | ||
<thead> | ||
<tr> | ||
<th colspan="8">Tensorflow Extension APIs</th> | ||
</tr> | ||
</thead> | ||
<tbody> | ||
<tr> | ||
<td colspan="3" align="center"><a href="TensorFlow.md">Overview</a></td> | ||
<td colspan="3" align="center"><a href="TF_Quant.md">Static Quantization</a></td> | ||
<td colspan="2" align="center"><a href="TF_SQ.md">Smooth Quantization</a></td> | ||
</tr> | ||
</tbody> | ||
<thead> | ||
<tr> | ||
<th colspan="8">Other Modules</th> | ||
</tr> | ||
</thead> | ||
<tbody> | ||
<tr> | ||
<td colspan="4" align="center"><a href="autotune.md">Auto Tune</a></td> | ||
<td colspan="4" align="center"><a href="benchmark.md">Benchmark</a></td> | ||
</tr> | ||
</tbody> | ||
</table> | ||
|
||
> **Note**: | ||
> From 3.0 release, we recommend to use 3.X API. Compression techniques during training such as QAT, Pruning, Distillation only available in [2.X API](https://github.com/intel/neural-compressor/blob/master/docs/source/2x_user_guide.md) currently. |
File renamed without changes
Empty file.
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 was deleted.
Oops, something went wrong.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
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.