Unverified Commit 08c9607c authored by Patrick von Platen's avatar Patrick von Platen Committed by GitHub
Browse files

[Generation] fix docs for decoder_input_ids (#5306)

* fix docs

* Update src/transformers/modeling_utils.py

* Update src/transformers/modeling_tf_utils.py

* Update src/transformers/modeling_tf_utils.py

* Update src/transformers/modeling_utils.py

* Update src/transformers/modeling_tf_utils.py

* Update src/transformers/modeling_utils.py
parent 79a82cc0
...@@ -642,8 +642,9 @@ class TFPreTrainedModel(tf.keras.Model, TFModelUtilsMixin): ...@@ -642,8 +642,9 @@ class TFPreTrainedModel(tf.keras.Model, TFModelUtilsMixin):
`What are attention masks? <../glossary.html#attention-mask>`__ `What are attention masks? <../glossary.html#attention-mask>`__
decoder_start_token_id=None: (`optional`) int decoder_start_token_id=None: (`optional`) int
If an encoder-decoder model starts decoding with a different token than BOS. Start token id for the decoder. Defaults to ``decoder_start_token_id`` as defined the model's config or to the ``bos_token_id``
Defaults to `None` and is changed to `BOS` later. if no ``decoder_start_token_id`` is found in the config.
This is only relevant for encoder-decoder models.
use_cache: (`optional`) bool use_cache: (`optional`) bool
If `use_cache` is True, past key values are used to speed up decoding if applicable to model. Defaults to `True`. If `use_cache` is True, past key values are used to speed up decoding if applicable to model. Defaults to `True`.
......
...@@ -962,8 +962,9 @@ class PreTrainedModel(nn.Module, ModuleUtilsMixin): ...@@ -962,8 +962,9 @@ class PreTrainedModel(nn.Module, ModuleUtilsMixin):
`What are attention masks? <../glossary.html#attention-mask>`__ `What are attention masks? <../glossary.html#attention-mask>`__
decoder_start_token_id=None: (`optional`) int decoder_start_token_id=None: (`optional`) int
If an encoder-decoder model starts decoding with a different token than BOS. Start token id for the decoder. Defaults to ``decoder_start_token_id`` as defined the model's config or to the ``bos_token_id``
Defaults to `None` and is changed to `BOS` later. if no ``decoder_start_token_id`` is found in the config.
This is only relevant for encoder-decoder models.
use_cache: (`optional`) bool use_cache: (`optional`) bool
If `use_cache` is True, past key values are used to speed up decoding if applicable to model. Defaults to `True`. If `use_cache` is True, past key values are used to speed up decoding if applicable to model. Defaults to `True`.
......
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