QAT model to hef

Can the HDC directly convert a model exported from PyTorch’s quantization aware training to an HEF model? I want to avoid the time-consuming post-quantization process by HDC.

Hey @spratumn ,

The Hailo Dataflow Compiler (DFC) does not currently support direct conversion of a PyTorch QAT-exported model to an HEF without additional processing. Specifically:

  1. Hailo QAT only supports Keras: As of DFC v3.30.0, our Quantization Aware Training (QAT) workflow officially supports only TensorFlow/Keras. Models must go through the TensorFlow Lite (TFLite) format to be compatible with Hailo’s QAT pipeline.

  2. PyTorch QAT requires export to ONNX: To use a model trained with PyTorch QAT, you must export it to ONNX. However, the exported model won’t contain Hailo-compatible quantization metadata, so DFC will still need to perform its own quantization during optimization.

  3. Post-quantization by DFC is required: DFC performs its own quantization and optimization pipeline that cannot be skipped, even with pre-quantized models, as our compilation pipeline relies on internal quantization parameters.