Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
add mixed precision part on tensorflow.md
Signed-off-by: zehao-intel <[email protected]>
  • Loading branch information
zehao-intel committed Jul 23, 2024
commit cd78ee4e0b660e5677cbe9a23afaa83f9eb742d0
33 changes: 24 additions & 9 deletions docs/source/3x/TensorFlow.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,16 @@ TensorFlow
===============


1. [Introduction](#introduction)
2. [API for TensorFlow](#api-for-tensorflow)
3. [Support Matrix](#support-matrix)
3.1 [Quantization Scheme](#quantization-scheme)
3.2 [Quantization Approaches](#quantization-approaches)
3.3 [Backend and Device](#backend-and-device)
- [TensorFlow](#tensorflow)
- [Introduction](#introduction)
- [API for TensorFlow](#api-for-tensorflow)
- [Support Matrix](#support-matrix)
- [Quantization Scheme](#quantization-scheme)
- [Quantization Approaches](#quantization-approaches)
- [Post Training Static Quantization](#post-training-static-quantization)
- [Smooth Quantization](#smooth-quantization)
- [Mixed Precison](#mixed-precison)
- [Backend and Device](#backend-and-device)

## Introduction

Expand Down Expand Up @@ -152,9 +156,16 @@ The supported Quantization methods for TensorFlow and Keras are listed below:
<td align="center"><a href="https://github.com/tensorflow/tensorflow">TensorFlow</a>/<a href="https://github.com/Intel-tensorflow/tensorflow">Intel TensorFlow</a></td>
</tr>
<tr>
<td rowspan="2" align="center">Smooth Quantization(SQ)</td>
<td rowspan="2" align="center">weights</td>
<td rowspan="2" align="center">calibration</td>
<td rowspan="1" align="center">Smooth Quantization(SQ)</td>
<td rowspan="1" align="center">weights</td>
<td rowspan="1" align="center">calibration</td>
<td align="center">Tensorflow</td>
<td align="center"><a href="https://github.com/tensorflow/tensorflow">TensorFlow</a>/<a href="https://github.com/Intel-tensorflow/tensorflow">Intel TensorFlow</a></td>
</tr>
<tr>
<td rowspan="1" align="center">Mixed Precision(MP)</td>
<td rowspan="1" align="center">weights and activations</td>
<td rowspan="1" align="center">NA</td>
<td align="center">Tensorflow</td>
<td align="center"><a href="https://github.com/tensorflow/tensorflow">TensorFlow</a>/<a href="https://github.com/Intel-tensorflow/tensorflow">Intel TensorFlow</a></td>
</tr>
Expand All @@ -175,6 +186,10 @@ Smooth Quantization (SQ) is an advanced quantization technique designed to optim

Refer to the [SQ Guide](./TF_SQ.md) for detailed information.

##### Mixed Precison
The Mixed Precision (MP) is enabled with Post Training Static Quantization. Once `BF16` is supported on machine, the matched operators will be automatically converted.


#### Backend and Device
Intel(R) Neural Compressor supports TF GPU with [ITEX-XPU](https://github.com/intel/intel-extension-for-tensorflow). We will automatically run model on GPU by checking if it has been installed.

Expand Down
2 changes: 1 addition & 1 deletion neural_compressor/tensorflow/keras/quantization/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ def get_model_info(model) -> List[Tuple[str, Callable]]:

@classmethod
def get_config_set_for_tuning(cls) -> Union[None, "StaticQuantConfig", List["StaticQuantConfig"]]:
"""get a default config set for tunning."""
"""Get a default config set for tunning."""
return StaticQuantConfig(weight_sym=[True, False])


Expand Down