Skip to content

Commit

Permalink
error out if sdpa func is not compatible
Browse files Browse the repository at this point in the history
  • Loading branch information
Giuseppe5 committed Jan 10, 2025
1 parent 88adaf4 commit cf1459f
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/brevitas_examples/llm/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,8 @@ def model_export(model, ref_input, args):


def validate(args):
if args.functional_sdpa_quant:
assert args.input_scale_type != 'dynamic' and args.input_bit_width is not None, "Functional SDPA Quant requires dynamic activation quantization"
if args.rotation == 'fx':
assert args.ln_affine_merge, 'Graph rotation requires to merge LN/RMS norm affine parameters'
assert args.replace_rmsnorm, 'Graph rotation requires to replace HF RMSNorm with PyTorch ones (torch 2.4+ require)'
Expand Down

0 comments on commit cf1459f

Please sign in to comment.