File tree Expand file tree Collapse file tree 1 file changed +6
-5
lines changed
examples/qualcomm/oss_scripts/llama Expand file tree Collapse file tree 1 file changed +6
-5
lines changed Original file line number Diff line number Diff line change @@ -210,12 +210,13 @@ def make_custom_quantizer(
210
210
per_channel_linear = True ,
211
211
act_observer = MinMaxObserver ,
212
212
)
213
- if range_setting in ("mse_weight_only" , "mse_with_act_loss" , "na" ):
214
- if range_setting == "na" :
215
- observer = PerChannelMinMaxObserver
216
- elif range_setting == "mse_weight_only" :
213
+ if range_setting in ("mse_weight_only" , "mse_with_act_loss" ):
214
+ assert (
215
+ quant_dtype != QuantDtype .use_16a4w_block
216
+ ), "Range setting only supported for per-channel quantization"
217
+ if range_setting == "mse_weight_only" :
217
218
observer = PerChannelMSEObserver .with_args (
218
- ** {"steps" : 200 , "use_mse" : True }
219
+ ** {"steps" : 1600 , "use_mse" : True }
219
220
)
220
221
else :
221
222
observer = PerChannelFixedQParamsObserver .with_args (** {"eps" : 2 ** - 12 })
You can’t perform that action at this time.
0 commit comments