[typing] better return typehints for from_pretrained (#39184)
* config * processor * feature-extractor * jukebox * fixup * update other methods in config * remove "PretrainedConfig" annotations
This commit is contained in:
committed by
GitHub
parent
a25fc3592e
commit
e15b06d8dc
@@ -2616,7 +2616,7 @@ class PreTrainedModel(nn.Module, ModuleUtilsMixin, PushToHubMixin, PeftAdapterMi
|
||||
return config
|
||||
|
||||
@classmethod
|
||||
def _check_and_enable_sdpa(cls, config, hard_check_only: bool = False) -> PretrainedConfig:
|
||||
def _check_and_enable_sdpa(cls, config, hard_check_only: bool = False):
|
||||
"""
|
||||
Checks the availability of SDPA for a given model.
|
||||
|
||||
|
||||
Reference in New Issue
Block a user