(model, weight_quant: bool = False)
| 67 | return total |
| 68 | |
| 69 | def 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() |
| 75 | def quant_inplace(model): |
no test coverage detected