ModelTC / MQBench

Model Quantization Benchmark
Apache License 2.0
760 stars 137 forks source link

no function of prepare_qat_fx_by_platform #48

Closed zhixiongzh closed 2 years ago

zhixiongzh commented 2 years ago

Hi,

I can't find the definition of prepare_qat_fx_by_platform, which should be in the library mqbench.prepare_by_platform.

Do you just forget to upload the function?

Tracin commented 2 years ago

prepare_by_platform for now.

zhixiongzh commented 2 years ago

prepare_by_platform for now.

Thank you for the quick response. In this case, PTQ and QAT use the same function to prepare the model, then how does the function tell it should be a PTQ or QAT? Only by training or not in the next step?

If possible, can I get a complete example to see how QAT works? I am very interested in the tool, but it seems most of the configuration parameters are not provided/demonstrated.

For example, in prepare_custom_config_dict, I can only find out how to set extra_qconfig_dict, but no idea and no document to demonstrate what the parameters in extra_quantizer_dict, concrete_args, and extra_fuse_dict look like.

Tracin commented 2 years ago

You can find few answers here https://mqbench.readthedocs.io/en/latest/. We notice the lack of details , those can be found in source code easily actually.