r"""Instantiates one of the base model classes of the library
r"""Instantiates one of the base model classes of the library
from a pre-trained model configuration.
from a pre-trained model configuration.
The `from_pretrained()` method takes care of returning the correct model class instance
The `from_pretrained()` method takes care of returning the correct model class instance
...
@@ -531,11 +531,11 @@ class AutoModel:
...
@@ -531,11 +531,11 @@ class AutoModel:
classAutoModelForPreTraining:
classAutoModelForPreTraining:
r"""
r"""
:class:`~transformers.AutoModelForPreTraining` is a generic model class
:class:`~transformers.AutoModelForPreTraining` is a generic model class
that will be instantiated as one of the model classes of the library -with the architecture used for pretraining this model– when created with the `AutoModelForPreTraining.from_pretrained(pretrained_model_name_or_path)`
that will be instantiated as one of the model classes of the library -with the architecture used for pretraining this model– when created with the `AutoModelForPreTraining.from_pretrained(pretrained_model_name_or_path)`
class method.
class method.
This class cannot be instantiated using `__init__()` (throws an error).
This class cannot be instantiated using `__init__()` (throws an error).
"""
"""
def__init__(self):
def__init__(self):
...
@@ -547,7 +547,7 @@ class AutoModelForPreTraining:
...
@@ -547,7 +547,7 @@ class AutoModelForPreTraining:
@classmethod
@classmethod
deffrom_config(cls,config):
deffrom_config(cls,config):
r"""Instantiates one of the base model classes of the library
r"""Instantiates one of the base model classes of the library
from a configuration.
from a configuration.
Note:
Note:
...
@@ -589,7 +589,7 @@ class AutoModelForPreTraining:
...
@@ -589,7 +589,7 @@ class AutoModelForPreTraining:
r"""Instantiates one of the model classes of the library -with the architecture used for pretraining this model– from a pre-trained model configuration.
r"""Instantiates one of the model classes of the library -with the architecture used for pretraining this model– from a pre-trained model configuration.
The `from_pretrained()` method takes care of returning the correct model class instance
The `from_pretrained()` method takes care of returning the correct model class instance
based on the `model_type` property of the config object, or when it's missing,
based on the `model_type` property of the config object, or when it's missing,
...
@@ -680,12 +680,12 @@ class AutoModelForPreTraining:
...
@@ -680,12 +680,12 @@ class AutoModelForPreTraining:
classAutoModelWithLMHead:
classAutoModelWithLMHead:
r"""
r"""
:class:`~transformers.AutoModelWithLMHead` is a generic model class
:class:`~transformers.AutoModelWithLMHead` is a generic model class
that will be instantiated as one of the language modeling model classes of the library
that will be instantiated as one of the language modeling model classes of the library
when created with the `AutoModelWithLMHead.from_pretrained(pretrained_model_name_or_path)`
when created with the `AutoModelWithLMHead.from_pretrained(pretrained_model_name_or_path)`
class method.
class method.
This class cannot be instantiated using `__init__()` (throws an error).
This class cannot be instantiated using `__init__()` (throws an error).
"""
"""
def__init__(self):
def__init__(self):
...
@@ -697,7 +697,7 @@ class AutoModelWithLMHead:
...
@@ -697,7 +697,7 @@ class AutoModelWithLMHead:
@classmethod
@classmethod
deffrom_config(cls,config):
deffrom_config(cls,config):
r"""Instantiates one of the base model classes of the library
r"""Instantiates one of the base model classes of the library