




"""simple docstring"""

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 							lowercase_			(	__lowerCAmelCase				):



 '''simple docstring'''
 UpperCAmelCase       :	Optional[int]     =      '''transfo-xl'''
 UpperCAmelCase       :	Union[str, Any]     =      ['''mems''']
 UpperCAmelCase       :	Dict     =      {
     '''n_token''': '''vocab_size''',
     '''hidden_size''': '''d_model''',
     '''num_attention_heads''': '''n_head''',
     '''num_hidden_layers''': '''n_layer''',
 }

 def __init__(					self			:			Dict       ,				_UpperCAmelCase			:			int=267_735       ,				_UpperCAmelCase			:			Union[str, Any]=[20_000, 40_000, 200_000]       ,				_UpperCAmelCase			:			Union[str, Any]=1_024       ,				_UpperCAmelCase			:			Any=1_024       ,				_UpperCAmelCase			:			int=16       ,				_UpperCAmelCase			:			Optional[Any]=64       ,				_UpperCAmelCase			:			Optional[Any]=4_096       ,				_UpperCAmelCase			:			Optional[int]=4       ,				_UpperCAmelCase			:			List[Any]=False       ,				_UpperCAmelCase			:			Tuple=18       ,				_UpperCAmelCase			:			Dict=1_600       ,				_UpperCAmelCase			:			int=1_000       ,				_UpperCAmelCase			:			Any=True       ,				_UpperCAmelCase			:			List[Any]=True       ,				_UpperCAmelCase			:			int=0       ,				_UpperCAmelCase			:			Union[str, Any]=-1       ,				_UpperCAmelCase			:			Any=True       ,				_UpperCAmelCase			:			Any=0.1       ,				_UpperCAmelCase			:			Any=0.0       ,				_UpperCAmelCase			:			Optional[Any]=True       ,				_UpperCAmelCase			:			Dict="normal"       ,				_UpperCAmelCase			:			List[str]=0.01       ,				_UpperCAmelCase			:			Dict=0.01       ,				_UpperCAmelCase			:			Union[str, Any]=0.02       ,				_UpperCAmelCase			:			str=1E-5       ,				_UpperCAmelCase			:			Dict=0       ,				**_UpperCAmelCase			:			Any       ,				):
       _A     =  vocab_size
       _A     =  []
       self.cutoffs.extend(_UpperCAmelCase						)
       if proj_share_all_but_first:
             _A     =  [False] + [True] * len(self.cutoffs						)
       else:
             _A     =  [False] + [False] * len(self.cutoffs						)
       _A     =  d_model
       _A     =  d_embed
       _A     =  d_head
       _A     =  d_inner
       _A     =  div_val
       _A     =  pre_lnorm
       _A     =  n_layer
       _A     =  n_head
       _A     =  mem_len
       _A     =  same_length
       _A     =  attn_type
       _A     =  clamp_len
       _A     =  sample_softmax
       _A     =  adaptive
       _A     =  dropout
       _A     =  dropatt
       _A     =  untie_r
       _A     =  init
       _A     =  init_range
       _A     =  proj_init_std
       _A     =  init_std
       _A     =  layer_norm_epsilon
       super().__init__(eos_token_id=_UpperCAmelCase       ,				**_UpperCAmelCase						)

 @property
 def      lowerCAmelCase_				(					self			:			Optional[int]						):
       # 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			:			List[str]       ,				_UpperCAmelCase			:			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 .configuration_bert_masked import MaskedBertConfig
from .modeling_bert_masked import (
    MaskedBertForMultipleChoice,
    MaskedBertForQuestionAnswering,
    MaskedBertForSequenceClassification,
    MaskedBertForTokenClassification,
    MaskedBertModel,
)
from .modules import *

