Open gaikwadrahul8 opened 2 days ago
This issue originally reported by @lxzheng has been moved to this dedicated repository for LiteRT to enhance issue tracking and prioritization. To ensure continuity, we have created this new issue on your behalf.
We appreciate your understanding and look forward to your continued involvement.
1. System information
2. Code
To help reproduce this issue, I am providing a link to a custom Colab notebook: Full Integer Quantization Issue with Multiple Signatures in TensorFlow Lite
3. Failure after conversion
In the dynamic range quantization process of TensorFlow Lite, it appears that for models with multiple signatures (including aliased ones), the quantization treats references to the same computational graph as a single entity. This is evidenced by the TFLite ModelAnalyzer report showing two subgraphs with identical sizes, yet the overall model size corresponds roughly to the size of a single subgraph. Specifically:
However, the situation is markedly different in the full integer quantization process. Here, the quantization leads to two subgraphs with significantly different sizes, which indicates a distinct treatment of the computational graph segments during quantization. This behavior contrasts with the dynamic range quantization and suggests that the full integer quantization process might interpret or handle the aliased signatures differently, resulting in varied optimization or quantization strategies for the subgraphs. The detailed output is as follows:
This discrepancy between dynamic range and full integer quantization processes raises questions about the underlying mechanisms TensorFlow Lite employs for handling multiple signatures, especially when they reference the same computational graph segment. The difference in subgraph sizes under full integer quantization suggests that the process may inadvertently treat aliased signatures or multiple references as distinct computational entities, potentially leading to inefficiencies in model size and performance.