(self, weight_quant: bool = False, act_quant: bool = False)
| 177 | module.use_temporary_parameter=False |
| 178 | |
| 179 | def 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) |
no test coverage detected