-
Notifications
You must be signed in to change notification settings - Fork 275
update documentation for 3x API #1923
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
17 commits
Select commit
Hold shift + click to select a range
c045efd
update documentation
chensuyue 5ae2ba4
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] ee55b12
Update PyTorch Supported Matrix (#1922)
xin3he cd38ca5
fix the basic docs Matrix
chensuyue 5129a89
update get started md
chensuyue 8905be4
update get started
chensuyue 3203ece
add desc for design
yiliu30 0ffa269
fix typo
yiliu30 4561c1b
Update docs/3x/get_started.md
chensuyue 4d40f77
Update docs/3x/get_started.md
chensuyue f1180bd
fix typo
chensuyue 230730a
update main page
chensuyue 884504b
remove useless files
chensuyue d211c47
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] 4ae578d
update descriptions
chensuyue 02b4cce
Merge branch 'suyue/3x_docs' of https://github.com/intel/neural-compr…
chensuyue 2abe6d1
minor update
chensuyue File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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 hidden or 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 hidden or 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 hidden or 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 | ||
chensuyue marked this conversation as resolved.
Show resolved
Hide resolved
|
||
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 hidden or 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 hidden or 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 hidden or 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.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.