Repository navigation
Conversation
…ersion-quantization
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This pull request introduces comprehensive support for ONNX and TFLite quantization and conversion as configurable features within the MLonMCU pipeline. It enables users to insert ONNX/TFLite conversion and quantization stages into model pipelines via the new
quant_onnxandquant_tflitefeatures, with extensive configuration and calibration options. The documentation is significantly expanded to explain these new capabilities, and safeguards are added to ensure only one quantization feature is active per run. The changes also improve pipeline mutability and feature integration within the session and run management logic.Major new features and enhancements:
Quantization and Conversion Features:
quant_onnxandquant_tfliteas newRunFeatures, allowing users to insert ONNX and TFLite conversion and quantization stages into the model pipeline with a wide range of configuration options (e.g., quantization mode, calibration data, input/output layouts, etc.). These features can be enabled via the CLI or Python API, and are mutually exclusive per run to prevent conflicts. [1] [2] [3]Pipeline Configuration and Mutation:
get_pipelinemethod to theRunFeaturebase class, enabling features to programmatically modify the pipeline before execution. The pipeline is now safely mutable only before any stages have completed, preventing runtime inconsistencies. [1] [2]Documentation:
custom_stages.rst) to detail the usage, configuration, and behavior of the new quantization and conversion features, including examples, calibration workflows, and integration with the Features API.Session and Run Logic:
Miscellaneous Improvements:
str2dictimport for configuration parsing.These changes collectively provide robust, user-friendly support for ONNX and TFLite quantization and conversion within MLonMCU, while maintaining pipeline integrity and clear user guidance.
References:
[1] [2] [3] [4] [5] [6] [7] [8] [9] [10]