diff --git a/tensorflow_model_optimization/g3doc/guide/get_started.md b/tensorflow_model_optimization/g3doc/guide/get_started.md index f3c1eefe..e023de87 100644 --- a/tensorflow_model_optimization/g3doc/guide/get_started.md +++ b/tensorflow_model_optimization/g3doc/guide/get_started.md @@ -16,14 +16,13 @@ provide the efficiency required by your application. ## 3. Post-training tooling -If you cannot use a pre-trained model for your application, try using -[TensorFlow Lite post-training quantization tools](./quantization/post_training) -during [TensorFlow Lite conversion](https://www.tensorflow.org/lite/convert), -which can optimize your already-trained TensorFlow model. - -See the -[post-training quantization tutorial](https://github.com/tensorflow/tensorflow/blob/master/tensorflow/lite/g3doc/performance/post_training_quant.ipynb) -to learn more. +If you cannot use a pre-trained model for your application, convert your +already-trained model to a float32 LiteRT model and quantize it with +[LiteRT Quantizer](https://github.com/google-ai-edge/LiteRT/tree/main/litert_quantizer). + +Note: Post-training quantization in the TensorFlow Lite converter is +deprecated. See the +[migration guide](https://developers.google.com/edge/litert/quantization/tflq_to_litertq_migration). ## Next steps: Training-time tooling diff --git a/tensorflow_model_optimization/g3doc/guide/index.md b/tensorflow_model_optimization/g3doc/guide/index.md index 307c4c05..b579fe14 100644 --- a/tensorflow_model_optimization/g3doc/guide/index.md +++ b/tensorflow_model_optimization/g3doc/guide/index.md @@ -37,7 +37,7 @@ The area of model optimization can involve various techniques: and distillation Our toolkit supports -[post-training quantization](./quantization/post_training.md), +[post-training quantization](./quantization/post_training.md) (deprecated), [quantization aware training](./quantization/training.md), [pruning](./pruning/index.md), and [clustering](./clustering/index.md). The toolkit also provides experimental support for @@ -46,6 +46,15 @@ various techniques. ### Quantization +Warning: Post-training quantization in the TensorFlow Lite converter is +deprecated. For post-training quantization, convert your model to a float32 +LiteRT model and quantize it with +[LiteRT Quantizer](https://github.com/google-ai-edge/LiteRT/tree/main/litert_quantizer). +See the +[migration guide](https://developers.google.com/edge/litert/quantization/tflq_to_litertq_migration). +This doesn't affect the training-time techniques in this toolkit, such as +pruning, clustering and quantization aware training. + Quantized models are those where we represent the models with lower precision, such as 8-bit integers as opposed to 32-bit float. Lower precision is a requirement to leverage certain hardware. diff --git a/tensorflow_model_optimization/g3doc/guide/quantization/post_training.md b/tensorflow_model_optimization/g3doc/guide/quantization/post_training.md index f4dd6199..ba6254b0 100644 --- a/tensorflow_model_optimization/g3doc/guide/quantization/post_training.md +++ b/tensorflow_model_optimization/g3doc/guide/quantization/post_training.md @@ -1,5 +1,12 @@ # Post-training quantization +Warning: Post-training quantization in the TensorFlow Lite converter is +deprecated. To quantize a model, convert it to a float32 LiteRT model and +quantize it with +[LiteRT Quantizer](https://github.com/google-ai-edge/LiteRT/tree/main/litert_quantizer). +See the +[migration guide](https://developers.google.com/edge/litert/quantization/tflq_to_litertq_migration). + Post-training quantization includes general techniques to reduce CPU and hardware accelerator latency, processing, power, and model size with little degradation in model accuracy. These techniques can be performed on an