






'''simple docstring'''




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


__lowerCamelCase   :					List[str]   							=					logging.get_logger(__name__)

__lowerCamelCase   :					List[Any]   							=					{
    '''transfo-xl-wt103''': '''https://huggingface.co/transfo-xl-wt103/resolve/main/config.json''',
}







class    A_	(a_							):
							"""simple docstring"""




							a__   		=	'''transfo-xl'''
							a__   		=	['''mems''']
							a__   		=	{
							    '''n_token''': '''vocab_size''',
							    '''hidden_size''': '''d_model''',
							    '''num_attention_heads''': '''n_head''',
							    '''num_hidden_layers''': '''n_layer''',
							}

							def __init__(		self			:Union[str, Any]       ,							lowerCAmelCase__			:int=267_735       ,							lowerCAmelCase__			:Tuple=[20_000, 40_000, 200_000]       ,							lowerCAmelCase__			:Union[str, Any]=1_024       ,							lowerCAmelCase__			:int=1_024       ,							lowerCAmelCase__			:int=16       ,							lowerCAmelCase__			:int=64       ,							lowerCAmelCase__			:Union[str, Any]=4_096       ,							lowerCAmelCase__			:Optional[int]=4       ,							lowerCAmelCase__			:List[str]=False       ,							lowerCAmelCase__			:Optional[int]=18       ,							lowerCAmelCase__			:List[str]=1_600       ,							lowerCAmelCase__			:int=1_000       ,							lowerCAmelCase__			:Tuple=True       ,							lowerCAmelCase__			:int=True       ,							lowerCAmelCase__			:str=0       ,							lowerCAmelCase__			:str=-1       ,							lowerCAmelCase__			:Tuple=True       ,							lowerCAmelCase__			:List[Any]=0.1       ,							lowerCAmelCase__			:List[str]=0.0       ,							lowerCAmelCase__			:Tuple=True       ,							lowerCAmelCase__			:List[str]="normal"       ,							lowerCAmelCase__			:Any=0.0_1       ,							lowerCAmelCase__			:List[str]=0.0_1       ,							lowerCAmelCase__			:List[str]=0.0_2       ,							lowerCAmelCase__			:Tuple=1E-5       ,							lowerCAmelCase__			:Union[str, Any]=0       ,							**lowerCAmelCase__			:List[Any]       ,							)				->  str:


										'''simple docstring'''




										snake_case_				:					List[str]   =       vocab_size
										snake_case_				:					List[Any]   =       []
										self.cutoffs.extend(lowerCAmelCase__				)
										if proj_share_all_but_first:
													snake_case_				:					Tuple   =       [False] + [True] * len(self.cutoffs				)
										else:
													snake_case_				:					int   =       [False] + [False] * len(self.cutoffs				)
										snake_case_				:					Dict   =       d_model
										snake_case_				:					Union[str, Any]   =       d_embed
										snake_case_				:					List[Any]   =       d_head
										snake_case_				:					List[Any]   =       d_inner
										snake_case_				:					str   =       div_val
										snake_case_				:					Optional[Any]   =       pre_lnorm
										snake_case_				:					List[Any]   =       n_layer
										snake_case_				:					Tuple   =       n_head
										snake_case_				:					List[Any]   =       mem_len
										snake_case_				:					Union[str, Any]   =       same_length
										snake_case_				:					Union[str, Any]   =       attn_type
										snake_case_				:					Optional[Any]   =       clamp_len
										snake_case_				:					List[str]   =       sample_softmax
										snake_case_				:					List[Any]   =       adaptive
										snake_case_				:					Any   =       dropout
										snake_case_				:					List[str]   =       dropatt
										snake_case_				:					int   =       untie_r
										snake_case_				:					Dict   =       init
										snake_case_				:					List[Any]   =       init_range
										snake_case_				:					Tuple   =       proj_init_std
										snake_case_				:					Union[str, Any]   =       init_std
										snake_case_				:					Union[str, Any]   =       layer_norm_epsilon
										super().__init__(eos_token_id=lowerCAmelCase__       ,							**lowerCAmelCase__				)

							@property
							def 							_A	(		self			:Tuple				)				->  str:


										'''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 							_A	(		self			:Tuple       ,							lowerCAmelCase__			:Optional[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'''




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


__lowerCamelCase   :					List[str]   							=					logging.get_logger(__name__)

__lowerCamelCase   :					int   							=					{
    '''microsoft/cvt-13''': '''https://huggingface.co/microsoft/cvt-13/resolve/main/config.json''',
    # See all Cvt models at https://huggingface.co/models?filter=cvt
}







class    A_	(a_							):
							"""simple docstring"""




							a__   		=	'''cvt'''

							def __init__(		self			:List[Any]       ,							lowerCAmelCase__			:Optional[int]=3       ,							lowerCAmelCase__			:Any=[7, 3, 3]       ,							lowerCAmelCase__			:Dict=[4, 2, 2]       ,							lowerCAmelCase__			:Union[str, Any]=[2, 1, 1]       ,							lowerCAmelCase__			:Any=[64, 192, 384]       ,							lowerCAmelCase__			:List[str]=[1, 3, 6]       ,							lowerCAmelCase__			:str=[1, 2, 10]       ,							lowerCAmelCase__			:Any=[4.0, 4.0, 4.0]       ,							lowerCAmelCase__			:int=[0.0, 0.0, 0.0]       ,							lowerCAmelCase__			:Optional[Any]=[0.0, 0.0, 0.0]       ,							lowerCAmelCase__			:Dict=[0.0, 0.0, 0.1]       ,							lowerCAmelCase__			:List[Any]=[True, True, True]       ,							lowerCAmelCase__			:List[Any]=[False, False, True]       ,							lowerCAmelCase__			:Dict=["dw_bn", "dw_bn", "dw_bn"]       ,							lowerCAmelCase__			:Any=[3, 3, 3]       ,							lowerCAmelCase__			:Tuple=[1, 1, 1]       ,							lowerCAmelCase__			:Optional[int]=[2, 2, 2]       ,							lowerCAmelCase__			:Union[str, Any]=[1, 1, 1]       ,							lowerCAmelCase__			:Any=[1, 1, 1]       ,							lowerCAmelCase__			:List[str]=0.0_2       ,							lowerCAmelCase__			:Dict=1E-1_2       ,							**lowerCAmelCase__			:Optional[Any]       ,							)				->  str:


										'''simple docstring'''




										super().__init__(**lowerCAmelCase__				)
										snake_case_				:					int   =       num_channels
										snake_case_				:					int   =       patch_sizes
										snake_case_				:					Optional[Any]   =       patch_stride
										snake_case_				:					Dict   =       patch_padding
										snake_case_				:					Tuple   =       embed_dim
										snake_case_				:					Optional[int]   =       num_heads
										snake_case_				:					Union[str, Any]   =       depth
										snake_case_				:					Optional[int]   =       mlp_ratio
										snake_case_				:					Tuple   =       attention_drop_rate
										snake_case_				:					str   =       drop_rate
										snake_case_				:					Tuple   =       drop_path_rate
										snake_case_				:					Any   =       qkv_bias
										snake_case_				:					Union[str, Any]   =       cls_token
										snake_case_				:					int   =       qkv_projection_method
										snake_case_				:					Any   =       kernel_qkv
										snake_case_				:					Union[str, Any]   =       padding_kv
										snake_case_				:					str   =       stride_kv
										snake_case_				:					Dict   =       padding_q
										snake_case_				:					Tuple   =       stride_q
										snake_case_				:					Any   =       initializer_range
										snake_case_				:					Any   =       layer_norm_eps




