MCPcopy Create free account
hub / github.com/OpenGVLab/EfficientQAT / set_quant_state

Function set_quant_state

quantize/utils.py:69–72  ·  view source on GitHub ↗
(model, weight_quant: bool = False)

Source from the content-addressed store, hash-verified

67 return total
68
69def set_quant_state(model, weight_quant: bool = False):
70 for m in model.modules():
71 if isinstance(m, QuantLinear):
72 m.set_quant_state(weight_quant)
73
74@torch.no_grad()
75def quant_inplace(model):

Callers 1

block_apFunction · 0.90

Calls 1

set_quant_stateMethod · 0.80

Tested by

no test coverage detected