Skip to content

Commit

Permalink
Fix validate
Browse files Browse the repository at this point in the history
  • Loading branch information
volcacius committed Jun 27, 2023
1 parent 5b6f975 commit e6a7d70
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/brevitas_examples/llm/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -164,13 +164,13 @@ def validate(args):
assert args.weight_quant_granularity != 'per_group', "ONNX QCDQ export doesn't support group weight quantization."
if args.weight_quant_type == 'asym':
assert args.quantize_weight_zero_point, "Quantized weight zero point required."
if args.input_quant_type == 'asym':
if args.input_bit_width is not None and args.input_quant_type == 'asym':
assert args.quantize_input_zero_point, "Quantized input zero point required."
if args.export_target == 'torch_qcdq':
assert args.weight_quant_granularity != 'per_group', "TorchScript QCDQ export doesn't support group weight quantization."
if args.weight_quant_type == 'asym':
assert args.quantize_weight_zero_point, "Quantized weight zero point required."
if args.input_quant_type == 'asym':
if args.input_bit_width is not None and args.input_quant_type == 'asym':
assert args.quantize_input_zero_point, "Quantized input zero point required."
if args.input_bit_width:
assert args.act_calibration, "Input quantization is being applied without activation calibration. Set --act-calibration."
Expand Down

0 comments on commit e6a7d70

Please sign in to comment.