Skip to content

Commit

Permalink
Fix (example/llm): workaround for new OPT default attention
Browse files Browse the repository at this point in the history
  • Loading branch information
nickfraser committed Nov 20, 2024
1 parent b3b61ab commit 7b20742
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 @@ -185,6 +185,8 @@ def main(args):
kwargs = {"torch_dtype": dtype}
if quant_sdpa_fx:
kwargs["attn_implementation"] = "sdpa"
elif args.replace_mha:
kwargs["attn_implementation"] = "eager"

if args.export_target == 'torch_qcdq':
kwargs['torchscript'] = True
Expand Down

0 comments on commit 7b20742

Please sign in to comment.