"""simple docstring"""






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


__lowerCAmelCase    :       Tuple					     =logging.get_logger(__name__)

__lowerCAmelCase    :       int					     ={
    """facebook/xglm-564M""": """https://huggingface.co/facebook/xglm-564M/resolve/main/config.json""",
    # See all XGLM models at https://huggingface.co/models?filter=xglm
}





class  _A						(       snake_case_	):
      snake_case__			:   List[str]							  =	'xglm'
      snake_case__			:   List[Any]							  =	['past_key_values']

      snake_case__			:   List[str]							  =	{
          'num_attention_heads': 'attention_heads',
          'hidden_size': 'd_model',
          'num_hidden_layers': 'num_layers',
      }

      def __init__(						self		,       __lowerCAmelCase=25_6008		,       __lowerCAmelCase=2048		,       __lowerCAmelCase=1024		,       __lowerCAmelCase=4096		,       __lowerCAmelCase=24		,       __lowerCAmelCase=16		,       __lowerCAmelCase="gelu"		,       __lowerCAmelCase=0.1		,       __lowerCAmelCase=0.1		,       __lowerCAmelCase=0.0		,       __lowerCAmelCase=0.0		,       __lowerCAmelCase=0.0_2		,       __lowerCAmelCase=True		,       __lowerCAmelCase=True		,       __lowerCAmelCase=2		,       __lowerCAmelCase=1		,       __lowerCAmelCase=0		,       __lowerCAmelCase=2		,       **__lowerCAmelCase		,       ):







            """simple docstring"""



            lowercase														=	vocab_size
            lowercase														=	max_position_embeddings
            lowercase														=	d_model
            lowercase														=	ffn_dim
            lowercase														=	num_layers
            lowercase														=	attention_heads
            lowercase														=	activation_function
            lowercase														=	dropout
            lowercase														=	attention_dropout
            lowercase														=	activation_dropout
            lowercase														=	layerdrop
            lowercase														=	init_std
            lowercase														=	scale_embedding  # scale factor will be sqrt(d_model) if True
            lowercase														=	use_cache

            super().__init__(
                pad_token_id=__lowerCAmelCase		,       bos_token_id=__lowerCAmelCase		,       eos_token_id=__lowerCAmelCase		,       decoder_start_token_id=__lowerCAmelCase		,       **__lowerCAmelCase		,       )




def    __lowercase     (						lowerCamelCase					:     str	):
 UpperCamelCase_					:						Dict =					0
 for ch in input_str:
  UpperCamelCase_					:						Tuple =					ord(lowerCamelCase	)
  UpperCamelCase_					:						str =					pow(2  ,  lowerCamelCase	)

  # If we already turned on bit for current character's unicode
  if bitmap >> ch_unicode & 1 == 1:
   return False
  bitmap |= ch_bit_index_on
 return True


if __name__ == "__main__":
   import doctest

   doctest.testmod()



