Commit b058d11 1 parent d9af9fe commit b058d11 Copy full SHA for b058d11
File tree 1 file changed +2
-2
lines changed
1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -358,7 +358,7 @@ def _supports_logits_to_keep(self) -> bool:
358
358
Return True if the current model supports the keyword argument `logits_to_keep` in forward()
359
359
to save memory. Checking it in this way allows to avoid using a new model attribute.
360
360
"""
361
- return "logits_to_keep" in set (inspect .signature (self .forward ).parameters .keys ())
361
+ return "logits_to_keep" in set (inspect .signature (self .model . forward ).parameters .keys ())
362
362
363
363
def generate (self , * args , ** kwargs ):
364
364
if self ._add_patch and kwargs .get ("assistant_model" , None ):
@@ -475,7 +475,7 @@ def _supports_logits_to_keep(self) -> bool:
475
475
Return True if the current model supports the keyword argument `logits_to_keep` in forward()
476
476
to save memory. Checking it in this way allows to avoid using a new model attribute.
477
477
"""
478
- return "logits_to_keep" in set (inspect .signature (self .forward ).parameters .keys ())
478
+ return "logits_to_keep" in set (inspect .signature (self .model . forward ).parameters .keys ())
479
479
480
480
def _init_warmup (self ):
481
481
inputs = prepare_jit_inputs (self .model , self .export_feature , False )
You can’t perform that action at this time.
0 commit comments