OpenVINO™ is an open source toolkit for optimizing and deploying AI inference
C++ aicomputer-visiondeep-learningdeploy-aidiffusion-modelsgenerative-aigood-first-issueinferencellm-inferencenatural-language-processingnlpopenvinooptimize-aiperformance-boostrecommendation-systemspeech-recognitionstable-diffusiontransformersyolo
brief explanation of Activations Scaling (#32188)
Eddy Kim807b2ca5764b
diff --git a/docs/articles_en/openvino-workflow/running-inference/optimize-inference/precision-control.rst b/docs/articles_en/openvino-workflow/running-inference/optimize-inference/precision-control.rstindex b687b1234fb..af759c0620f 100644--- a/docs/articles_en/openvino-workflow/running-inference/optimize-inference/precision-control.rst+++ b/docs/articles_en/openvino-workflow/running-inference/optimize-inference/precision-control.rst@@ -94,6 +94,35 @@ capabilities).for ``inference_precision`` attribute.+Activation Scaling+###################++Since ``f16`` has a smaller dynamic range compared to ``f32`` or ``bf16``, overflow might occur when using ``f16`` for ``inference_precision``.+To address this issue, activation scaling divides the input of linear operations such as ``MatMul`` or ``Convolution`` by an activations scale factor, ensuring the layer's output does not exceed ``f16``'s dynamic range.++The layer's output is then multiplied back by the activations scale factor to restore its original value, but overflow can occur again during this process.+Activation scaling uses :doc:`LPT (Low Precision Transformations) <../../../documentation/openvino-extensibility/openvino-plugin-library/advanced-guides/low-precision-transformations>` to delay multiplication by the scale factor as much as possible, preventing overflow.+The activations scale factor can be specified in the ``rt_info`` of the model IR or via ``ov::hint::activations_scale_factor``.+Currently, this property is supported on GPU.++.. scrollbox::++ .. code-block:: cpp++ <?xml version="1.0" ?>+ <net name="model_file_name" version="10">+ ...+ <rt_info>+ ...+ <runtime_options>+ <ACTIVATIONS_SCALE_FACTOR value="8.0" />+ </runtime_options>+ ...+ </rt_info>+ </net>+++.. _limited_inference_precision:Limitation of the ``bf16`` inference precision