(
model,
quant_config: QuantConfig,
)
| 168 | |
| 169 | |
| 170 | def smooth_quantize_ootb( |
| 171 | model, |
| 172 | quant_config: QuantConfig, |
| 173 | ): |
| 174 | quant_map = { |
| 175 | ColumnLinear: Int8SmoothQuantLinear, |
| 176 | RowLinear: Int8SmoothQuantRowLinear, |
| 177 | } |
| 178 | |
| 179 | model = quantize_layers( |
| 180 | model, |
| 181 | quant_config, |
| 182 | quant_map, |
| 183 | ) |
| 184 | return model |
| 185 | |
| 186 | |
| 187 | def smooth_quantize_plugin(model, quant_mode): |
no test coverage detected