"...git@developer.sourcefind.cn:chenpangpang/transformers.git" did not exist on "7c1149120829eb58e42a1ba4dbd2a9fa98864707"
Unverified Commit dcff504e authored by Juyoung Kim's avatar Juyoung Kim Committed by GitHub
Browse files

fixed docstring typos (#18739)



* fixed docstring typos

* Added missing colon
Co-authored-by: default avatar김주영 <juyoung@zezedu.com>
parent e49c71fc
...@@ -94,7 +94,7 @@ class ProphetNetTokenizer(PreTrainedTokenizer): ...@@ -94,7 +94,7 @@ class ProphetNetTokenizer(PreTrainedTokenizer):
This should likely be deactivated for Japanese (see this This should likely be deactivated for Japanese (see this
[issue](https://github.com/huggingface/transformers/issues/328)). [issue](https://github.com/huggingface/transformers/issues/328)).
strip_accents: (`bool`, *optional*): strip_accents (`bool`, *optional*):
Whether or not to strip all accents. If this option is not specified, then it will be determined by the Whether or not to strip all accents. If this option is not specified, then it will be determined by the
value for `lowercase` (as in the original BERT). value for `lowercase` (as in the original BERT).
""" """
......
...@@ -49,7 +49,7 @@ RAG_CONFIG_DOC = r""" ...@@ -49,7 +49,7 @@ RAG_CONFIG_DOC = r"""
`"compressed"`. `"compressed"`.
index_path (`str`, *optional*) index_path (`str`, *optional*)
The path to the serialized faiss index on disk. The path to the serialized faiss index on disk.
passages_path: (`str`, *optional*): passages_path (`str`, *optional*):
A path to text passages compatible with the faiss index. Required if using A path to text passages compatible with the faiss index. Required if using
[`~models.rag.retrieval_rag.LegacyIndex`] [`~models.rag.retrieval_rag.LegacyIndex`]
use_dummy_dataset (`bool`, *optional*, defaults to `False`) use_dummy_dataset (`bool`, *optional*, defaults to `False`)
......
...@@ -132,7 +132,7 @@ class RealmTokenizer(PreTrainedTokenizer): ...@@ -132,7 +132,7 @@ class RealmTokenizer(PreTrainedTokenizer):
This should likely be deactivated for Japanese (see this This should likely be deactivated for Japanese (see this
[issue](https://github.com/huggingface/transformers/issues/328)). [issue](https://github.com/huggingface/transformers/issues/328)).
strip_accents: (`bool`, *optional*): strip_accents (`bool`, *optional*):
Whether or not to strip all accents. If this option is not specified, then it will be determined by the Whether or not to strip all accents. If this option is not specified, then it will be determined by the
value for `lowercase` (as in the original BERT). value for `lowercase` (as in the original BERT).
""" """
......
...@@ -103,7 +103,7 @@ class RoFormerTokenizer(PreTrainedTokenizer): ...@@ -103,7 +103,7 @@ class RoFormerTokenizer(PreTrainedTokenizer):
This should likely be deactivated for Japanese (see this This should likely be deactivated for Japanese (see this
[issue](https://github.com/huggingface/transformers/issues/328)). [issue](https://github.com/huggingface/transformers/issues/328)).
strip_accents: (`bool`, *optional*): strip_accents (`bool`, *optional*):
Whether or not to strip all accents. If this option is not specified, then it will be determined by the Whether or not to strip all accents. If this option is not specified, then it will be determined by the
value for `lowercase` (as in the original BERT). value for `lowercase` (as in the original BERT).
......
...@@ -143,7 +143,7 @@ SPEECH_ENCODER_DECODER_INPUTS_DOCSTRING = r""" ...@@ -143,7 +143,7 @@ SPEECH_ENCODER_DECODER_INPUTS_DOCSTRING = r"""
into a tensor of type `torch.FloatTensor`. See [`~Speech2TextFeatureExtractor.__call__`] into a tensor of type `torch.FloatTensor`. See [`~Speech2TextFeatureExtractor.__call__`]
return_dict (`bool`, *optional*): return_dict (`bool`, *optional*):
If set to `True`, the model will return a [`~utils.Seq2SeqLMOutput`] instead of a plain tuple. If set to `True`, the model will return a [`~utils.Seq2SeqLMOutput`] instead of a plain tuple.
kwargs: (*optional*) Remaining dictionary of keyword arguments. Keyword arguments come in two flavors: kwargs (*optional*): Remaining dictionary of keyword arguments. Keyword arguments come in two flavors:
- Without a prefix which will be input as `**encoder_kwargs` for the encoder forward function. - Without a prefix which will be input as `**encoder_kwargs` for the encoder forward function.
- With a *decoder_* prefix which will be input as `**decoder_kwargs` for the decoder forward function. - With a *decoder_* prefix which will be input as `**decoder_kwargs` for the decoder forward function.
......
...@@ -70,10 +70,10 @@ class Speech2TextConfig(PretrainedConfig): ...@@ -70,10 +70,10 @@ class Speech2TextConfig(PretrainedConfig):
The dropout ratio for classifier. The dropout ratio for classifier.
init_std (`float`, *optional*, defaults to 0.02): init_std (`float`, *optional*, defaults to 0.02):
The standard deviation of the truncated_normal_initializer for initializing all weight matrices. The standard deviation of the truncated_normal_initializer for initializing all weight matrices.
encoder_layerdrop: (`float`, *optional*, defaults to 0.0): encoder_layerdrop (`float`, *optional*, defaults to 0.0):
The LayerDrop probability for the encoder. See the [LayerDrop paper](see https://arxiv.org/abs/1909.11556) The LayerDrop probability for the encoder. See the [LayerDrop paper](see https://arxiv.org/abs/1909.11556)
for more details. for more details.
decoder_layerdrop: (`float`, *optional*, defaults to 0.0): decoder_layerdrop (`float`, *optional*, defaults to 0.0):
The LayerDrop probability for the decoder. See the [LayerDrop paper](see https://arxiv.org/abs/1909.11556) The LayerDrop probability for the decoder. See the [LayerDrop paper](see https://arxiv.org/abs/1909.11556)
for more details. for more details.
use_cache (`bool`, *optional*, defaults to `True`): use_cache (`bool`, *optional*, defaults to `True`):
......
...@@ -64,14 +64,15 @@ class Speech2Text2Config(PretrainedConfig): ...@@ -64,14 +64,15 @@ class Speech2Text2Config(PretrainedConfig):
The dropout ratio for classifier. The dropout ratio for classifier.
init_std (`float`, *optional*, defaults to 0.02): init_std (`float`, *optional*, defaults to 0.02):
The standard deviation of the truncated_normal_initializer for initializing all weight matrices. The standard deviation of the truncated_normal_initializer for initializing all weight matrices.
https://arxiv.org/abs/1909.11556>`__ for more details. decoder_layerdrop: (`float`, *optional*, defaults to https://arxiv.org/abs/1909.11556>`__ for more details.
0.0): The LayerDrop probability for the decoder. See the [LayerDrop paper](see decoder_layerdrop (`float`, *optional*, defaults to 0.0):
https://arxiv.org/abs/1909.11556) for more details. The LayerDrop probability for the decoder. See the [LayerDrop paper](see https://arxiv.org/abs/1909.11556)
for more details.
use_cache (`bool`, *optional*, defaults to `True`): use_cache (`bool`, *optional*, defaults to `True`):
Whether or not the model should return the last key/values attentions (not used by all models). Whether or not the model should return the last key/values attentions (not used by all models).
max_source_positions (`int`, *optional*, defaults to 6000): max_source_positions (`int`, *optional*, defaults to 6000):
The maximum sequence length of log-mel filter-bank features that this model might ever be used with. The maximum sequence length of log-mel filter-bank features that this model might ever be used with.
max_target_positions: (`int`, *optional*, defaults to 1024): max_target_positions (`int`, *optional*, defaults to 1024):
The maximum sequence length that this model might ever be used with. Typically set this to something large The maximum sequence length that this model might ever be used with. Typically set this to something large
just in case (e.g., 512 or 1024 or 2048). just in case (e.g., 512 or 1024 or 2048).
......
...@@ -111,7 +111,7 @@ class SplinterTokenizer(PreTrainedTokenizer): ...@@ -111,7 +111,7 @@ class SplinterTokenizer(PreTrainedTokenizer):
This should likely be deactivated for Japanese (see this This should likely be deactivated for Japanese (see this
[issue](https://github.com/huggingface/transformers/issues/328)). [issue](https://github.com/huggingface/transformers/issues/328)).
strip_accents: (`bool`, *optional*): strip_accents (`bool`, *optional*):
Whether or not to strip all accents. If this option is not specified, then it will be determined by the Whether or not to strip all accents. If this option is not specified, then it will be determined by the
value for `lowercase` (as in the original BERT). value for `lowercase` (as in the original BERT).
""" """
...@@ -340,7 +340,7 @@ class BasicTokenizer(object): ...@@ -340,7 +340,7 @@ class BasicTokenizer(object):
This should likely be deactivated for Japanese (see this This should likely be deactivated for Japanese (see this
[issue](https://github.com/huggingface/transformers/issues/328)). [issue](https://github.com/huggingface/transformers/issues/328)).
strip_accents: (`bool`, *optional*): strip_accents (`bool`, *optional*):
Whether or not to strip all accents. If this option is not specified, then it will be determined by the Whether or not to strip all accents. If this option is not specified, then it will be determined by the
value for `lowercase` (as in the original BERT). value for `lowercase` (as in the original BERT).
""" """
......
...@@ -87,10 +87,10 @@ class SplinterTokenizerFast(PreTrainedTokenizerFast): ...@@ -87,10 +87,10 @@ class SplinterTokenizerFast(PreTrainedTokenizerFast):
tokenize_chinese_chars (`bool`, *optional*, defaults to `True`): tokenize_chinese_chars (`bool`, *optional*, defaults to `True`):
Whether or not to tokenize Chinese characters. This should likely be deactivated for Japanese (see [this Whether or not to tokenize Chinese characters. This should likely be deactivated for Japanese (see [this
issue](https://github.com/huggingface/transformers/issues/328)). issue](https://github.com/huggingface/transformers/issues/328)).
strip_accents: (`bool`, *optional*): strip_accents (`bool`, *optional*):
Whether or not to strip all accents. If this option is not specified, then it will be determined by the Whether or not to strip all accents. If this option is not specified, then it will be determined by the
value for `lowercase` (as in the original BERT). value for `lowercase` (as in the original BERT).
wordpieces_prefix: (`str`, *optional*, defaults to `"##"`): wordpieces_prefix (`str`, *optional*, defaults to `"##"`):
The prefix for subwords. The prefix for subwords.
""" """
......
...@@ -1008,14 +1008,14 @@ T5_INPUTS_DOCSTRING = r""" ...@@ -1008,14 +1008,14 @@ T5_INPUTS_DOCSTRING = r"""
decoder_attention_mask (`tf.Tensor` of shape `(batch_size, target_sequence_length)`, *optional*): decoder_attention_mask (`tf.Tensor` of shape `(batch_size, target_sequence_length)`, *optional*):
Default behavior: generate a tensor that ignores pad tokens in `decoder_input_ids`. Causal mask will also Default behavior: generate a tensor that ignores pad tokens in `decoder_input_ids`. Causal mask will also
be used by default. be used by default.
head_mask: (`tf.Tensor` of shape `(num_heads,)` or `(num_layers, num_heads)`, *optional*): head_mask (`tf.Tensor` of shape `(num_heads,)` or `(num_layers, num_heads)`, *optional*):
Mask to nullify selected heads of the self-attention modules in the encoder. Mask values selected in `[0, Mask to nullify selected heads of the self-attention modules in the encoder. Mask values selected in `[0,
1]`: 1]`:
- 1 indicates the head is **not masked**, - 1 indicates the head is **not masked**,
- 0 indicates the head is **masked**. - 0 indicates the head is **masked**.
decoder_head_mask: (`tf.Tensor` of shape `(num_heads,)` or `(num_layers, num_heads)`, *optional*): decoder_head_mask (`tf.Tensor` of shape `(num_heads,)` or `(num_layers, num_heads)`, *optional*):
Mask to nullify selected heads of the self-attention modules in the decoder. Mask values selected in `[0, Mask to nullify selected heads of the self-attention modules in the decoder. Mask values selected in `[0,
1]`: 1]`:
...@@ -1084,7 +1084,7 @@ T5_ENCODER_INPUTS_DOCSTRING = r""" ...@@ -1084,7 +1084,7 @@ T5_ENCODER_INPUTS_DOCSTRING = r"""
Optionally, instead of passing `input_ids` you can choose to directly pass an embedded representation. This Optionally, instead of passing `input_ids` you can choose to directly pass an embedded representation. This
is useful if you want more control over how to convert `input_ids` indices into associated vectors than the is useful if you want more control over how to convert `input_ids` indices into associated vectors than the
model's internal embedding lookup matrix. model's internal embedding lookup matrix.
head_mask: (`tf.Tensor` of shape `(num_heads,)` or `(num_layers, num_heads)`, *optional*): head_mask (`tf.Tensor` of shape `(num_heads,)` or `(num_layers, num_heads)`, *optional*):
Mask to nullify selected heads of the self-attention modules. Mask values selected in `[0, 1]`: Mask to nullify selected heads of the self-attention modules. Mask values selected in `[0, 1]`:
- 1 indicates the head is **not masked**, - 1 indicates the head is **not masked**,
......
...@@ -293,7 +293,7 @@ class TapasTokenizer(PreTrainedTokenizer): ...@@ -293,7 +293,7 @@ class TapasTokenizer(PreTrainedTokenizer):
tokenize_chinese_chars (`bool`, *optional*, defaults to `True`): tokenize_chinese_chars (`bool`, *optional*, defaults to `True`):
Whether or not to tokenize Chinese characters. This should likely be deactivated for Japanese (see this Whether or not to tokenize Chinese characters. This should likely be deactivated for Japanese (see this
[issue](https://github.com/huggingface/transformers/issues/328)). [issue](https://github.com/huggingface/transformers/issues/328)).
strip_accents: (`bool`, *optional*): strip_accents (`bool`, *optional*):
Whether or not to strip all accents. If this option is not specified, then it will be determined by the Whether or not to strip all accents. If this option is not specified, then it will be determined by the
value for `lowercase` (as in the original BERT). value for `lowercase` (as in the original BERT).
cell_trim_length (`int`, *optional*, defaults to -1): cell_trim_length (`int`, *optional*, defaults to -1):
...@@ -2053,7 +2053,7 @@ class BasicTokenizer(object): ...@@ -2053,7 +2053,7 @@ class BasicTokenizer(object):
This should likely be deactivated for Japanese (see this This should likely be deactivated for Japanese (see this
[issue](https://github.com/huggingface/transformers/issues/328)). [issue](https://github.com/huggingface/transformers/issues/328)).
strip_accents: (`bool`, *optional*): strip_accents (`bool`, *optional*):
Whether or not to strip all accents. If this option is not specified, then it will be determined by the Whether or not to strip all accents. If this option is not specified, then it will be determined by the
value for `lowercase` (as in the original BERT). value for `lowercase` (as in the original BERT).
""" """
......
...@@ -67,7 +67,7 @@ class TrOCRConfig(PretrainedConfig): ...@@ -67,7 +67,7 @@ class TrOCRConfig(PretrainedConfig):
The dropout ratio for classifier. The dropout ratio for classifier.
init_std (`float`, *optional*, defaults to 0.02): init_std (`float`, *optional*, defaults to 0.02):
The standard deviation of the truncated_normal_initializer for initializing all weight matrices. The standard deviation of the truncated_normal_initializer for initializing all weight matrices.
decoder_layerdrop: (`float`, *optional*, defaults to 0.0): decoder_layerdrop (`float`, *optional*, defaults to 0.0):
The LayerDrop probability for the decoder. See the [LayerDrop paper](see https://arxiv.org/abs/1909.11556) The LayerDrop probability for the decoder. See the [LayerDrop paper](see https://arxiv.org/abs/1909.11556)
for more details. for more details.
use_cache (`bool`, *optional*, defaults to `True`): use_cache (`bool`, *optional*, defaults to `True`):
......
...@@ -136,7 +136,7 @@ VISION_ENCODER_DECODER_INPUTS_DOCSTRING = r""" ...@@ -136,7 +136,7 @@ VISION_ENCODER_DECODER_INPUTS_DOCSTRING = r"""
training (`bool`, *optional*, defaults to `False`): training (`bool`, *optional*, defaults to `False`):
Whether or not to use the model in training mode (some modules like dropout modules have different Whether or not to use the model in training mode (some modules like dropout modules have different
behaviors between training and evaluation). behaviors between training and evaluation).
kwargs: (*optional*) Remaining dictionary of keyword arguments. Keyword arguments come in two flavors: kwargs (*optional*): Remaining dictionary of keyword arguments. Keyword arguments come in two flavors:
- Without a prefix which will be input as `**encoder_kwargs` for the encoder forward function. - Without a prefix which will be input as `**encoder_kwargs` for the encoder forward function.
- With a *decoder_* prefix which will be input as `**decoder_kwargs` for the decoder forward function. - With a *decoder_* prefix which will be input as `**decoder_kwargs` for the decoder forward function.
......
...@@ -137,7 +137,7 @@ VISION_ENCODER_DECODER_INPUTS_DOCSTRING = r""" ...@@ -137,7 +137,7 @@ VISION_ENCODER_DECODER_INPUTS_DOCSTRING = r"""
more detail. more detail.
return_dict (`bool`, *optional*): return_dict (`bool`, *optional*):
If set to `True`, the model will return a [`~utils.Seq2SeqLMOutput`] instead of a plain tuple. If set to `True`, the model will return a [`~utils.Seq2SeqLMOutput`] instead of a plain tuple.
kwargs: (*optional*) Remaining dictionary of keyword arguments. Keyword arguments come in two flavors: kwargs (*optional*): Remaining dictionary of keyword arguments. Keyword arguments come in two flavors:
- Without a prefix which will be input as `**encoder_kwargs` for the encoder forward function. - Without a prefix which will be input as `**encoder_kwargs` for the encoder forward function.
- With a *decoder_* prefix which will be input as `**decoder_kwargs` for the decoder forward function. - With a *decoder_* prefix which will be input as `**decoder_kwargs` for the decoder forward function.
......
...@@ -61,7 +61,7 @@ class XGLMConfig(PretrainedConfig): ...@@ -61,7 +61,7 @@ class XGLMConfig(PretrainedConfig):
The dropout ratio for the attention probabilities. The dropout ratio for the attention probabilities.
activation_dropout (`float`, *optional*, defaults to 0.0): activation_dropout (`float`, *optional*, defaults to 0.0):
The dropout ratio for activations inside the fully connected layer. The dropout ratio for activations inside the fully connected layer.
layerdrop: (`float`, *optional*, defaults to 0.0): layerdrop (`float`, *optional*, defaults to 0.0):
The LayerDrop probability for the encoder. See the [LayerDrop paper](see https://arxiv.org/abs/1909.11556) The LayerDrop probability for the encoder. See the [LayerDrop paper](see https://arxiv.org/abs/1909.11556)
for more details. for more details.
init_std (`float`, *optional*, defaults to 0.02): init_std (`float`, *optional*, defaults to 0.02):
......
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