Unverified Commit afb07a79 authored by Yih-Dar's avatar Yih-Dar Committed by GitHub
Browse files

fix some docstring in encoder-decoder models (#13611)


Co-authored-by: default avatarydshieh <ydshieh@users.noreply.github.com>
parent 19b7acdd
...@@ -53,7 +53,7 @@ ENCODER_DECODER_START_DOCSTRING = r""" ...@@ -53,7 +53,7 @@ ENCODER_DECODER_START_DOCSTRING = r"""
general usage and behavior. general usage and behavior.
Parameters: Parameters:
config (:class:`~transformers.PretrainedConfig`): Model configuration class with all the parameters of the model. config (:class:`~transformers.EncoderDecoderConfig`): Model configuration class with all the parameters of the model.
Initializing with a config file does not load the weights associated with the model, only the Initializing with a config file does not load the weights associated with the model, only the
configuration. Check out the :meth:`~transformers.PreTrainedModel.from_pretrained` method to load the model configuration. Check out the :meth:`~transformers.PreTrainedModel.from_pretrained` method to load the model
weights. weights.
...@@ -139,7 +139,7 @@ ENCODER_DECODER_INPUTS_DOCSTRING = r""" ...@@ -139,7 +139,7 @@ ENCODER_DECODER_INPUTS_DOCSTRING = r"""
@add_start_docstrings(ENCODER_DECODER_START_DOCSTRING) @add_start_docstrings(ENCODER_DECODER_START_DOCSTRING)
class EncoderDecoderModel(PreTrainedModel): class EncoderDecoderModel(PreTrainedModel):
r""" r"""
:class:`~transformers.EncoderDecoder` is a generic model class that will be instantiated as a transformer :class:`~transformers.EncoderDecoderModel` is a generic model class that will be instantiated as a transformer
architecture with one of the base model classes of the library as encoder and another one as decoder when created architecture with one of the base model classes of the library as encoder and another one as decoder when created
with the :meth`~transformers.AutoModel.from_pretrained` class method for the encoder and with the :meth`~transformers.AutoModel.from_pretrained` class method for the encoder and
:meth`~transformers.AutoModelForCausalLM.from_pretrained` class method for the decoder. :meth`~transformers.AutoModelForCausalLM.from_pretrained` class method for the decoder.
......
...@@ -61,7 +61,7 @@ SPEECH_ENCODER_DECODER_START_DOCSTRING = r""" ...@@ -61,7 +61,7 @@ SPEECH_ENCODER_DECODER_START_DOCSTRING = r"""
general usage and behavior. general usage and behavior.
Parameters: Parameters:
config (:class:`~transformers.PretrainedConfig`): Model configuration class with all the parameters of the model. config (:class:`~transformers.SpeechEncoderDecoderConfig`): Model configuration class with all the parameters of the model.
Initializing with a config file does not load the weights associated with the model, only the Initializing with a config file does not load the weights associated with the model, only the
configuration. Check out the :meth:`~transformers.PreTrainedModel.from_pretrained` method to load the model configuration. Check out the :meth:`~transformers.PreTrainedModel.from_pretrained` method to load the model
weights. weights.
...@@ -152,9 +152,9 @@ SPEECH_ENCODER_DECODER_INPUTS_DOCSTRING = r""" ...@@ -152,9 +152,9 @@ SPEECH_ENCODER_DECODER_INPUTS_DOCSTRING = r"""
@add_start_docstrings(SPEECH_ENCODER_DECODER_START_DOCSTRING) @add_start_docstrings(SPEECH_ENCODER_DECODER_START_DOCSTRING)
class SpeechEncoderDecoderModel(PreTrainedModel): class SpeechEncoderDecoderModel(PreTrainedModel):
r""" r"""
:class:`~transformers.EncoderDecoder` is a generic model class that will be instantiated as a transformer :class:`~transformers.SpeechEncoderDecoderModel` is a generic model class that will be instantiated as a
architecture with one of the base model classes of the library as encoder and another one as decoder when created transformer architecture with one of the base model classes of the library as encoder and another one as decoder
with the :meth`~transformers.AutoModel.from_pretrained` class method for the encoder and when created with the :meth`~transformers.AutoModel.from_pretrained` class method for the encoder and
:meth`~transformers.AutoModelForCausalLM.from_pretrained` class method for the decoder. :meth`~transformers.AutoModelForCausalLM.from_pretrained` class method for the decoder.
""" """
config_class = SpeechEncoderDecoderConfig config_class = SpeechEncoderDecoderConfig
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment