

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


a		=logging.get_logger(__name__)

a		={
    """transfo-xl-wt103""": """https://huggingface.co/transfo-xl-wt103/resolve/main/config.json""",
}






class        A_		(       SCREAMING_SNAKE_CASE				):
							_UpperCAmelCase    :  Any						      =      '''transfo-xl'''
							_UpperCAmelCase    :  Union[str, Any]						      =      ['''mems''']
							_UpperCAmelCase    :  List[Any]						      =      {
							    '''n_token''': '''vocab_size''',
							    '''hidden_size''': '''d_model''',
							    '''num_attention_heads''': '''n_head''',
							    '''num_hidden_layers''': '''n_layer''',
							}
							def __init__(		self		:			List[Any]   ,SCREAMING_SNAKE_CASE__		:			Optional[int]=2_6_7_7_3_5   ,SCREAMING_SNAKE_CASE__		:			List[Any]=[2_0_0_0_0, 4_0_0_0_0, 2_0_0_0_0_0]   ,SCREAMING_SNAKE_CASE__		:			List[Any]=1_0_2_4   ,SCREAMING_SNAKE_CASE__		:			Optional[int]=1_0_2_4   ,SCREAMING_SNAKE_CASE__		:			int=1_6   ,SCREAMING_SNAKE_CASE__		:			List[str]=6_4   ,SCREAMING_SNAKE_CASE__		:			Any=4_0_9_6   ,SCREAMING_SNAKE_CASE__		:			int=4   ,SCREAMING_SNAKE_CASE__		:			List[Any]=False   ,SCREAMING_SNAKE_CASE__		:			List[str]=1_8   ,SCREAMING_SNAKE_CASE__		:			Any=1_6_0_0   ,SCREAMING_SNAKE_CASE__		:			List[Any]=1_0_0_0   ,SCREAMING_SNAKE_CASE__		:			Optional[Any]=True   ,SCREAMING_SNAKE_CASE__		:			Union[str, Any]=True   ,SCREAMING_SNAKE_CASE__		:			Tuple=0   ,SCREAMING_SNAKE_CASE__		:			str=-1   ,SCREAMING_SNAKE_CASE__		:			Union[str, Any]=True   ,SCREAMING_SNAKE_CASE__		:			int=0.1   ,SCREAMING_SNAKE_CASE__		:			Union[str, Any]=0.0   ,SCREAMING_SNAKE_CASE__		:			List[Any]=True   ,SCREAMING_SNAKE_CASE__		:			Optional[Any]="normal"   ,SCREAMING_SNAKE_CASE__		:			List[Any]=0.01   ,SCREAMING_SNAKE_CASE__		:			Dict=0.01   ,SCREAMING_SNAKE_CASE__		:			List[Any]=0.02   ,SCREAMING_SNAKE_CASE__		:			Dict=1E-5   ,SCREAMING_SNAKE_CASE__		:			List[str]=0   ,**SCREAMING_SNAKE_CASE__		:			List[Any]   ,):
								__lowerCamelCase				:				Tuple					       = vocab_size
								__lowerCamelCase				:				Optional[int]					       = []
								self.cutoffs.extend(SCREAMING_SNAKE_CASE__)
								if proj_share_all_but_first:
									__lowerCamelCase				:				List[Any]					       = [False] + [True] * len(self.cutoffs)
								else:
									__lowerCamelCase				:				str					       = [False] + [False] * len(self.cutoffs)
								__lowerCamelCase				:				str					       = d_model
								__lowerCamelCase				:				Dict					       = d_embed
								__lowerCamelCase				:				Any					       = d_head
								__lowerCamelCase				:				List[Any]					       = d_inner
								__lowerCamelCase				:				Dict					       = div_val
								__lowerCamelCase				:				List[Any]					       = pre_lnorm
								__lowerCamelCase				:				Tuple					       = n_layer
								__lowerCamelCase				:				int					       = n_head
								__lowerCamelCase				:				Optional[int]					       = mem_len
								__lowerCamelCase				:				List[str]					       = same_length
								__lowerCamelCase				:				Any					       = attn_type
								__lowerCamelCase				:				int					       = clamp_len
								__lowerCamelCase				:				str					       = sample_softmax
								__lowerCamelCase				:				List[Any]					       = adaptive
								__lowerCamelCase				:				Tuple					       = dropout
								__lowerCamelCase				:				List[Any]					       = dropatt
								__lowerCamelCase				:				Union[str, Any]					       = untie_r
								__lowerCamelCase				:				Any					       = init
								__lowerCamelCase				:				List[str]					       = init_range
								__lowerCamelCase				:				Optional[int]					       = proj_init_std
								__lowerCamelCase				:				List[Any]					       = init_std
								__lowerCamelCase				:				Any					       = layer_norm_epsilon
								super().__init__(eos_token_id=SCREAMING_SNAKE_CASE__   ,**SCREAMING_SNAKE_CASE__)
							@property
							def     lowerCAmelCase     (		self		:			List[Any]):
								# 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     lowerCAmelCase     (		self		:			str   ,SCREAMING_SNAKE_CASE__		:			Dict):
								# 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.")











'''simple docstring'''
from typing import TYPE_CHECKING

from ...utils import OptionalDependencyNotAvailable, _LazyModule, is_torch_available


a__							:							List[Any] ={
    '''configuration_timesformer''': ['''TIMESFORMER_PRETRAINED_CONFIG_ARCHIVE_MAP''', '''TimesformerConfig'''],
}

try:
    if not is_torch_available():
        raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
    pass
else:
    a__							:							Optional[int] =[
        '''TIMESFORMER_PRETRAINED_MODEL_ARCHIVE_LIST''',
        '''TimesformerModel''',
        '''TimesformerForVideoClassification''',
        '''TimesformerPreTrainedModel''',
    ]

if TYPE_CHECKING:
    from .configuration_timesformer import TIMESFORMER_PRETRAINED_CONFIG_ARCHIVE_MAP, TimesformerConfig

    try:
        if not is_torch_available():
            raise OptionalDependencyNotAvailable()
    except OptionalDependencyNotAvailable:
        pass
    else:
        from .modeling_timesformer import (
            TIMESFORMER_PRETRAINED_MODEL_ARCHIVE_LIST,
            TimesformerForVideoClassification,
            TimesformerModel,
            TimesformerPreTrainedModel,
        )

else:
    import sys

    a__							:							Optional[int] =_LazyModule(__name__, globals()['''__file__'''], _import_structure, module_spec=__spec__)
