tiny fix about badam
This commit is contained in:
1 parent
efb81b25ec
commit
095fab58d3
17 files changed
+31
-102
No files matched your search
@@ -72,7 +72,8 @@ class PairwiseTrainer(Trainer):
|
||||
self.processor = processor
|
||||
self.can_return_loss = True # override property to return eval_loss
|
||||
if finetuning_args.use_badam:
|
||||
from badam import clip_grad_norm_old_version, BAdamCallback
|
||||
from badam import BAdamCallback, clip_grad_norm_old_version
|
||||
|
||||
self.accelerator.clip_grad_norm_ = MethodType(clip_grad_norm_old_version, self.accelerator)
|
||||
self.callback_handler.add_callback(BAdamCallback)
|
||||
|
||||
|
||||
Reference in new issue
Block a user