



import warnings

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


lowerCamelCase      =		logging.get_logger(__name__)

lowerCamelCase      =		{
    """xlnet-base-cased""": """https://huggingface.co/xlnet-base-cased/resolve/main/config.json""",
    """xlnet-large-cased""": """https://huggingface.co/xlnet-large-cased/resolve/main/config.json""",
}
class    lowercase__     (					SCREAMING_SNAKE_CASE   ):







       '''simple docstring'''


       UpperCamelCase		=  '''xlnet'''
       UpperCamelCase		=  ['''mems''']
       UpperCamelCase		=  {
           '''n_token''': '''vocab_size''',  # Backward compatibility
           '''hidden_size''': '''d_model''',
           '''num_attention_heads''': '''n_head''',
           '''num_hidden_layers''': '''n_layer''',
       }



       def __init__(							self    :						str	,       _UpperCAmelCase    :						str=32000	,       _UpperCAmelCase    :						str=1024	,       _UpperCAmelCase    :						Tuple=24	,       _UpperCAmelCase    :						Tuple=16	,       _UpperCAmelCase    :						List[Any]=4096	,       _UpperCAmelCase    :						Dict="gelu"	,       _UpperCAmelCase    :						List[Any]=True	,       _UpperCAmelCase    :						Any="bi"	,       _UpperCAmelCase    :						str=0.02	,       _UpperCAmelCase    :						List[Any]=1e-12	,       _UpperCAmelCase    :						List[str]=0.1	,       _UpperCAmelCase    :						List[Any]=512	,       _UpperCAmelCase    :						Any=None	,       _UpperCAmelCase    :						Tuple=True	,       _UpperCAmelCase    :						List[str]=False	,       _UpperCAmelCase    :						Optional[Any]=False	,       _UpperCAmelCase    :						str=-1	,       _UpperCAmelCase    :						Tuple=False	,       _UpperCAmelCase    :						str="last"	,       _UpperCAmelCase    :						List[Any]=True	,       _UpperCAmelCase    :						List[Any]="tanh"	,       _UpperCAmelCase    :						int=0.1	,       _UpperCAmelCase    :						int=5	,       _UpperCAmelCase    :						Union[str, Any]=5	,       _UpperCAmelCase    :						Optional[int]=5	,       _UpperCAmelCase    :						str=1	,       _UpperCAmelCase    :						List[str]=2	,       **_UpperCAmelCase    :						Optional[Any]	,       )				->		str:


             '''simple docstring'''




             UpperCAmelCase_    				=							vocab_size
             UpperCAmelCase_    				=							d_model
             UpperCAmelCase_    				=							n_layer
             UpperCAmelCase_    				=							n_head
             if d_model % n_head != 0:
                   raise ValueError(F"""'d_model % n_head' ({d_model % n_head}) should be equal to 0"""					)
             if "d_head" in kwargs:
                   if kwargs["d_head"] != d_model // n_head:
                         raise ValueError(
                             F"""`d_head` ({kwargs['d_head']}) should be equal to `d_model // n_head` ({d_model // n_head})"""					)
             UpperCAmelCase_    				=							d_model // n_head
             UpperCAmelCase_    				=							ff_activation
             UpperCAmelCase_    				=							d_inner
             UpperCAmelCase_    				=							untie_r
             UpperCAmelCase_    				=							attn_type

             UpperCAmelCase_    				=							initializer_range
             UpperCAmelCase_    				=							layer_norm_eps

             UpperCAmelCase_    				=							dropout
             UpperCAmelCase_    				=							mem_len
             UpperCAmelCase_    				=							reuse_len
             UpperCAmelCase_    				=							bi_data
             UpperCAmelCase_    				=							clamp_len
             UpperCAmelCase_    				=							same_length

             UpperCAmelCase_    				=							summary_type
             UpperCAmelCase_    				=							summary_use_proj
             UpperCAmelCase_    				=							summary_activation
             UpperCAmelCase_    				=							summary_last_dropout
             UpperCAmelCase_    				=							start_n_top
             UpperCAmelCase_    				=							end_n_top

             UpperCAmelCase_    				=							bos_token_id
             UpperCAmelCase_    				=							pad_token_id
             UpperCAmelCase_    				=							eos_token_id

             if "use_cache" in kwargs:
                   warnings.warn(
                       "The `use_cache` argument is deprecated and will be removed in a future version, use `use_mems_eval`"
                       " instead."	,       _UpperCAmelCase	,       )
                   UpperCAmelCase_    				=							kwargs["use_cache"]

             UpperCAmelCase_    				=							use_mems_eval
             UpperCAmelCase_    				=							use_mems_train
             super().__init__(pad_token_id=_UpperCAmelCase	,       bos_token_id=_UpperCAmelCase	,       eos_token_id=_UpperCAmelCase	,       **_UpperCAmelCase					)



       @property
       def   lowercase__       (							self    :						List[Any]					)				->		Union[str, Any]:


             '''simple docstring'''




             logger.info(F"""The model {self.model_type} is one of the few models that has no sequence length limit."""					)
             return -1







       @max_position_embeddings.setter
       def   lowercase__       (							self    :						Dict	,       _UpperCAmelCase    :						List[Any]					)				->		Optional[Any]:


             '''simple docstring'''




             raise NotImplementedError(
                 F"""The model {self.model_type} is one of the few models that has no sequence length limit."""					)









"""simple docstring"""





import string
def      a__			(   lowerCAmelCase__   ):
      for key in range(len(string.ascii_uppercase   )   ):
            UpperCAmelCase_    				=							""
            for symbol in message:
                  if symbol in string.ascii_uppercase:
                        UpperCAmelCase_    				=							string.ascii_uppercase.find(lowerCAmelCase__   )
                        UpperCAmelCase_    				=							num - key
                        if num < 0:
                              UpperCAmelCase_    				=							num + len(string.ascii_uppercase   )
                        UpperCAmelCase_    				=							translated + string.ascii_uppercase[num]
                  else:
                        UpperCAmelCase_    				=							translated + symbol
            print(f"""Decryption using Key #{key}: {translated}"""   )
def      a__			(   ):
      UpperCAmelCase_    				=							input("Encrypted message: "   )
      UpperCAmelCase_    				=							message.upper()
      decrypt(lowerCAmelCase__   )


if __name__ == "__main__":
  import doctest

  doctest.testmod()
  main()




