MCPcopy Create free account
hub / github.com/bytedance/ABQ-LLM / set_quant_state

Function set_quant_state

algorithm/quantize/utils.py:179–185  ·  view source on GitHub ↗
(self, weight_quant: bool = False, act_quant: bool = False)

Source from the content-addressed store, hash-verified

177 module.use_temporary_parameter=False
178
179def set_quant_state(self, weight_quant: bool = False, act_quant: bool = False):
180 # setting weight quantization here does not affect actual forward pass
181 self.use_weight_quant = weight_quant
182 self.use_act_quant = act_quant
183 for m in self.modules():
184 if isinstance(m, (QuantLinear, QuantMatMul)):
185 m.set_quant_state(weight_quant, act_quant)

Callers 2

mainFunction · 0.90
abqllmFunction · 0.90

Calls 1

set_quant_stateMethod · 0.45

Tested by

no test coverage detected