neural_compressor.strategy.hawq_v2

The HAWQ_V2 tuning strategy.

Classes

HAWQ_V2TuneStrategy

The HAWQ V2 tuning strategy.

Module Contents

class neural_compressor.strategy.hawq_v2.HAWQ_V2TuneStrategy(model, conf, q_dataloader=None, q_func=None, eval_func=None, eval_dataloader=None, eval_metric=None, resume=None, q_hooks=None)[source]

The HAWQ V2 tuning strategy.

HAWQ_V2 implements the “Hawq-v2: Hessian aware trace-weighted quantization of neural networks”. We made a small change to it by using the hessian trace to score the op impact and then fallback the OPs according to the scoring result.