Skip to content

Commit 1d08551

Browse files
committed
Merge branch 'clean_1x' of https://github.com/intel/neural-compressor into clean_1x
2 parents 455f349 + 86a99d8 commit 1d08551

File tree

109 files changed

+12025
-646
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

109 files changed

+12025
-646
lines changed

.azure-pipelines/scripts/models/run_pytorch_models_trigger.sh

+3-3
Original file line numberDiff line numberDiff line change
@@ -53,15 +53,15 @@ elif [ "${model}" == "resnet18_fx" ]; then
5353
tuning_cmd="bash run_quant.sh --topology=resnet18 --dataset_location=${dataset_location} --input_model=${input_model}"
5454
benchmark_cmd="bash run_benchmark.sh --topology=resnet18 --dataset_location=${dataset_location} --mode=performance --batch_size=${batch_size} --iters=500"
5555
elif [ "${model}" == "opt_125m_woq_gptq_int4" ]; then
56-
model_src_dir="nlp/huggingface_models/language-modeling/quantization/llm"
56+
model_src_dir="nlp/huggingface_models/language-modeling/quantization/weight_only"
5757
inc_new_api=3x_pt
5858
tuning_cmd="bash run_quant.sh --topology=opt_125m_woq_gptq_int4"
5959
elif [ "${model}" == "opt_125m_woq_gptq_int4_dq_bnb" ]; then
60-
model_src_dir="nlp/huggingface_models/language-modeling/quantization/llm"
60+
model_src_dir="nlp/huggingface_models/language-modeling/quantization/weight_only"
6161
inc_new_api=3x_pt
6262
tuning_cmd="bash run_quant.sh --topology=opt_125m_woq_gptq_int4_dq_bnb"
6363
elif [ "${model}" == "opt_125m_woq_gptq_int4_dq_ggml" ]; then
64-
model_src_dir="nlp/huggingface_models/language-modeling/quantization/llm"
64+
model_src_dir="nlp/huggingface_models/language-modeling/quantization/weight_only"
6565
inc_new_api=3x_pt
6666
tuning_cmd="bash run_quant.sh --topology=opt_125m_woq_gptq_int4_dq_ggml"
6767
fi

README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ Intel® Neural Compressor
55
<h3> An open-source Python library supporting popular model compression techniques on all mainstream deep learning frameworks (TensorFlow, PyTorch, ONNX Runtime, and MXNet)</h3>
66

77
[![python](https://img.shields.io/badge/python-3.8%2B-blue)](https://github.com/intel/neural-compressor)
8-
[![version](https://img.shields.io/badge/release-2.5-green)](https://github.com/intel/neural-compressor/releases)
8+
[![version](https://img.shields.io/badge/release-2.6-green)](https://github.com/intel/neural-compressor/releases)
99
[![license](https://img.shields.io/badge/license-Apache%202-blue)](https://github.com/intel/neural-compressor/blob/master/LICENSE)
1010
[![coverage](https://img.shields.io/badge/coverage-85%25-green)](https://github.com/intel/neural-compressor)
1111
[![Downloads](https://static.pepy.tech/personalized-badge/neural-compressor?period=total&units=international_system&left_color=grey&right_color=green&left_text=downloads)](https://pepy.tech/project/neural-compressor)

conda_meta/basic/meta.yaml

-48
This file was deleted.

conda_meta/neural_insights/meta.yaml

-43
This file was deleted.

conda_meta/neural_solution/meta.yaml

-44
This file was deleted.

docs/3x/PT_MXQuant.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ user_model = convert(model=user_model)
9595

9696
## Examples
9797

98-
- PyTorch [huggingface models](/examples/3.x_api/pytorch/nlp/huggingface_models/language-modeling/quantization/mx)
98+
- PyTorch [huggingface models](/examples/3.x_api/pytorch/nlp/huggingface_models/language-modeling/quantization/mx_quant)
9999

100100

101101
## Reference

docs/3x/PT_SmoothQuant.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ run_fn(prepared_model)
4646
q_model = convert(prepared_model)
4747
```
4848

49-
To get more information, please refer to [examples](https://github.com/intel/neural-compressor/blob/master/examples/3.x_api/pytorch/nlp/huggingface_models/language-modeling/quantization/llm).
49+
To get more information, please refer to [examples](https://github.com/intel/neural-compressor/blob/master/examples/3.x_api/pytorch/nlp/huggingface_models/language-modeling/quantization/smooth_quant).
5050

5151

5252
## Validated Models

docs/3x/PT_StaticQuant.md

+6-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
PyTorch Static Quantization
22
========================================
3-
43
1. [Introduction](#introduction)
54
2. [Get Started](#get-started) \
65
2.1 [Static Quantization with IPEX Backend](#static-quantization-with-ipex-backend) \
@@ -9,6 +8,7 @@ PyTorch Static Quantization
98
2.1.3 [Model Examples](#model-examples) \
109
2.2 [Static Quantization with PT2E Backend](#static-quantization-with-pt2e-backend) \
1110
2.2.1 [Usage Sample with PT2E](#usage-sample-with-pt2e)
11+
2.2.2 [Model Examples with PT2E](#model-examples-with-pt2e)
1212

1313

1414
## Introduction
@@ -68,7 +68,7 @@ q_model = convert(prepared_model)
6868

6969
#### Model Examples
7070

71-
Users could refer to [examples](https://github.com/intel/neural-compressor/blob/master/examples/3.x_api/pytorch/nlp/huggingface_models/language-modeling/quantization/llm) on how to quantize a new model.
71+
Users could refer to [examples](https://github.com/intel/neural-compressor/blob/master/examples/3.x_api/pytorch/nlp/huggingface_models/language-modeling/quantization/static_quant/ipex) on how to quantize a new model.
7272

7373

7474
### Static Quantization with PT2E Backend
@@ -102,3 +102,7 @@ opt_model = torch.compile(q_model)
102102
```
103103

104104
> Note: The `set_local` of `StaticQuantConfig` will be supported after the torch 2.4 release.
105+
106+
#### Model Examples with PT2E
107+
108+
Users could refer to [cv examples](https://github.com/intel/neural-compressor/blob/master/examples/3.x_api/pytorch/cv/static_quant) and [llm examples](https://github.com/intel/neural-compressor/blob/master/examples/3.x_api/pytorch/nlp/huggingface_models/language-modeling/quantization/static_quant/pt2e) on how to quantize a new model.

docs/3x/PT_WeightOnlyQuant.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -258,7 +258,7 @@ loaded_model = load(
258258

259259
## Examples
260260

261-
Users can also refer to [examples](https://github.com/intel/neural-compressor/blob/master/examples/3.x_api/pytorch/nlp/huggingface_models/language-modeling/quantization/llm) on how to quantize a model with WeightOnlyQuant.
261+
Users can also refer to [examples](https://github.com/intel/neural-compressor/blob/master/examples/3.x_api/pytorch/nlp/huggingface_models/language-modeling/quantization/weight_only) on how to quantize a model with WeightOnlyQuant.
262262

263263
## Reference
264264

docs/source/installation_guide.md

+21-33
Original file line numberDiff line numberDiff line change
@@ -52,27 +52,15 @@ The following prerequisites and requirements must be satisfied for a successful
5252
pip install -i https://test.pypi.org/simple/ neural-compressor
5353
```
5454

55-
- Install from Conda
56-
```Shell
57-
# install on Linux OS
58-
conda install opencv-python-headless -c fastai
59-
conda install neural-compressor -c conda-forge -c intel
60-
```
61-
```Shell
62-
# install on Windows OS
63-
conda install pycocotools -c esri
64-
conda install opencv-python-headless -c fastai
65-
conda install neural-compressor -c conda-forge -c intel
66-
```
67-
6855
### Install from Source
6956

7057
```Shell
7158
git clone https://github.com/intel/neural-compressor.git
7259
cd neural-compressor
7360
pip install -r requirements.txt
74-
# build with basic functionality
7561
python setup.py install
62+
[optional] pip install requirements_pt.txt # for PyTorch framework extension API
63+
[optional] pip install requirements_tf.txt # for TensorFlow framework extension API
7664
```
7765

7866
### Install from AI Kit
@@ -112,7 +100,6 @@ The AI Kit is distributed through many common channels, including from Intel's w
112100
<tr style="vertical-align: middle; text-align: center;">
113101
<th>Framework</th>
114102
<th>TensorFlow</th>
115-
<th>Intel<br>TensorFlow</th>
116103
<th>Intel®<br>Extension for<br>TensorFlow*</th>
117104
<th>PyTorch</th>
118105
<th>Intel®<br>Extension for<br>PyTorch*</th>
@@ -122,25 +109,26 @@ The AI Kit is distributed through many common channels, including from Intel's w
122109
<tbody>
123110
<tr align="center">
124111
<th>Version</th>
125-
<td class="tg-7zrl"> <a href=https://github.com/tensorflow/tensorflow/tree/v2.15.0>2.15.0</a><br>
126-
<a href=https://github.com/tensorflow/tensorflow/tree/v2.14.1>2.14.1</a><br>
127-
<a href=https://github.com/tensorflow/tensorflow/tree/v2.13.1>2.13.1</a><br></td>
128-
<td class="tg-7zrl"> <a href=https://github.com/Intel-tensorflow/tensorflow/tree/v2.14.0>2.14.0</a><br>
129-
<a href=https://github.com/Intel-tensorflow/tensorflow/tree/v2.13.0>2.13.0</a><br></td>
130-
<td class="tg-7zrl"> <a href=https://github.com/intel/intel-extension-for-tensorflow/tree/v2.14.0.1>2.14.0.1</a><br>
112+
<td class="tg-7zrl">
113+
<a href=https://github.com/tensorflow/tensorflow/tree/v2.16.1>2.16.1</a><br>
114+
<a href=https://github.com/tensorflow/tensorflow/tree/v2.15.0>2.15.0</a><br>
115+
<a href=https://github.com/tensorflow/tensorflow/tree/v2.14.1>2.14.1</a><br></td>
116+
<td class="tg-7zrl">
117+
<a href=https://github.com/intel/intel-extension-for-tensorflow/tree/v2.15.0.0>2.15.0.0</a><br>
118+
<a href=https://github.com/intel/intel-extension-for-tensorflow/tree/v2.14.0.1>2.14.0.1</a><br>
131119
<a href=https://github.com/intel/intel-extension-for-tensorflow/tree/v2.13.0.0>2.13.0.0</a><br></td>
132-
<td class="tg-7zrl"><a href=https://github.com/pytorch/pytorch/tree/v2.2.1>2.2.1</a><br>
133-
<a href=https://github.com/pytorch/pytorch/tree/v2.1.0>2.1.0</a><br>
134-
<a href=https://github.com/pytorch/pytorch/tree/v2.0.1>2.0.1</a><br></td>
135-
<td class="tg-7zrl"><a href=https://github.com/intel/intel-extension-for-pytorch/tree/v2.2.0%2Bcpu>2.2.0</a><br>
136-
<a href=https://github.com/intel/intel-extension-for-pytorch/tree/v2.1.100%2Bcpu>2.1.100</a><br>
137-
<a href=https://github.com/intel/intel-extension-for-pytorch/tree/v2.0.100%2Bcpu>2.0.100</a><br></td>
138-
<td class="tg-7zrl"><a href=https://github.com/microsoft/onnxruntime/tree/v1.17.1>1.17.1</a><br>
139-
<a href=https://github.com/microsoft/onnxruntime/tree/v1.16.3>1.16.3</a><br>
140-
<a href=https://github.com/microsoft/onnxruntime/tree/v1.15.1>1.15.1</a><br></td>
120+
<td class="tg-7zrl">
121+
<a href=https://github.com/pytorch/pytorch/tree/v2.3.0>2.3.0</a><br>
122+
<a href=https://github.com/pytorch/pytorch/tree/v2.2.2>2.2.2</a><br>
123+
<a href=https://github.com/pytorch/pytorch/tree/v2.1.1>2.1.1</a><br></td>
124+
<td class="tg-7zrl">
125+
<a href=https://github.com/intel/intel-extension-for-pytorch/tree/v2.3.0%2Bcpu>2.3.0</a><br>
126+
<a href=https://github.com/intel/intel-extension-for-pytorch/tree/v2.2.0%2Bcpu>2.2.0</a><br>
127+
<a href=https://github.com/intel/intel-extension-for-pytorch/tree/v2.1.100%2Bcpu>2.1.100</a><br></td>
128+
<td class="tg-7zrl">
129+
<a href=https://github.com/microsoft/onnxruntime/tree/v1.18.0>1.18.0</a><br>
130+
<a href=https://github.com/microsoft/onnxruntime/tree/v1.17.3>1.17.3</a><br>
131+
<a href=https://github.com/microsoft/onnxruntime/tree/v1.16.3>1.16.3</a><br></td>
141132
</tr>
142133
</tbody>
143134
</table>
144-
145-
> **Note:**
146-
> Set the environment variable ``TF_ENABLE_ONEDNN_OPTS=1`` to enable oneDNN optimizations if you are using TensorFlow before v2.9. oneDNN is the default for TensorFlow since [v2.9](https://github.com/tensorflow/tensorflow/releases/tag/v2.9.0) ([Intel Cascade Lake](https://www.intel.com/content/www/us/en/products/platforms/details/cascade-lake.html) and newer CPUs).

0 commit comments

Comments
 (0)