From f0195d0c2cb03bb820c3173cabfb3f7f35e9ca34 Mon Sep 17 00:00:00 2001 From: Jintao Huang Date: Tue, 24 Dec 2024 14:11:10 +0800 Subject: [PATCH] fix --- swift/trainers/mixin.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/swift/trainers/mixin.py b/swift/trainers/mixin.py index b7bc68420..a52f11fed 100644 --- a/swift/trainers/mixin.py +++ b/swift/trainers/mixin.py @@ -253,7 +253,7 @@ def _patch_loss_function(self): yield return - loss_function = model.loss_function + loss_function = self.model.loss_function @warps(loss_function) def new_loss_function(logits, labels, **kwargs):