Skip to content

Conversation

@ptoupas
Copy link
Contributor

@ptoupas ptoupas commented Nov 11, 2025

Purpose

Introduce a new quantization related feature to the modelconverter tool by adding an optional, high-level configuration parameter (quantization_mode) to simplify model quantization during RVC4 convertion.
The goal is to make quantization strategies more accessible through the UI, while still allowing full control through advanced flags.

Specification

  • Introduced a new quantization_mode parameter for RVC4 model conversion, which has 5 available options: [INT8_STANDARD, INT8_ACCURACY_FOCUSED, INT8_INT16_MIXED, FP16_STANDARD, CUSTOM]. Defaults to INT8_STANDARD and the current default behavior of the quantized conversion should not be affected.
  • When this parameter is set to anything but CUSTOM it will take precedence over any user-defined SNPE flags provided via the snpe_onnx_to_dlc_args, snpe_dlc_quant_args, and snpe_dlc_graph_prepare_args.
  • Removed the compress_to_fp16 parameter which is now replaced by the FP16_STANDARD mode in the quantization_mode parameter.
  • When the quantization_mode is set to INT8_INT16_MIXED a .json encodings file is automatically generated to keep the inputs and outputs of the model into 8-bit precision so that the generated DLC can be executed and be compatible with DAI.
  • The remaining RVC4 related parameters such as use_per_channel_quantization, use_per_row_quantization, optimization_level, and others, should not be affected by the changes introduced in that PR.

Dependencies & Potential Impact

None / not applicable

Deployment Plan

None / not applicable

Testing & Validation

Tested the conversion of the following models under different configurations and settings through the CLI.

@ptoupas ptoupas marked this pull request as ready for review November 12, 2025 11:59
@ptoupas ptoupas requested a review from a team as a code owner November 12, 2025 11:59
@ptoupas ptoupas requested review from conorsim, klemen1999, kozlov721 and tersekmatija and removed request for a team November 12, 2025 11:59
@ptoupas ptoupas self-assigned this Nov 12, 2025
@ptoupas ptoupas added enhancement New feature or request RVC4 Changes affecting RVC4 export labels Nov 12, 2025
Copy link
Collaborator

@klemen1999 klemen1999 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Left some minor comments but generally LGTM.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request RVC4 Changes affecting RVC4 export

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants