AutoClasses
-----------

In many cases, the architecture you want to use can be guessed from the name or the path of the pretrained model you
are supplying to the :obj:`from_pretrained()` method.
AutoClasses are here to do this job for you so that you automatically retrieve the relevant model given the name/path
to the pretrained weights/config/vocabulary.

Instantiating one of :class:`~transformers.AutoConfig`, :class:`~transformers.AutoModel`, and
:class:`~transformers.AutoTokenizer` will directly create a class of the relevant architecture. For instance


.. code-block:: python

    model = AutoModel.from_pretrained('bert-base-cased')

will create a model that is an instance of :class:`~transformers.BertModel`.

There is one class of :obj:`AutoModel` for each task, and for each backend (PyTorch or TensorFlow).


AutoConfig
~~~~~~~~~~

.. autoclass:: transformers.AutoConfig
    :members:


AutoTokenizer
~~~~~~~~~~~~~

.. autoclass:: transformers.AutoTokenizer
    :members:


AutoModel
~~~~~~~~~

.. autoclass:: transformers.AutoModel
    :members:


AutoModelForPreTraining
~~~~~~~~~~~~~~~~~~~~~~~

.. autoclass:: transformers.AutoModelForPreTraining
    :members:


AutoModelWithLMHead
~~~~~~~~~~~~~~~~~~~

.. autoclass:: transformers.AutoModelWithLMHead
    :members:


AutoModelForSequenceClassification
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

.. autoclass:: transformers.AutoModelForSequenceClassification
    :members:


AutoModelForMultipleChoice
~~~~~~~~~~~~~~~~~~~~~~~~~~

.. autoclass:: transformers.AutoModelForMultipleChoice
    :members:


AutoModelForTokenClassification
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

.. autoclass:: transformers.AutoModelForTokenClassification
    :members:


AutoModelForQuestionAnswering
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

.. autoclass:: transformers.AutoModelForQuestionAnswering
    :members:


TFAutoModel
~~~~~~~~~~~

.. autoclass:: transformers.TFAutoModel
    :members:


TFAutoModelForPreTraining
~~~~~~~~~~~~~~~~~~~~~~~~~

.. autoclass:: transformers.TFAutoModelForPreTraining
    :members:


TFAutoModelWithLMHead
~~~~~~~~~~~~~~~~~~~~~

.. autoclass:: transformers.TFAutoModelWithLMHead
    :members:


TFAutoModelForSequenceClassification
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

.. autoclass:: transformers.TFAutoModelForSequenceClassification
    :members:


TFAutoModelForMultipleChoice
~~~~~~~~~~~~~~~~~~~~~~~~~~~~

.. autoclass:: transformers.TFAutoModelForMultipleChoice
    :members:


TFAutoModelForTokenClassification
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

.. autoclass:: transformers.TFAutoModelForTokenClassification
    :members:


TFAutoModelForQuestionAnswering
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

.. autoclass:: transformers.TFAutoModelForQuestionAnswering
    :members:
