Unverified Commit 03af4c42 authored by Sylvain Gugger's avatar Sylvain Gugger Committed by GitHub
Browse files

Docstring check (#26052)



* Fix number of minimal calls to the Hub with peft integration

* Alternate design

* And this way?

* Revert

* Nits to fix

* Add util

* Print when changes are made

* Add list to ignore

* Add more rules

* Manual fixes

* deal with kwargs

* deal with enum defaults

* avoid many digits for floats

* Manual fixes

* Fix regex

* Fix regex

* Auto fix

* Style

* Apply script

* Add ignored list

* Add check that templates are filled

* Adding to CI checks

* Add back semi-fix

* Ignore more objects

* More auto-fixes

* Ignore missing objects

* Remove temp semi-fix

* Fixes

* Update src/transformers/models/pvt/configuration_pvt.py
Co-authored-by: default avatarArthur <48595927+ArthurZucker@users.noreply.github.com>

* Update utils/check_docstrings.py
Co-authored-by: default avatarArthur <48595927+ArthurZucker@users.noreply.github.com>

* Update src/transformers/utils/quantization_config.py
Co-authored-by: default avatarArthur <48595927+ArthurZucker@users.noreply.github.com>

* Deal with float defaults

* Fix small defaults

* Address review comment

* Treat

* Post-rebase cleanup

* Address review comment

* Update src/transformers/models/deprecated/mctct/configuration_mctct.py
Co-authored-by: default avatarLysandre Debut <lysandre.debut@reseau.eseo.fr>

* Address review comment

---------
Co-authored-by: default avatarArthur <48595927+ArthurZucker@users.noreply.github.com>
Co-authored-by: default avatarLysandre Debut <lysandre.debut@reseau.eseo.fr>
parent 122b2657
...@@ -69,7 +69,7 @@ class TvltConfig(PretrainedConfig): ...@@ -69,7 +69,7 @@ class TvltConfig(PretrainedConfig):
The dropout ratio for the attention probabilities. The dropout ratio for the attention probabilities.
initializer_range (`float`, *optional*, defaults to 0.02): initializer_range (`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.
layer_norm_eps (`float`, *optional*, defaults to 1e-6): layer_norm_eps (`float`, *optional*, defaults to 1e-06):
The epsilon used by the layer normalization layers. The epsilon used by the layer normalization layers.
qkv_bias (`bool`, *optional*, defaults to `True`): qkv_bias (`bool`, *optional*, defaults to `True`):
Whether to add a bias to the queries, keys and values. Whether to add a bias to the queries, keys and values.
......
...@@ -41,14 +41,14 @@ class TvltFeatureExtractor(SequenceFeatureExtractor): ...@@ -41,14 +41,14 @@ class TvltFeatureExtractor(SequenceFeatureExtractor):
Number of audio channels. Number of audio channels.
patch_size (`List[int]` *optional*, defaults to `[16, 16]`): patch_size (`List[int]` *optional*, defaults to `[16, 16]`):
The patch size of audio patch embedding. The patch size of audio patch embedding.
feature_size (`int`, defaults to 128): feature_size (`int`, *optional*, defaults to 128):
The frequency length of audio spectrogram. The frequency length of audio spectrogram.
sampling_rate (`int`, defaults to 44100): sampling_rate (`int`, *optional*, defaults to 44100):
The sampling rate at which the audio files should be digitalized expressed in Hertz (Hz). The sampling rate at which the audio files should be digitalized expressed in Hertz (Hz).
hop_length_to_sampling_rate (`int`, defaults to 86): hop_length_to_sampling_rate (`int`, *optional*, defaults to 86):
Hop length is length of the overlaping windows for the STFT used to obtain the Mel Frequency coefficients. Hop length is length of the overlaping windows for the STFT used to obtain the Mel Frequency coefficients.
For example, with sampling rate 44100, the hop length is 512, with 44100 / 512 = 86 For example, with sampling rate 44100, the hop length is 512, with 44100 / 512 = 86
n_fft (`int`, defaults to 2048): n_fft (`int`, *optional*, defaults to 2048):
Size of the Fourier transform. Size of the Fourier transform.
padding_value (`float`, *optional*, defaults to 0.0): padding_value (`float`, *optional*, defaults to 0.0):
Padding value used to pad the audio. Should correspond to silences. Padding value used to pad the audio. Should correspond to silences.
......
...@@ -71,7 +71,7 @@ class VideoMAEImageProcessor(BaseImageProcessor): ...@@ -71,7 +71,7 @@ class VideoMAEImageProcessor(BaseImageProcessor):
Size of the output image after resizing. The shortest edge of the image will be resized to Size of the output image after resizing. The shortest edge of the image will be resized to
`size["shortest_edge"]` while maintaining the aspect ratio of the original image. Can be overriden by `size["shortest_edge"]` while maintaining the aspect ratio of the original image. Can be overriden by
`size` in the `preprocess` method. `size` in the `preprocess` method.
resample (`PILImageResampling`, *optional*, defaults to `PILImageResampling.BILINEAR`): resample (`PILImageResampling`, *optional*, defaults to `Resampling.BILINEAR`):
Resampling filter to use if resizing the image. Can be overridden by the `resample` parameter in the Resampling filter to use if resizing the image. Can be overridden by the `resample` parameter in the
`preprocess` method. `preprocess` method.
do_center_crop (`bool`, *optional*, defaults to `True`): do_center_crop (`bool`, *optional*, defaults to `True`):
......
...@@ -132,7 +132,7 @@ class ViltImageProcessor(BaseImageProcessor): ...@@ -132,7 +132,7 @@ class ViltImageProcessor(BaseImageProcessor):
size_divisor (`int`, *optional*, defaults to 32): size_divisor (`int`, *optional*, defaults to 32):
The size by which to make sure both the height and width can be divided. Only has an effect if `do_resize` The size by which to make sure both the height and width can be divided. Only has an effect if `do_resize`
is set to `True`. Can be overridden by the `size_divisor` parameter in the `preprocess` method. is set to `True`. Can be overridden by the `size_divisor` parameter in the `preprocess` method.
resample (`PILImageResampling`, *optional*, defaults to `PILImageResampling.BICUBIC`): resample (`PILImageResampling`, *optional*, defaults to `Resampling.BICUBIC`):
Resampling filter to use if resizing the image. Only has an effect if `do_resize` is set to `True`. Can be Resampling filter to use if resizing the image. Only has an effect if `do_resize` is set to `True`. Can be
overridden by the `resample` parameter in the `preprocess` method. overridden by the `resample` parameter in the `preprocess` method.
do_rescale (`bool`, *optional*, defaults to `True`): do_rescale (`bool`, *optional*, defaults to `True`):
......
...@@ -32,9 +32,9 @@ class ViltProcessor(ProcessorMixin): ...@@ -32,9 +32,9 @@ class ViltProcessor(ProcessorMixin):
docstring of [`~ViltProcessor.__call__`] and [`~ViltProcessor.decode`] for more information. docstring of [`~ViltProcessor.__call__`] and [`~ViltProcessor.decode`] for more information.
Args: Args:
image_processor (`ViltImageProcessor`): image_processor (`ViltImageProcessor`, *optional*):
An instance of [`ViltImageProcessor`]. The image processor is a required input. An instance of [`ViltImageProcessor`]. The image processor is a required input.
tokenizer (`BertTokenizerFast`): tokenizer (`BertTokenizerFast`, *optional*):
An instance of ['BertTokenizerFast`]. The tokenizer is a required input. An instance of ['BertTokenizerFast`]. The tokenizer is a required input.
""" """
attributes = ["image_processor", "tokenizer"] attributes = ["image_processor", "tokenizer"]
......
...@@ -34,10 +34,6 @@ class VisionTextDualEncoderConfig(PretrainedConfig): ...@@ -34,10 +34,6 @@ class VisionTextDualEncoderConfig(PretrainedConfig):
documentation from [`PretrainedConfig`] for more information. documentation from [`PretrainedConfig`] for more information.
Args: Args:
text_config (`dict`):
Dictionary of configuration options that defines text model config.
vision_config (`dict`):
Dictionary of configuration options that defines vison model config.
projection_dim (`int`, *optional*, defaults to 512): projection_dim (`int`, *optional*, defaults to 512):
Dimentionality of text and vision projection layers. Dimentionality of text and vision projection layers.
logit_scale_init_value (`float`, *optional*, defaults to 2.6592): logit_scale_init_value (`float`, *optional*, defaults to 2.6592):
......
...@@ -32,9 +32,9 @@ class VisionTextDualEncoderProcessor(ProcessorMixin): ...@@ -32,9 +32,9 @@ class VisionTextDualEncoderProcessor(ProcessorMixin):
information. information.
Args: Args:
image_processor ([`AutoImageProcessor`]): image_processor ([`AutoImageProcessor`], *optional*):
The image processor is a required input. The image processor is a required input.
tokenizer ([`PreTrainedTokenizer`]): tokenizer ([`PreTrainedTokenizer`], *optional*):
The tokenizer is a required input. The tokenizer is a required input.
""" """
attributes = ["image_processor", "tokenizer"] attributes = ["image_processor", "tokenizer"]
......
...@@ -63,15 +63,15 @@ class ViTConfig(PretrainedConfig): ...@@ -63,15 +63,15 @@ class ViTConfig(PretrainedConfig):
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.
layer_norm_eps (`float`, *optional*, defaults to 1e-12): layer_norm_eps (`float`, *optional*, defaults to 1e-12):
The epsilon used by the layer normalization layers. The epsilon used by the layer normalization layers.
image_size (`int`, *optional*, defaults to `224`): image_size (`int`, *optional*, defaults to 224):
The size (resolution) of each image. The size (resolution) of each image.
patch_size (`int`, *optional*, defaults to `16`): patch_size (`int`, *optional*, defaults to 16):
The size (resolution) of each patch. The size (resolution) of each patch.
num_channels (`int`, *optional*, defaults to `3`): num_channels (`int`, *optional*, defaults to 3):
The number of input channels. The number of input channels.
qkv_bias (`bool`, *optional*, defaults to `True`): qkv_bias (`bool`, *optional*, defaults to `True`):
Whether to add a bias to the queries, keys and values. Whether to add a bias to the queries, keys and values.
encoder_stride (`int`, `optional`, defaults to 16): encoder_stride (`int`, *optional*, defaults to 16):
Factor to increase the spatial resolution by in the decoder head for masked image modeling. Factor to increase the spatial resolution by in the decoder head for masked image modeling.
Example: Example:
......
...@@ -49,7 +49,7 @@ class ViTImageProcessor(BaseImageProcessor): ...@@ -49,7 +49,7 @@ class ViTImageProcessor(BaseImageProcessor):
size (`dict`, *optional*, defaults to `{"height": 224, "width": 224}`): size (`dict`, *optional*, defaults to `{"height": 224, "width": 224}`):
Size of the output image after resizing. Can be overridden by the `size` parameter in the `preprocess` Size of the output image after resizing. Can be overridden by the `size` parameter in the `preprocess`
method. method.
resample (`PILImageResampling`, *optional*, defaults to `PILImageResampling.BILINEAR`): resample (`PILImageResampling`, *optional*, defaults to `Resampling.BILINEAR`):
Resampling filter to use if resizing the image. Can be overridden by the `resample` parameter in the Resampling filter to use if resizing the image. Can be overridden by the `resample` parameter in the
`preprocess` method. `preprocess` method.
do_rescale (`bool`, *optional*, defaults to `True`): do_rescale (`bool`, *optional*, defaults to `True`):
......
...@@ -40,6 +40,8 @@ class ViTHybridConfig(PretrainedConfig): ...@@ -40,6 +40,8 @@ class ViTHybridConfig(PretrainedConfig):
documentation from [`PretrainedConfig`] for more information. documentation from [`PretrainedConfig`] for more information.
Args: Args:
backbone_config (`Union[Dict[str, Any], PretrainedConfig]`, *optional*):
The configuration of the backbone in a dictionary or the config object of the backbone.
hidden_size (`int`, *optional*, defaults to 768): hidden_size (`int`, *optional*, defaults to 768):
Dimensionality of the encoder layers and the pooler layer. Dimensionality of the encoder layers and the pooler layer.
num_hidden_layers (`int`, *optional*, defaults to 12): num_hidden_layers (`int`, *optional*, defaults to 12):
...@@ -51,9 +53,9 @@ class ViTHybridConfig(PretrainedConfig): ...@@ -51,9 +53,9 @@ class ViTHybridConfig(PretrainedConfig):
hidden_act (`str` or `function`, *optional*, defaults to `"gelu"`): hidden_act (`str` or `function`, *optional*, defaults to `"gelu"`):
The non-linear activation function (function or string) in the encoder and pooler. If string, `"gelu"`, The non-linear activation function (function or string) in the encoder and pooler. If string, `"gelu"`,
`"relu"`, `"selu"` and `"gelu_new"` are supported. `"relu"`, `"selu"` and `"gelu_new"` are supported.
hidden_dropout_prob (`float`, *optional*, defaults to 0.1): hidden_dropout_prob (`float`, *optional*, defaults to 0.0):
The dropout probability for all fully connected layers in the embeddings, encoder, and pooler. The dropout probability for all fully connected layers in the embeddings, encoder, and pooler.
attention_probs_dropout_prob (`float`, *optional*, defaults to 0.1): attention_probs_dropout_prob (`float`, *optional*, defaults to 0.0):
The dropout ratio for the attention probabilities. The dropout ratio for the attention probabilities.
initializer_range (`float`, *optional*, defaults to 0.02): initializer_range (`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.
...@@ -65,12 +67,10 @@ class ViTHybridConfig(PretrainedConfig): ...@@ -65,12 +67,10 @@ class ViTHybridConfig(PretrainedConfig):
The size (resolution) of each patch. The size (resolution) of each patch.
num_channels (`int`, *optional*, defaults to 3): num_channels (`int`, *optional*, defaults to 3):
The number of input channels. The number of input channels.
qkv_bias (`bool`, *optional*, defaults to `True`):
Whether to add a bias to the queries, keys and values.
backbone_config (`Union[Dict[str, Any], PretrainedConfig]`, *optional*, defaults to `None`):
The configuration of the backbone in a dictionary or the config object of the backbone.
backbone_featmap_shape (`List[int]`, *optional*, defaults to `[1, 1024, 24, 24]`): backbone_featmap_shape (`List[int]`, *optional*, defaults to `[1, 1024, 24, 24]`):
Used only for the `hybrid` embedding type. The shape of the feature maps of the backbone. Used only for the `hybrid` embedding type. The shape of the feature maps of the backbone.
qkv_bias (`bool`, *optional*, defaults to `True`):
Whether to add a bias to the queries, keys and values.
Example: Example:
......
...@@ -65,7 +65,7 @@ class ViTMAEConfig(PretrainedConfig): ...@@ -65,7 +65,7 @@ class ViTMAEConfig(PretrainedConfig):
The number of input channels. The number of input channels.
qkv_bias (`bool`, *optional*, defaults to `True`): qkv_bias (`bool`, *optional*, defaults to `True`):
Whether to add a bias to the queries, keys and values. Whether to add a bias to the queries, keys and values.
decoder_num_attention_heads (`int`, *optional*, defaults to 12): decoder_num_attention_heads (`int`, *optional*, defaults to 16):
Number of attention heads for each attention layer in the decoder. Number of attention heads for each attention layer in the decoder.
decoder_hidden_size (`int`, *optional*, defaults to 512): decoder_hidden_size (`int`, *optional*, defaults to 512):
Dimensionality of the decoder. Dimensionality of the decoder.
......
...@@ -53,7 +53,7 @@ class VitDetConfig(BackboneConfigMixin, PretrainedConfig): ...@@ -53,7 +53,7 @@ class VitDetConfig(BackboneConfigMixin, PretrainedConfig):
The dropout probability for all fully connected layers in the embeddings, encoder, and pooler. The dropout probability for all fully connected layers in the embeddings, encoder, and pooler.
initializer_range (`float`, *optional*, defaults to 0.02): initializer_range (`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.
layer_norm_eps (`float`, *optional*, defaults to 1e-6): layer_norm_eps (`float`, *optional*, defaults to 1e-06):
The epsilon used by the layer normalization layers. The epsilon used by the layer normalization layers.
image_size (`int`, *optional*, defaults to 224): image_size (`int`, *optional*, defaults to 224):
The size (resolution) of each image. The size (resolution) of each image.
...@@ -67,9 +67,9 @@ class VitDetConfig(BackboneConfigMixin, PretrainedConfig): ...@@ -67,9 +67,9 @@ class VitDetConfig(BackboneConfigMixin, PretrainedConfig):
Whether to add a bias to the queries, keys and values. Whether to add a bias to the queries, keys and values.
drop_path_rate (`float`, *optional*, defaults to 0.0): drop_path_rate (`float`, *optional*, defaults to 0.0):
Stochastic depth rate. Stochastic depth rate.
window_block_indices (`List[int]`, *optional*): window_block_indices (`List[int]`, *optional*, defaults to `[]`):
List of indices of blocks that should have window attention instead of regular global self-attention. List of indices of blocks that should have window attention instead of regular global self-attention.
residual_block_indices (`List[int]`, *optional*): residual_block_indices (`List[int]`, *optional*, defaults to `[]`):
List of indices of blocks that should have an extra residual block after the MLP. List of indices of blocks that should have an extra residual block after the MLP.
use_absolute_position_embeddings (`bool`, *optional*, defaults to `True`): use_absolute_position_embeddings (`bool`, *optional*, defaults to `True`):
Whether to add absolute position embeddings to the patch embeddings. Whether to add absolute position embeddings to the patch embeddings.
......
...@@ -44,7 +44,7 @@ class VitMatteConfig(PretrainedConfig): ...@@ -44,7 +44,7 @@ class VitMatteConfig(PretrainedConfig):
The configuration of the backbone model. The configuration of the backbone model.
hidden_size (`int`, *optional*, defaults to 384): hidden_size (`int`, *optional*, defaults to 384):
The number of input channels of the decoder. The number of input channels of the decoder.
batch_norm_eps (`float`, *optional*, defaults to 1e-5): batch_norm_eps (`float`, *optional*, defaults to 1e-05):
The epsilon used by the batch norm layers. The epsilon used by the batch norm layers.
initializer_range (`float`, *optional*, defaults to 0.02): initializer_range (`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.
......
...@@ -46,7 +46,7 @@ class VitMatteImageProcessor(BaseImageProcessor): ...@@ -46,7 +46,7 @@ class VitMatteImageProcessor(BaseImageProcessor):
do_rescale (`bool`, *optional*, defaults to `True`): do_rescale (`bool`, *optional*, defaults to `True`):
Whether to rescale the image by the specified scale `rescale_factor`. Can be overridden by the `do_rescale` Whether to rescale the image by the specified scale `rescale_factor`. Can be overridden by the `do_rescale`
parameter in the `preprocess` method. parameter in the `preprocess` method.
rescale_factor (`int` or `float`, *optional*, defaults to 1/255): rescale_factor (`int` or `float`, *optional*, defaults to `1/255`):
Scale factor to use if rescaling the image. Can be overridden by the `rescale_factor` parameter in the Scale factor to use if rescaling the image. Can be overridden by the `rescale_factor` parameter in the
`preprocess` method. `preprocess` method.
do_normalize (`bool`, *optional*, defaults to `True`): do_normalize (`bool`, *optional*, defaults to `True`):
......
...@@ -48,7 +48,7 @@ class VitsConfig(PretrainedConfig): ...@@ -48,7 +48,7 @@ class VitsConfig(PretrainedConfig):
Number of attention heads for each attention layer in the Transformer encoder. Number of attention heads for each attention layer in the Transformer encoder.
window_size (`int`, *optional*, defaults to 4): window_size (`int`, *optional*, defaults to 4):
Window size for the relative positional embeddings in the attention layers of the Transformer encoder. Window size for the relative positional embeddings in the attention layers of the Transformer encoder.
use_bias (`bool`, *optional*, defaults to `True`) use_bias (`bool`, *optional*, defaults to `True`):
Whether to use bias in the key, query, value projection layers in the Transformer encoder. Whether to use bias in the key, query, value projection layers in the Transformer encoder.
ffn_dim (`int`, *optional*, defaults to 768): ffn_dim (`int`, *optional*, defaults to 768):
Dimensionality of the "intermediate" (i.e., feed-forward) layer in the Transformer encoder. Dimensionality of the "intermediate" (i.e., feed-forward) layer in the Transformer encoder.
...@@ -72,7 +72,7 @@ class VitsConfig(PretrainedConfig): ...@@ -72,7 +72,7 @@ class VitsConfig(PretrainedConfig):
The dropout ratio for activations inside the fully connected layer. The dropout ratio for activations inside the fully connected layer.
initializer_range (`float`, *optional*, defaults to 0.02): initializer_range (`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.
layer_norm_eps (`float`, *optional*, defaults to 1e-5): layer_norm_eps (`float`, *optional*, defaults to 1e-05):
The epsilon used by the layer normalization layers. The epsilon used by the layer normalization layers.
use_stochastic_duration_prediction (`bool`, *optional*, defaults to `True`): use_stochastic_duration_prediction (`bool`, *optional*, defaults to `True`):
Whether to use the stochastic duration prediction module or the regular duration predictor. Whether to use the stochastic duration prediction module or the regular duration predictor.
......
...@@ -73,7 +73,7 @@ class VivitImageProcessor(BaseImageProcessor): ...@@ -73,7 +73,7 @@ class VivitImageProcessor(BaseImageProcessor):
Size of the output image after resizing. The shortest edge of the image will be resized to Size of the output image after resizing. The shortest edge of the image will be resized to
`size["shortest_edge"]` while maintaining the aspect ratio of the original image. Can be overriden by `size["shortest_edge"]` while maintaining the aspect ratio of the original image. Can be overriden by
`size` in the `preprocess` method. `size` in the `preprocess` method.
resample (`PILImageResampling`, *optional*, defaults to `PILImageResampling.BILINEAR`): resample (`PILImageResampling`, *optional*, defaults to `Resampling.BILINEAR`):
Resampling filter to use if resizing the image. Can be overridden by the `resample` parameter in the Resampling filter to use if resizing the image. Can be overridden by the `resample` parameter in the
`preprocess` method. `preprocess` method.
do_center_crop (`bool`, *optional*, defaults to `True`): do_center_crop (`bool`, *optional*, defaults to `True`):
...@@ -85,7 +85,7 @@ class VivitImageProcessor(BaseImageProcessor): ...@@ -85,7 +85,7 @@ class VivitImageProcessor(BaseImageProcessor):
do_rescale (`bool`, *optional*, defaults to `True`): do_rescale (`bool`, *optional*, defaults to `True`):
Whether to rescale the image by the specified scale `rescale_factor`. Can be overridden by the `do_rescale` Whether to rescale the image by the specified scale `rescale_factor`. Can be overridden by the `do_rescale`
parameter in the `preprocess` method. parameter in the `preprocess` method.
rescale_factor (`int` or `float`, *optional*, defaults to 1/127.5): rescale_factor (`int` or `float`, *optional*, defaults to `1/127.5`):
Defines the scale factor to use if rescaling the image. Can be overridden by the `rescale_factor` parameter Defines the scale factor to use if rescaling the image. Can be overridden by the `rescale_factor` parameter
in the `preprocess` method. in the `preprocess` method.
offset (`bool`, *optional*, defaults to `True`): offset (`bool`, *optional*, defaults to `True`):
......
...@@ -219,7 +219,7 @@ class WhisperTokenizer(PreTrainedTokenizer): ...@@ -219,7 +219,7 @@ class WhisperTokenizer(PreTrainedTokenizer):
This tokenizer inherits from [`PreTrainedTokenizer`] which contains some of the main methods. Users should refer to This tokenizer inherits from [`PreTrainedTokenizer`] which contains some of the main methods. Users should refer to
the superclass for more information regarding such methods. the superclass for more information regarding such methods.
Args: Args:
vocab_file (`str`): vocab_file (`str`):
Path to the vocabulary file. Path to the vocabulary file.
merges_file (`str`): merges_file (`str`):
......
...@@ -30,9 +30,9 @@ class XCLIPProcessor(ProcessorMixin): ...@@ -30,9 +30,9 @@ class XCLIPProcessor(ProcessorMixin):
[`~XCLIPProcessor.__call__`] and [`~XCLIPProcessor.decode`] for more information. [`~XCLIPProcessor.__call__`] and [`~XCLIPProcessor.decode`] for more information.
Args: Args:
image_processor ([`VideoMAEImageProcessor`]): image_processor ([`VideoMAEImageProcessor`], *optional*):
The image processor is a required input. The image processor is a required input.
tokenizer ([`CLIPTokenizerFast`]): tokenizer ([`CLIPTokenizerFast`], *optional*):
The tokenizer is a required input. The tokenizer is a required input.
""" """
attributes = ["image_processor", "tokenizer"] attributes = ["image_processor", "tokenizer"]
......
...@@ -83,11 +83,6 @@ class XGLMTokenizer(PreTrainedTokenizer): ...@@ -83,11 +83,6 @@ class XGLMTokenizer(PreTrainedTokenizer):
token instead. token instead.
pad_token (`str`, *optional*, defaults to `"<pad>"`): pad_token (`str`, *optional*, defaults to `"<pad>"`):
The token used for padding, for example when batching sequences of different lengths. The token used for padding, for example when batching sequences of different lengths.
mask_token (`str`, *optional*, defaults to `"<mask>"`):
The token used for masking values. This is the token used when training this model with masked language
modeling. This is the token which the model will try to predict.
additional_special_tokens (`List[str]`, *optional*, defaults to `["<s>NOTUSED", "</s>NOTUSED"]`):
Additional special tokens used by the tokenizer.
sp_model_kwargs (`dict`, *optional*): sp_model_kwargs (`dict`, *optional*):
Will be passed to the `SentencePieceProcessor.__init__()` method. The [Python wrapper for Will be passed to the `SentencePieceProcessor.__init__()` method. The [Python wrapper for
SentencePiece](https://github.com/google/sentencepiece/tree/master/python) can be used, among other things, SentencePiece](https://github.com/google/sentencepiece/tree/master/python) can be used, among other things,
......
...@@ -571,7 +571,7 @@ class XLMTokenizer(PreTrainedTokenizer): ...@@ -571,7 +571,7 @@ class XLMTokenizer(PreTrainedTokenizer):
mask_token (`str`, *optional*, defaults to `"<special1>"`): mask_token (`str`, *optional*, defaults to `"<special1>"`):
The token used for masking values. This is the token used when training this model with masked language The token used for masking values. This is the token used when training this model with masked language
modeling. This is the token which the model will try to predict. modeling. This is the token which the model will try to predict.
additional_special_tokens (`List[str]`, *optional*, defaults to `["<special0>","<special1>","<special2>","<special3>","<special4>","<special5>","<special6>","<special7>","<special8>","<special9>"]`): additional_special_tokens (`List[str]`, *optional*, defaults to `['<special0>', '<special1>', '<special2>', '<special3>', '<special4>', '<special5>', '<special6>', '<special7>', '<special8>', '<special9>']`):
List of additional special tokens. List of additional special tokens.
lang2id (`Dict[str, int]`, *optional*): lang2id (`Dict[str, int]`, *optional*):
Dictionary mapping languages string identifiers to their IDs. Dictionary mapping languages string identifiers to their IDs.
......
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