


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


_snake_case					:		Optional[Any]      =    logging.get_logger(__name__)

_snake_case					:		Union[str, Any]      =    {
    "transfo-xl-wt103": "https://huggingface.co/transfo-xl-wt103/resolve/main/config.json",
}

class     a		(_lowerCAmelCase				):




							"""simple docstring"""


							__UpperCAmelCase   :							Optional[Any]					  =  "transfo-xl"
							__UpperCAmelCase   :							Union[str, Any]					  =  ["mems"]
							__UpperCAmelCase   :							str					  =  {
							    "n_token": "vocab_size",
							    "hidden_size": "d_model",
							    "num_attention_heads": "n_head",
							    "num_hidden_layers": "n_layer",
							}

							def __init__(							self	:  Optional[Any]   ,     lowerCamelCase	:  List[Any]=267735   ,     lowerCamelCase	:  Dict=[20000, 40000, 200000]   ,     lowerCamelCase	:  Tuple=1024   ,     lowerCamelCase	:  List[str]=1024   ,     lowerCamelCase	:  Optional[int]=16   ,     lowerCamelCase	:  Optional[int]=64   ,     lowerCamelCase	:  Tuple=4096   ,     lowerCamelCase	:  Union[str, Any]=4   ,     lowerCamelCase	:  List[str]=False   ,     lowerCamelCase	:  Optional[Any]=18   ,     lowerCamelCase	:  Optional[int]=1600   ,     lowerCamelCase	:  Tuple=1000   ,     lowerCamelCase	:  Union[str, Any]=True   ,     lowerCamelCase	:  Dict=True   ,     lowerCamelCase	:  List[Any]=0   ,     lowerCamelCase	:  List[str]=-1   ,     lowerCamelCase	:  Tuple=True   ,     lowerCamelCase	:  List[str]=0.1   ,     lowerCamelCase	:  Optional[int]=0.0   ,     lowerCamelCase	:  List[str]=True   ,     lowerCamelCase	:  Union[str, Any]="normal"   ,     lowerCamelCase	:  int=0.01   ,     lowerCamelCase	:  Dict=0.01   ,     lowerCamelCase	:  Tuple=0.02   ,     lowerCamelCase	:  List[str]=1E-5   ,     lowerCamelCase	:  List[Any]=0   ,     **lowerCamelCase	:  str   ,     )     ->   Optional[Any]:
														__snake_case		:      List[Any]										=       vocab_size
														__snake_case		:      Dict										=       []
														self.cutoffs.extend(_a    )
														if proj_share_all_but_first:
																					__snake_case		:      List[str]										=       [False] + [True] * len(self.cutoffs    )
														else:
																					__snake_case		:      Optional[Any]										=       [False] + [False] * len(self.cutoffs    )
														__snake_case		:      Optional[int]										=       d_model
														__snake_case		:      str										=       d_embed
														__snake_case		:      Optional[Any]										=       d_head
														__snake_case		:      Optional[int]										=       d_inner
														__snake_case		:      List[str]										=       div_val
														__snake_case		:      List[str]										=       pre_lnorm
														__snake_case		:      Union[str, Any]										=       n_layer
														__snake_case		:      Optional[int]										=       n_head
														__snake_case		:      str										=       mem_len
														__snake_case		:      int										=       same_length
														__snake_case		:      Dict										=       attn_type
														__snake_case		:      int										=       clamp_len
														__snake_case		:      Optional[int]										=       sample_softmax
														__snake_case		:      List[Any]										=       adaptive
														__snake_case		:      Optional[int]										=       dropout
														__snake_case		:      Optional[int]										=       dropatt
														__snake_case		:      Optional[Any]										=       untie_r
														__snake_case		:      List[str]										=       init
														__snake_case		:      Any										=       init_range
														__snake_case		:      Optional[int]										=       proj_init_std
														__snake_case		:      List[Any]										=       init_std
														__snake_case		:      List[Any]										=       layer_norm_epsilon
														super().__init__(eos_token_id=_a   ,     **_a    )

							@property
							def    __snake_case (							self	:  Dict    )     ->   List[str]:
														# Message copied from Transformer-XL documentation
														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    __snake_case (							self	:  List[Any]   ,     lowerCamelCase	:  Optional[Any]    )     ->   Tuple:
														# Message copied from Transformer-XL documentation
														raise NotImplementedError(
														    F'The model {self.model_type} is one of the few models that has no sequence length limit.'    )







def     lowerCAmelCase_					( __lowerCamelCase							,     __lowerCamelCase							,     __lowerCamelCase							,     __lowerCamelCase							,     __lowerCamelCase							,     __lowerCamelCase     ):
							if index == r:
														for j in range(__lowerCamelCase     ):
																					print(data[j]							,     end=" "     )
														print(" "     )
														return
							#  When no more elements are there to put in data[]
							if i >= n:
														return
							# current is included, put next at next location
							__snake_case		:      Union[str, Any]										=       arr[i]
							combination_util(__lowerCamelCase							,     __lowerCamelCase							,     __lowerCamelCase							,     index + 1							,     __lowerCamelCase							,     i + 1     )
							# current is excluded, replace it with
							# next (Note that i+1 is passed, but
							# index is not changed)
							combination_util(__lowerCamelCase							,     __lowerCamelCase							,     __lowerCamelCase							,     __lowerCamelCase							,     __lowerCamelCase							,     i + 1     )
							# The main function that prints all combinations
							# of size r in arr[] of size n. This function
							# mainly uses combinationUtil()







def     lowerCAmelCase_					( __lowerCamelCase							,     __lowerCamelCase							,     __lowerCamelCase     ):
							# A temporary array to store all combination one by one
							__snake_case		:      Union[str, Any]										=       [0] * r
							# Print all combination using temporary array 'data[]'
							combination_util(__lowerCamelCase							,     __lowerCamelCase							,     __lowerCamelCase							,     0							,     __lowerCamelCase							,     0     )


if __name__ == "__main__":
			# Driver code to check the function above
			_snake_case					:		List[str]      =    [10, 20, 30, 40, 50]
			print_combination(arr, len(arr), 3)
			# This code is contributed by Ambuj sahu

