Skip to content

Commit

Permalink
Merge branch 'master' into mengni/weight_only
Browse files Browse the repository at this point in the history
  • Loading branch information
mengniwang95 authored Jul 18, 2023
2 parents fc63589 + 79be8b9 commit 79a3518
Show file tree
Hide file tree
Showing 131 changed files with 10,612 additions and 3,155 deletions.
2 changes: 2 additions & 0 deletions .azure-pipelines/scripts/codeScan/pyspelling/inc_dict.txt
Original file line number Diff line number Diff line change
Expand Up @@ -495,6 +495,7 @@ dnf
dnn
dnnl
DNNL
DnnlExecutionProvider
Dockerfile
doclist
docstrings
Expand Down Expand Up @@ -563,6 +564,7 @@ enum
env
environ
ep
eps
eq
erf
Erf
Expand Down
6 changes: 2 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,9 +45,8 @@ pip install tensorflow
wget https://storage.googleapis.com/intel-optimized-tensorflow/models/v1_6/mobilenet_v1_1.0_224_frozen.pb
```
```python
from neural_compressor.data import DataLoader, Datasets
from neural_compressor.config import PostTrainingQuantConfig
from neural_compressor.data import DataLoader
from neural_compressor.data import Datasets

dataset = Datasets('tensorflow')['dummy'](shape=(1, 224, 224, 3))
dataloader = DataLoader(framework='tensorflow', dataset=dataset)
Expand All @@ -56,8 +55,7 @@ from neural_compressor.quantization import fit
q_model = fit(
model="./mobilenet_v1_1.0_224_frozen.pb",
conf=PostTrainingQuantConfig(),
calib_dataloader=dataloader,
eval_dataloader=dataloader)
calib_dataloader=dataloader)
```

## Documentation
Expand Down
9 changes: 3 additions & 6 deletions docs/source/get_started.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,20 +15,17 @@ pip install tensorflow
wget https://storage.googleapis.com/intel-optimized-tensorflow/models/v1_6/mobilenet_v1_1.0_224_frozen.pb
```
```python
from neural_compressor.data import DataLoader, Datasets
from neural_compressor.config import PostTrainingQuantConfig
from neural_compressor.data import DataLoader
from neural_compressor.data import Datasets

dataset = Datasets('tensorflow')['dummy'](shape=(1, 224, 224, 3))
dataloader = DataLoader(framework='tensorflow', dataset=dataset)

from neural_compressor.quantization import fit
config = PostTrainingQuantConfig()
q_model = fit(
model="./mobilenet_v1_1.0_224_frozen.pb",
conf=config,
calib_dataloader=dataloader,
eval_dataloader=dataloader)
conf=PostTrainingQuantConfig(),
calib_dataloader=dataloader)
```

## Validated Models
Expand Down
14 changes: 12 additions & 2 deletions docs/source/mixed_precision.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ The recently launched 3rd Gen Intel® Xeon® Scalable processor (codenamed Coope
</p>

## Mixed Precision Support Matrix

<table class="center">
<thead>
<tr>
Expand Down Expand Up @@ -48,7 +49,7 @@ The recently launched 3rd Gen Intel® Xeon® Scalable processor (codenamed Coope
<td align="left">:x:</td>
</tr>
<tr>
<td rowspan="3" align="left">ONNX Runtime</td>
<td rowspan="4" align="left">ONNX Runtime</td>
<td align="left">CPUExecutionProvider</td>
<td align="left">MLAS</td>
<td align="left">"default"</td>
Expand All @@ -72,6 +73,14 @@ The recently launched 3rd Gen Intel® Xeon® Scalable processor (codenamed Coope
<td align="left">&#10004;</td>
<td align="left">&#10004;</td>
</tr>
<tr>
<td align="left">DnnlExecutionProvider</td>
<td align="left">OneDNN</td>
<td align="left">"onnxrt_dnnl_ep"</td>
<td align="left">cpu</td>
<td align="left">&#10004;</td>
<td align="left">:x:</td>
</tr>
<tr>
<td rowspan="2" align="left">Tensorflow</td>
<td align="left">Tensorflow</td>
Expand Down Expand Up @@ -162,4 +171,5 @@ converted_model.save('./path/to/save/')
- Quick started with [helloworld example](/examples/helloworld/tf_example3)
- PyTorch [ResNet18](/examples/pytorch/image_recognition/torchvision_models/mixed_precision/resnet18)
- IPEX [DistilBERT base](/examples/pytorch/nlp/huggingface_models/question-answering/mixed_precision/ipex)
- Tensorflow [ResNet50](/examples/tensorflow/image_recognition/tensorflow_models/resnet50_v1/mixed_precision)
- Tensorflow [ResNet50](/examples/tensorflow/image_recognition/tensorflow_models/resnet50_v1/mixed_precision)
- ONNX Runtime [Bert base](/examples/onnxrt/nlp/huggingface_model/text_classification/mix_precision)
2 changes: 1 addition & 1 deletion docs/source/objective.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ Objective

## Introduction

In terms of evaluating the status of a specific model during tuning, we should have general objectives. Intel® Neural Compressor Objective supports code-free configuration through a yaml file. With built-in objectives, users can compress models with different objectives easily. In special cases, users can also register their own objective classes.
In terms of evaluating the status of a specific model during tuning, we should have general objectives. Intel® Neural Compressor Objective supports code-free configuration through `neural_compressor.config.TuningCriterion`. With built-in objectives, users can compress models with different objectives easily. In special cases, users can also register their own objective classes.

### Single Objective

Expand Down
91 changes: 0 additions & 91 deletions docs/source/platform_configuration.md

This file was deleted.

8 changes: 7 additions & 1 deletion docs/source/quantization.md
Original file line number Diff line number Diff line change
Expand Up @@ -452,7 +452,7 @@ Intel(R) Neural Compressor support multi-framework: PyTorch, Tensorflow, ONNX Ru
<td align="left">cpu</td>
</tr>
<tr>
<td rowspan="3" align="left">ONNX Runtime</td>
<td rowspan="4" align="left">ONNX Runtime</td>
<td align="left">CPUExecutionProvider</td>
<td align="left">MLAS</td>
<td align="left">"default"</td>
Expand All @@ -470,6 +470,12 @@ Intel(R) Neural Compressor support multi-framework: PyTorch, Tensorflow, ONNX Ru
<td align="left">"onnxrt_cuda_ep"</td>
<td align="left">gpu</td>
</tr>
<tr>
<td align="left">DnnlExecutionProvider</td>
<td align="left">OneDNN</td>
<td align="left">"onnxrt_dnnl_ep"</td>
<td align="left">cpu</td>
</tr>
<tr>
<td rowspan="2" align="left">Tensorflow</td>
<td align="left">Tensorflow</td>
Expand Down
Loading

0 comments on commit 79a3518

Please sign in to comment.