





import copy
import inspect
import unittest

import numpy as np
from huggingface_hub import hf_hub_download

from transformers import VideoMAEConfig
from transformers.models.auto import get_values
from transformers.testing_utils import require_torch, require_vision, slow, torch_device
from transformers.utils import cached_property, is_torch_available, is_vision_available

from ...test_configuration_common import ConfigTester
from ...test_modeling_common import ModelTesterMixin, floats_tensor, ids_tensor
from ...test_pipeline_mixin import PipelineTesterMixin


if is_torch_available():
		import torch
		from torch import nn

		from transformers import (
		    MODEL_FOR_VIDEO_CLASSIFICATION_MAPPING,
		    VideoMAEForPreTraining,
		    VideoMAEForVideoClassification,
		    VideoMAEModel,
		)
		from transformers.models.videomae.modeling_videomae import VIDEOMAE_PRETRAINED_MODEL_ARCHIVE_LIST


if is_vision_available():
		from transformers import VideoMAEImageProcessor


class 							__UpperCAmelCase							:



						"""simple docstring"""







						def __init__(   self	,		SCREAMING_SNAKE_CASE	,		SCREAMING_SNAKE_CASE=13	,		SCREAMING_SNAKE_CASE=10	,		SCREAMING_SNAKE_CASE=3	,		SCREAMING_SNAKE_CASE=2	,		SCREAMING_SNAKE_CASE=2	,		SCREAMING_SNAKE_CASE=2	,		SCREAMING_SNAKE_CASE=True	,		SCREAMING_SNAKE_CASE=True	,		SCREAMING_SNAKE_CASE=32	,		SCREAMING_SNAKE_CASE=5	,		SCREAMING_SNAKE_CASE=4	,		SCREAMING_SNAKE_CASE=37	,		SCREAMING_SNAKE_CASE="gelu"	,		SCREAMING_SNAKE_CASE=0.1	,		SCREAMING_SNAKE_CASE=0.1	,		SCREAMING_SNAKE_CASE=10	,		SCREAMING_SNAKE_CASE=0.02	,		SCREAMING_SNAKE_CASE=0.9	,		SCREAMING_SNAKE_CASE=None	,		) ->      str:





												"""simple docstring"""
												UpperCamelCase  							= parent
												UpperCamelCase  							= batch_size
												UpperCamelCase  							= image_size
												UpperCamelCase  							= num_channels
												UpperCamelCase  							= patch_size
												UpperCamelCase  							= tubelet_size
												UpperCamelCase  							= num_frames
												UpperCamelCase  							= is_training
												UpperCamelCase  							= use_labels
												UpperCamelCase  							= hidden_size
												UpperCamelCase  							= num_hidden_layers
												UpperCamelCase  							= num_attention_heads
												UpperCamelCase  							= intermediate_size
												UpperCamelCase  							= hidden_act
												UpperCamelCase  							= hidden_dropout_prob
												UpperCamelCase  							= attention_probs_dropout_prob
												UpperCamelCase  							= type_sequence_label_size
												UpperCamelCase  							= initializer_range
												UpperCamelCase  							= mask_ratio
												UpperCamelCase  							= scope

												# in VideoMAE, the number of tokens equals num_frames/tubelet_size * num_patches per frame
												UpperCamelCase  							= (image_size // patch_size) ** 2
												UpperCamelCase  							= (num_frames // tubelet_size) * self.num_patches_per_frame

												# use this variable to define bool_masked_pos
												UpperCamelCase  							= int(mask_ratio * self.seq_length				)




						def 		__lowerCAmelCase			(   self				) ->      Optional[Any]:





												"""simple docstring"""
												UpperCamelCase  							= floats_tensor(
												    [self.batch_size, self.num_frames, self.num_channels, self.image_size, self.image_size]				)

												UpperCamelCase  							= None
												if self.use_labels:
																		UpperCamelCase  							= ids_tensor([self.batch_size]	,		self.type_sequence_label_size				)

												UpperCamelCase  							= self.get_config()

												return config, pixel_values, labels




						def 		__lowerCAmelCase			(   self				) ->      int:





												"""simple docstring"""
												return VideoMAEConfig(
												    image_size=self.image_size	,		patch_size=self.patch_size	,		num_channels=self.num_channels	,		num_frames=self.num_frames	,		tubelet_size=self.tubelet_size	,		hidden_size=self.hidden_size	,		num_hidden_layers=self.num_hidden_layers	,		num_attention_heads=self.num_attention_heads	,		intermediate_size=self.intermediate_size	,		hidden_act=self.hidden_act	,		hidden_dropout_prob=self.hidden_dropout_prob	,		attention_probs_dropout_prob=self.attention_probs_dropout_prob	,		is_decoder=_a	,		initializer_range=self.initializer_range	,		)




						def 		__lowerCAmelCase			(   self	,		SCREAMING_SNAKE_CASE	,		SCREAMING_SNAKE_CASE	,		SCREAMING_SNAKE_CASE				) ->      Optional[Any]:





												"""simple docstring"""
												UpperCamelCase  							= VideoMAEModel(config=_a				)
												model.to(_a				)
												model.eval()
												UpperCamelCase  							= model(_a				)
												self.parent.assertEqual(result.last_hidden_state.shape	,		(self.batch_size, self.seq_length, self.hidden_size)				)




						def 		__lowerCAmelCase			(   self	,		SCREAMING_SNAKE_CASE	,		SCREAMING_SNAKE_CASE	,		SCREAMING_SNAKE_CASE				) ->      Dict:





												"""simple docstring"""
												UpperCamelCase  							= VideoMAEForPreTraining(_a				)
												model.to(_a				)
												model.eval()
												# important: each video needs to have the same number of masked patches
												# hence we define a single mask, which we then repeat for each example in the batch
												UpperCamelCase  							= torch.ones((self.num_masks,)				)
												UpperCamelCase  							= torch.cat([mask, torch.zeros(self.seq_length - mask.size(0				)				)]				)
												UpperCamelCase  							= mask.expand(self.batch_size	,		-1				).bool()

												UpperCamelCase  							= model(_a	,		_a				)
												# model only returns predictions for masked patches
												UpperCamelCase  							= mask.sum().item()
												UpperCamelCase  							= 3 * self.tubelet_size * self.patch_size**2
												self.parent.assertEqual(result.logits.shape	,		(self.batch_size, num_masked_patches, decoder_num_labels)				)




						def 		__lowerCAmelCase			(   self				) ->      Dict:





												"""simple docstring"""
												UpperCamelCase  							= self.prepare_config_and_inputs()
												UpperCamelCase  							= config_and_inputs
												UpperCamelCase  							= {'pixel_values': pixel_values}
												return config, inputs_dict


@require_torch
class 							__UpperCAmelCase							(						SCREAMING_SNAKE_CASE_    ,  SCREAMING_SNAKE_CASE_    ,  unittest.TestCase   ):



						"""simple docstring"""







						lowercase							  =    (
						    (VideoMAEModel, VideoMAEForPreTraining, VideoMAEForVideoClassification) if is_torch_available() else ()
						)
						lowercase							  =    (
						    {"""feature-extraction""": VideoMAEModel, """video-classification""": VideoMAEForVideoClassification}
						    if is_torch_available()
						    else {}
						)

						lowercase							  =    False
						lowercase							  =    False
						lowercase							  =    False
						lowercase							  =    False




						def 		__lowerCAmelCase			(   self				) ->      Optional[int]:





												"""simple docstring"""
												UpperCamelCase  							= VideoMAEModelTester(self				)
												UpperCamelCase  							= ConfigTester(self	,		config_class=_a	,		has_text_modality=_a	,		hidden_size=37				)




						def 		__lowerCAmelCase			(   self	,		SCREAMING_SNAKE_CASE	,		SCREAMING_SNAKE_CASE	,		SCREAMING_SNAKE_CASE=False				) ->      Optional[int]:





												"""simple docstring"""
												UpperCamelCase  							= copy.deepcopy(_a				)

												if model_class == VideoMAEForPreTraining:
																		# important: each video needs to have the same number of masked patches
																		# hence we define a single mask, which we then repeat for each example in the batch
																		UpperCamelCase  							= torch.ones((self.model_tester.num_masks,)				)
																		UpperCamelCase  							= torch.cat([mask, torch.zeros(self.model_tester.seq_length - mask.size(0				)				)]				)
																		UpperCamelCase  							= mask.expand(self.model_tester.batch_size	,		-1				).bool()
																		UpperCamelCase  							= bool_masked_pos.to(_a				)

												if return_labels:
																		if model_class in [
																		    *get_values(_a				),
																		]:
																								UpperCamelCase  							= torch.zeros(
																								    self.model_tester.batch_size	,		dtype=torch.long	,		device=_a				)

												return inputs_dict




						def 		__lowerCAmelCase			(   self				) ->      Optional[Any]:





												"""simple docstring"""
												self.config_tester.run_common_tests()




						@unittest.skip(reason="VideoMAE does not use inputs_embeds"				)
						def 		__lowerCAmelCase			(   self				) ->      str:





												"""simple docstring"""
												pass




						def 		__lowerCAmelCase			(   self				) ->      List[str]:





												"""simple docstring"""
												UpperCamelCase  							= self.model_tester.prepare_config_and_inputs_for_common()

												for model_class in self.all_model_classes:
																		UpperCamelCase  							= model_class(_a				)
																		self.assertIsInstance(model.get_input_embeddings()	,		(nn.Module)				)
																		UpperCamelCase  							= model.get_output_embeddings()
																		self.assertTrue(x is None or isinstance(_a	,		nn.Linear				)				)




						def 		__lowerCAmelCase			(   self				) ->      Dict:





												"""simple docstring"""
												UpperCamelCase  							= self.model_tester.prepare_config_and_inputs_for_common()

												for model_class in self.all_model_classes:
																		UpperCamelCase  							= model_class(_a				)
																		UpperCamelCase  							= inspect.signature(model.forward				)
																		# signature.parameters is an OrderedDict => so arg_names order is deterministic
																		UpperCamelCase  							= [*signature.parameters.keys()]

																		UpperCamelCase  							= ['pixel_values']
																		self.assertListEqual(arg_names[:1]	,		_a				)




						def 		__lowerCAmelCase			(   self				) ->      Union[str, Any]:





												"""simple docstring"""
												UpperCamelCase  							= self.model_tester.prepare_config_and_inputs()
												self.model_tester.create_and_check_model(*_a				)




						def 		__lowerCAmelCase			(   self				) ->      Union[str, Any]:





												"""simple docstring"""
												UpperCamelCase  							= self.model_tester.prepare_config_and_inputs()
												self.model_tester.create_and_check_for_pretraining(*_a				)




						@slow
						def 		__lowerCAmelCase			(   self				) ->      List[Any]:





												"""simple docstring"""
												for model_name in VIDEOMAE_PRETRAINED_MODEL_ARCHIVE_LIST[:1]:
																		UpperCamelCase  							= VideoMAEModel.from_pretrained(_a				)
																		self.assertIsNotNone(_a				)




						def 		__lowerCAmelCase			(   self				) ->      Any:





												"""simple docstring"""
												if not self.has_attentions:
																		pass

												else:
																		UpperCamelCase  							= self.model_tester.prepare_config_and_inputs_for_common()
																		UpperCamelCase  							= True

																		for model_class in self.all_model_classes:
																								UpperCamelCase  							= self.model_tester.seq_length - self.model_tester.num_masks
																								UpperCamelCase  							= (
																								    num_visible_patches if model_class == VideoMAEForPreTraining else self.model_tester.seq_length
																								)

																								UpperCamelCase  							= True
																								UpperCamelCase  							= False
																								UpperCamelCase  							= True
																								UpperCamelCase  							= model_class(_a				)
																								model.to(_a				)
																								model.eval()
																								with torch.no_grad():
																														UpperCamelCase  							= model(**self._prepare_for_class(_a	,		_a				)				)
																								UpperCamelCase  							= outputs.attentions
																								self.assertEqual(len(_a				)	,		self.model_tester.num_hidden_layers				)

																								# check that output_attentions also work using config
																								del inputs_dict["output_attentions"]
																								UpperCamelCase  							= True
																								UpperCamelCase  							= model_class(_a				)
																								model.to(_a				)
																								model.eval()
																								with torch.no_grad():
																														UpperCamelCase  							= model(**self._prepare_for_class(_a	,		_a				)				)
																								UpperCamelCase  							= outputs.attentions
																								self.assertEqual(len(_a				)	,		self.model_tester.num_hidden_layers				)

																								self.assertListEqual(
																								    list(attentions[0].shape[-3:]				)	,		[self.model_tester.num_attention_heads, seq_len, seq_len]	,		)
																								UpperCamelCase  							= len(_a				)

																								# Check attention is always last and order is fine
																								UpperCamelCase  							= True
																								UpperCamelCase  							= True
																								UpperCamelCase  							= model_class(_a				)
																								model.to(_a				)
																								model.eval()
																								with torch.no_grad():
																														UpperCamelCase  							= model(**self._prepare_for_class(_a	,		_a				)				)

																								self.assertEqual(out_len + 1	,		len(_a				)				)

																								UpperCamelCase  							= outputs.attentions

																								self.assertEqual(len(_a				)	,		self.model_tester.num_hidden_layers				)
																								self.assertListEqual(
																								    list(self_attentions[0].shape[-3:]				)	,		[self.model_tester.num_attention_heads, seq_len, seq_len]	,		)




						def 		__lowerCAmelCase			(   self				) ->      str:





												"""simple docstring"""
												def check_hidden_states_output(SCREAMING_SNAKE_CASE	,		SCREAMING_SNAKE_CASE	,		SCREAMING_SNAKE_CASE				):
																		UpperCamelCase  							= model_class(_a				)
																		model.to(_a				)
																		model.eval()

																		with torch.no_grad():
																								UpperCamelCase  							= model(**self._prepare_for_class(_a	,		_a				)				)

																		UpperCamelCase  							= outputs.hidden_states
																		UpperCamelCase  							= self.model_tester.num_hidden_layers + 1
																		self.assertEqual(len(_a				)	,		_a				)

																		UpperCamelCase  							= self.model_tester.seq_length - self.model_tester.num_masks
																		UpperCamelCase  							= num_visible_patches if model_class == VideoMAEForPreTraining else self.model_tester.seq_length

																		self.assertListEqual(
																		    list(hidden_states[0].shape[-2:]				)	,		[seq_length, self.model_tester.hidden_size]	,		)

												UpperCamelCase  							= self.model_tester.prepare_config_and_inputs_for_common()

												for model_class in self.all_model_classes:
																		UpperCamelCase  							= True
																		check_hidden_states_output(_a	,		_a	,		_a				)

																		# check that output_hidden_states also work using config
																		del inputs_dict["output_hidden_states"]
																		UpperCamelCase  							= True

																		check_hidden_states_output(_a	,		_a	,		_a				)




						@unittest.skip("Will be fixed soon by reducing the size of the model used for common tests."				)
						def 		__lowerCAmelCase			(   self				) ->      List[str]:





												"""simple docstring"""
												pass
def 		__magic_name__				( )		->					Tuple:


						'''simple docstring'''


						UpperCamelCase  							= hf_hub_download(
						    repo_id="hf-internal-testing/spaghetti-video"						,		filename="eating_spaghetti.npy"						,		repo_type="dataset"				)
						UpperCamelCase  							= np.load(_lowerCAmelCase				)
						return list(_lowerCAmelCase				)





@require_torch
@require_vision
class 							__UpperCAmelCase							(						unittest.TestCase   ):



						"""simple docstring"""







						@cached_property
						def 		__lowerCAmelCase			(   self				) ->      List[Any]:





												"""simple docstring"""
												# logits were tested with a different mean and std, so we use the same here
												return (
												    VideoMAEImageProcessor(image_mean=[0.5, 0.5, 0.5]	,		image_std=[0.5, 0.5, 0.5]				)
												    if is_vision_available()
												    else None
												)




						@slow
						def 		__lowerCAmelCase			(   self				) ->      Dict:





												"""simple docstring"""
												UpperCamelCase  							= VideoMAEForVideoClassification.from_pretrained("MCG-NJU/videomae-base-finetuned-kinetics"				).to(
												    _a				)

												UpperCamelCase  							= self.default_image_processor
												UpperCamelCase  							= prepare_video()
												UpperCamelCase  							= image_processor(_a	,		return_tensors="pt"				).to(_a				)

												# forward pass
												with torch.no_grad():
																		UpperCamelCase  							= model(**_a				)

												# verify the logits
												UpperCamelCase  							= torch.Size((1, 400)				)
												self.assertEqual(outputs.logits.shape	,		_a				)

												UpperCamelCase  							= torch.tensor([0.3_669, -0.0_688, -0.2_421]				).to(_a				)

												self.assertTrue(torch.allclose(outputs.logits[0, :3]	,		_a	,		atol=1e-4				)				)




						@slow
						def 		__lowerCAmelCase			(   self				) ->      Any:





												"""simple docstring"""
												UpperCamelCase  							= VideoMAEForPreTraining.from_pretrained("MCG-NJU/videomae-base-short"				).to(_a				)

												UpperCamelCase  							= self.default_image_processor
												UpperCamelCase  							= prepare_video()
												UpperCamelCase  							= image_processor(_a	,		return_tensors="pt"				).to(_a				)

												# add boolean mask, indicating which patches to mask
												UpperCamelCase  							= hf_hub_download(repo_id="hf-internal-testing/bool-masked-pos"	,		filename="bool_masked_pos.pt"				)
												UpperCamelCase  							= torch.load(_a				)

												# forward pass
												with torch.no_grad():
																		UpperCamelCase  							= model(**_a				)

												# verify the logits
												UpperCamelCase  							= torch.Size([1, 1408, 1536]				)
												UpperCamelCase  							= torch.tensor(
												    [[0.7_994, 0.9_612, 0.8_508], [0.7_401, 0.8_958, 0.8_302], [0.5_862, 0.7_468, 0.7_325]]	,		device=_a				)
												self.assertEqual(outputs.logits.shape	,		_a				)
												self.assertTrue(torch.allclose(outputs.logits[0, :3, :3]	,		_a	,		atol=1e-4				)				)

												# verify the loss (`config.norm_pix_loss` = `True`)
												UpperCamelCase  							= torch.tensor([0.5_142]	,		device=_a				)
												self.assertTrue(torch.allclose(outputs.loss	,		_a	,		atol=1e-4				)				)

												# verify the loss (`config.norm_pix_loss` = `False`)
												UpperCamelCase  							= VideoMAEForPreTraining.from_pretrained("MCG-NJU/videomae-base-short"	,		norm_pix_loss=_a				).to(
												    _a				)

												with torch.no_grad():
																		UpperCamelCase  							= model(**_a				)

												UpperCamelCase  							= torch.tensor(torch.tensor([0.6_469]				)	,		device=_a				)
												self.assertTrue(torch.allclose(outputs.loss	,		_a	,		atol=1e-4				)				)









'''simple docstring'''





import json
from typing import List, Optional, Tuple

from tokenizers import normalizers
from tokenizers.pre_tokenizers import BertPreTokenizer, PreTokenizer

from ...tokenization_utils_fast import PreTrainedTokenizerFast
from ...utils import logging
from .tokenization_roformer import RoFormerTokenizer
from .tokenization_utils import JiebaPreTokenizer


_UpperCamelCase											=		logging.get_logger(__name__)

_UpperCamelCase											=		{'vocab_file': 'vocab.txt', 'tokenizer_file': 'tokenizer.json'}

_UpperCamelCase											=		{
    'vocab_file': {
        'junnyu/roformer_chinese_small': 'https://huggingface.co/junnyu/roformer_chinese_small/resolve/main/vocab.txt',
        'junnyu/roformer_chinese_base': 'https://huggingface.co/junnyu/roformer_chinese_base/resolve/main/vocab.txt',
        'junnyu/roformer_chinese_char_small': (
            'https://huggingface.co/junnyu/roformer_chinese_char_small/resolve/main/vocab.txt'
        ),
        'junnyu/roformer_chinese_char_base': (
            'https://huggingface.co/junnyu/roformer_chinese_char_base/resolve/main/vocab.txt'
        ),
        'junnyu/roformer_small_discriminator': (
            'https://huggingface.co/junnyu/roformer_small_discriminator/resolve/main/vocab.txt'
        ),
        'junnyu/roformer_small_generator': (
            'https://huggingface.co/junnyu/roformer_small_generator/resolve/main/vocab.txt'
        ),
    }
}

_UpperCamelCase											=		{
    'junnyu/roformer_chinese_small': 1536,
    'junnyu/roformer_chinese_base': 1536,
    'junnyu/roformer_chinese_char_small': 512,
    'junnyu/roformer_chinese_char_base': 512,
    'junnyu/roformer_small_discriminator': 128,
    'junnyu/roformer_small_generator': 128,
}


_UpperCamelCase											=		{
    'junnyu/roformer_chinese_small': {'do_lower_case': True},
    'junnyu/roformer_chinese_base': {'do_lower_case': True},
    'junnyu/roformer_chinese_char_small': {'do_lower_case': True},
    'junnyu/roformer_chinese_char_base': {'do_lower_case': True},
    'junnyu/roformer_small_discriminator': {'do_lower_case': True},
    'junnyu/roformer_small_generator': {'do_lower_case': True},
}






class    lowerCamelCase_       (							SCREAMING_SNAKE_CASE_	):
  """simple docstring"""




  a_				   =VOCAB_FILES_NAMES
  a_				   =PRETRAINED_VOCAB_FILES_MAP
  a_				   =PRETRAINED_POSITIONAL_EMBEDDINGS_SIZES
  a_				   =PRETRAINED_INIT_CONFIGURATION
  a_				   =RoFormerTokenizer




  def __init__(					self :      List[str]     ,      _a :      Optional[Any]=None     ,      _a :      Dict=None     ,      _a :      Dict=True     ,      _a :      Union[str, Any]="[UNK]"     ,      _a :      List[Any]="[SEP]"     ,      _a :      List[Any]="[PAD]"     ,      _a :      Any="[CLS]"     ,      _a :      Any="[MASK]"     ,      _a :      Dict=True     ,      _a :      Any=None     ,      **_a :      Tuple     ,      )   ->   Optional[int]:
    super().__init__(
        _a     ,      tokenizer_file=_a     ,      do_lower_case=_a     ,      unk_token=_a     ,      sep_token=_a     ,      pad_token=_a     ,      cls_token=_a     ,      mask_token=_a     ,      tokenize_chinese_chars=_a     ,      strip_accents=_a     ,      **_a     ,      )

    __lowerCamelCase			:			List[str]       			=					json.loads(self.backend_tokenizer.normalizer.__getstate__()  )
    if (
        pre_tok_state.get('lowercase'     ,      _a  ) != do_lower_case
        or pre_tok_state.get('strip_accents'     ,      _a  ) != strip_accents
    ):
      __lowerCamelCase			:			Dict       			=					getattr(_a     ,      pre_tok_state.pop('type'  )  )
      __lowerCamelCase			:			Tuple       			=					do_lower_case
      __lowerCamelCase			:			int       			=					strip_accents
      __lowerCamelCase			:			Dict       			=					pre_tok_class(**_a  )

    __lowerCamelCase			:			Any       			=					do_lower_case




  def __getstate__(					self :      Union[str, Any]  )   ->   List[Any]:
    __lowerCamelCase			:			Optional[Any]       			=					self.__dict__.copy()
    __lowerCamelCase			:			Any       			=					BertPreTokenizer()
    return state




  def __setstate__(					self :      Optional[Any]     ,      _a :      Optional[int]  )   ->   Tuple:
    __lowerCamelCase			:			Tuple       			=					d
    __lowerCamelCase			:			Optional[Any]       			=					self.__dict__['_tokenizer'].get_vocab()
    __lowerCamelCase			:			Any       			=					PreTokenizer.custom(JiebaPreTokenizer(_a  )  )




  def 		_lowercase	(					self :      Any     ,      _a :      Union[str, Any]     ,      _a :      str=None  )   ->   Any:
    __lowerCamelCase			:			Optional[Any]       			=					[self.cls_token_id] + token_ids_a + [self.sep_token_id]

    if token_ids_a:
      output += token_ids_a + [self.sep_token_id]

    return output




  def 		_lowercase	(					self :      int     ,      _a :      List[int]     ,      _a :      Optional[List[int]] = None  )   ->   List[int]:
    __lowerCamelCase			:			int       			=					[self.sep_token_id]
    __lowerCamelCase			:			int       			=					[self.cls_token_id]
    if token_ids_a is None:
      return len(cls + token_ids_a + sep  ) * [0]
    return len(cls + token_ids_a + sep  ) * [0] + len(token_ids_a + sep  ) * [1]




  def 		_lowercase	(					self :      List[str]     ,      _a :      str     ,      _a :      Optional[str] = None  )   ->   Tuple[str]:
    __lowerCamelCase			:			Optional[int]       			=					self._tokenizer.model.save(_a     ,      name=_a  )
    return tuple(_a  )




  def 		_lowercase	(					self :      int     ,      _a :      Optional[Any]     ,      _a :      Tuple=None     ,      _a :      List[str]=None     ,      _a :      Optional[int]=False     ,      **_a :      Dict     ,      )   ->   Dict:
    __lowerCamelCase			:			Dict       			=					BertPreTokenizer()
    return super().save_pretrained(_a     ,      _a     ,      _a     ,      _a     ,      **_a  )






