



'''simple docstring'''






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


lowerCAmelCase:					Optional[int]						       =						logging.get_logger(__name__)

lowerCAmelCase:					List[Any]						       =						{
    "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__(					lowercase__	):
    lowercase__ =    'xglm'
    lowercase__ =    ['past_key_values']

    lowercase__ =    {
        'num_attention_heads': 'attention_heads',
        'hidden_size': 'd_model',
        'num_hidden_layers': 'num_layers',
    }







    def __init__(      self :  Optional[int]						,			__snake_case :  int=25_60_08						,			__snake_case :  Tuple=20_48						,			__snake_case :  List[Any]=10_24						,			__snake_case :  str=40_96						,			__snake_case :  Optional[Any]=24						,			__snake_case :  Optional[int]=16						,			__snake_case :  List[Any]="gelu"						,			__snake_case :  str=0.1						,			__snake_case :  Dict=0.1						,			__snake_case :  Tuple=0.0						,			__snake_case :  Optional[int]=0.0						,			__snake_case :  Dict=0.02						,			__snake_case :  Optional[int]=True						,			__snake_case :  Any=True						,			__snake_case :  Dict=2						,			__snake_case :  Optional[Any]=1						,			__snake_case :  List[Any]=0						,			__snake_case :  Optional[Any]=2						,			**__snake_case :  List[str]						,			):
      a						:					List[str]        =     vocab_size
      a						:					Optional[Any]        =     max_position_embeddings
      a						:					Optional[Any]        =     d_model
      a						:					str        =     ffn_dim
      a						:					List[str]        =     num_layers
      a						:					Dict        =     attention_heads
      a						:					str        =     activation_function
      a						:					Optional[Any]        =     dropout
      a						:					Any        =     attention_dropout
      a						:					int        =     activation_dropout
      a						:					Tuple        =     layerdrop
      a						:					Tuple        =     init_std
      a						:					List[str]        =     scale_embedding  # scale factor will be sqrt(d_model) if True
      a						:					Union[str, Any]        =     use_cache

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







from functools import lru_cache






@lru_cache
def 				lowerCamelCase__      (    __lowerCamelCase			:     int		):
  if num < 0:
    raise ValueError("""Number should not be negative."""		)

  return 1 if num in (0, 1) else num * factorial(num - 1		)


if __name__ == "__main__":
       import doctest

       doctest.testmod()


