Skip to content

Commit

Permalink
fix post rebase
Browse files Browse the repository at this point in the history
  • Loading branch information
Giuseppe5 committed Jan 13, 2025
1 parent 305cecb commit f4dabd1
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions src/brevitas_examples/llm/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -470,13 +470,11 @@ def quantize_llm(args):
scale_optimizer_class='sgd',
optimizer_kwargs={'lr': args.learned_round_lr},
scale_optimizer_kwargs={
'lr': args.learned_round_scale_lr, 'momentum': args.learned_round_scale_momentum},
'lr': args.learned_round_scale_lr,
'momentum': args.learned_round_scale_momentum},
fast_update=args.learned_round_fast_update)
print("Learned round applied.")

# We restore the original behaviour of the post-forward.
for k, v in dict_hooks.items():
k._hf_hook.post_forward = v
model = offload_model(model)

if args.load_checkpoint:
remove_hooks(model)
Expand Down

0 comments on commit f4dabd1

Please sign in to comment.