






'''simple docstring'''






import json
from typing import List, Optional, Tuple

from tokenizers import normalizers

from ...tokenization_utils_fast import PreTrainedTokenizerFast
from ...utils import logging
from .tokenization_squeezebert import SqueezeBertTokenizer


__A    	=   logging.get_logger(__name__)

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

__A    	=   {
    '''vocab_file''': {
        '''squeezebert/squeezebert-uncased''': (
            '''https://huggingface.co/squeezebert/squeezebert-uncased/resolve/main/vocab.txt'''
        ),
        '''squeezebert/squeezebert-mnli''': '''https://huggingface.co/squeezebert/squeezebert-mnli/resolve/main/vocab.txt''',
        '''squeezebert/squeezebert-mnli-headless''': (
            '''https://huggingface.co/squeezebert/squeezebert-mnli-headless/resolve/main/vocab.txt'''
        ),
    },
    '''tokenizer_file''': {
        '''squeezebert/squeezebert-uncased''': (
            '''https://huggingface.co/squeezebert/squeezebert-uncased/resolve/main/tokenizer.json'''
        ),
        '''squeezebert/squeezebert-mnli''': (
            '''https://huggingface.co/squeezebert/squeezebert-mnli/resolve/main/tokenizer.json'''
        ),
        '''squeezebert/squeezebert-mnli-headless''': (
            '''https://huggingface.co/squeezebert/squeezebert-mnli-headless/resolve/main/tokenizer.json'''
        ),
    },
}

__A    	=   {
    '''squeezebert/squeezebert-uncased''': 5_1_2,
    '''squeezebert/squeezebert-mnli''': 5_1_2,
    '''squeezebert/squeezebert-mnli-headless''': 5_1_2,
}


__A    	=   {
    '''squeezebert/squeezebert-uncased''': {'''do_lower_case''': True},
    '''squeezebert/squeezebert-mnli''': {'''do_lower_case''': True},
    '''squeezebert/squeezebert-mnli-headless''': {'''do_lower_case''': True},
}




class a_    (    UpperCamelCase_							):
   _snake_case        =							VOCAB_FILES_NAMES
   _snake_case        =							PRETRAINED_VOCAB_FILES_MAP
   _snake_case        =							PRETRAINED_INIT_CONFIGURATION
   _snake_case        =							PRETRAINED_POSITIONAL_EMBEDDINGS_SIZES
   _snake_case        =							SqueezeBertTokenizer







   def __init__(self					,   __a=None					,   __a=None					,   __a=True					,   __a="[UNK]"					,   __a="[SEP]"					,   __a="[PAD]"					,   __a="[CLS]"					,   __a="[MASK]"					,   __a=True					,   __a=None					,   **__a					,   )			->      List[str]:
      """simple docstring"""






      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					,   )

      __snake_case				:      List[Any]     							= json.loads(self.backend_tokenizer.normalizer.__getstate__())
      if (
          normalizer_state.get('lowercase'					,   __a) != do_lower_case
          or normalizer_state.get('strip_accents'					,   __a) != strip_accents
          or normalizer_state.get('handle_chinese_chars'					,   __a) != tokenize_chinese_chars
      ):
         __snake_case				:      Optional[int]     							= getattr(__a					,   normalizer_state.pop('type'))
         __snake_case				:      List[str]     							= do_lower_case
         __snake_case				:      Union[str, Any]     							= strip_accents
         __snake_case				:      Union[str, Any]     							= tokenize_chinese_chars
         __snake_case				:      Union[str, Any]     							= normalizer_class(**__a)

      __snake_case				:      Tuple     							= do_lower_case







   def     SCREAMING_SNAKE_CASE__					(self					,   __a					,   __a=None)			->      Optional[int]:
      """simple docstring"""






      __snake_case				:      Tuple     							= [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     SCREAMING_SNAKE_CASE__					(self					,   __a					,   __a = None)			->      List[int]:
      """simple docstring"""






      __snake_case				:      List[str]     							= [self.sep_token_id]
      __snake_case				:      Tuple     							= [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     SCREAMING_SNAKE_CASE__					(self					,   __a					,   __a = None)			->      Tuple[str]:
      """simple docstring"""






      __snake_case				:      Optional[Any]     							= self._tokenizer.model.save(__a					,   name=__a)
      return tuple(__a)







'''simple docstring'''






from ...configuration_utils import PretrainedConfig
from ...utils import logging


__A    	=   logging.get_logger(__name__)

__A    	=   {
    '''sayakpaul/vit-msn-base''': '''https://huggingface.co/sayakpaul/vit-msn-base/resolve/main/config.json''',
    # See all ViT MSN models at https://huggingface.co/models?filter=vit_msn
}




class a_    (    UpperCamelCase_							):
   _snake_case        =							"""vit_msn"""







   def __init__(self					,   __a=7_6_8					,   __a=1_2					,   __a=1_2					,   __a=3_0_7_2					,   __a="gelu"					,   __a=0.0					,   __a=0.0					,   __a=0.02					,   __a=1E-06					,   __a=2_2_4					,   __a=1_6					,   __a=3					,   __a=True					,   **__a					,   )			->      Any:
      """simple docstring"""






      super().__init__(**__a)

      __snake_case				:      List[str]     							= hidden_size
      __snake_case				:      Optional[int]     							= num_hidden_layers
      __snake_case				:      Optional[Any]     							= num_attention_heads
      __snake_case				:      str     							= intermediate_size
      __snake_case				:      List[str]     							= hidden_act
      __snake_case				:      List[Any]     							= hidden_dropout_prob
      __snake_case				:      Tuple     							= attention_probs_dropout_prob
      __snake_case				:      List[str]     							= initializer_range
      __snake_case				:      Optional[int]     							= layer_norm_eps
      __snake_case				:      Dict     							= image_size
      __snake_case				:      int     							= patch_size
      __snake_case				:      Dict     							= num_channels
      __snake_case				:      Tuple     							= qkv_bias