mirror of
https://github.com/huggingface/transformers.git
synced 2025-08-02 19:21:31 +06:00
Add return type annotation to PreTrainedModel.from_pretrained (#31869)
Update modeling_utils.py Add return type annotation to PreTrainedModel.from_pretrained
This commit is contained in:
parent
6e59b30841
commit
c5bc2d5fd5
@ -2832,7 +2832,7 @@ class PreTrainedModel(nn.Module, ModuleUtilsMixin, GenerationMixin, PushToHubMix
|
|||||||
revision: str = "main",
|
revision: str = "main",
|
||||||
use_safetensors: bool = None,
|
use_safetensors: bool = None,
|
||||||
**kwargs,
|
**kwargs,
|
||||||
):
|
) -> "PreTrainedModel":
|
||||||
r"""
|
r"""
|
||||||
Instantiate a pretrained pytorch model from a pre-trained model configuration.
|
Instantiate a pretrained pytorch model from a pre-trained model configuration.
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user