



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


__lowerCamelCase     :							Union[str, Any]  							=				logging.get_logger(__name__)

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





class  __magic_name__   (							A__						):
		lowercase      :       int          ='''transfo-xl'''
		lowercase      :       List[str]          =['''mems''']
		lowercase      :       Optional[int]          ={
		    '''n_token''': '''vocab_size''',
		    '''hidden_size''': '''d_model''',
		    '''num_attention_heads''': '''n_head''',
		    '''num_hidden_layers''': '''n_layer''',
		}






		def __init__(						self      :     Dict				,		UpperCamelCase__      :     Dict=26_77_35				,		UpperCamelCase__      :     Dict=[2_00_00, 4_00_00, 20_00_00]				,		UpperCamelCase__      :     Tuple=10_24				,		UpperCamelCase__      :     Tuple=10_24				,		UpperCamelCase__      :     Optional[Any]=16				,		UpperCamelCase__      :     Optional[int]=64				,		UpperCamelCase__      :     Optional[Any]=40_96				,		UpperCamelCase__      :     str=4				,		UpperCamelCase__      :     Union[str, Any]=False				,		UpperCamelCase__      :     Optional[int]=18				,		UpperCamelCase__      :     Tuple=16_00				,		UpperCamelCase__      :     List[str]=10_00				,		UpperCamelCase__      :     List[Any]=True				,		UpperCamelCase__      :     Optional[Any]=True				,		UpperCamelCase__      :     int=0				,		UpperCamelCase__      :     Optional[int]=-1				,		UpperCamelCase__      :     Union[str, Any]=True				,		UpperCamelCase__      :     Union[str, Any]=0.1				,		UpperCamelCase__      :     str=0.0				,		UpperCamelCase__      :     Dict=True				,		UpperCamelCase__      :     int="normal"				,		UpperCamelCase__      :     Any=0.01				,		UpperCamelCase__      :     Tuple=0.01				,		UpperCamelCase__      :     List[Any]=0.02				,		UpperCamelCase__      :     List[str]=1e-5				,		UpperCamelCase__      :     int=0				,		**UpperCamelCase__      :     Tuple				,		)				->					List[Any]:
								'''simple docstring'''







								UpperCAmelCase         =     vocab_size
								UpperCAmelCase         =     []
								self.cutoffs.extend(UpperCamelCase__      )
								if proj_share_all_but_first:
														UpperCAmelCase         =     [False] + [True] * len(self.cutoffs      )
								else:
														UpperCAmelCase         =     [False] + [False] * len(self.cutoffs      )
								UpperCAmelCase         =     d_model
								UpperCAmelCase         =     d_embed
								UpperCAmelCase         =     d_head
								UpperCAmelCase         =     d_inner
								UpperCAmelCase         =     div_val
								UpperCAmelCase         =     pre_lnorm
								UpperCAmelCase         =     n_layer
								UpperCAmelCase         =     n_head
								UpperCAmelCase         =     mem_len
								UpperCAmelCase         =     same_length
								UpperCAmelCase         =     attn_type
								UpperCAmelCase         =     clamp_len
								UpperCAmelCase         =     sample_softmax
								UpperCAmelCase         =     adaptive
								UpperCAmelCase         =     dropout
								UpperCAmelCase         =     dropatt
								UpperCAmelCase         =     untie_r
								UpperCAmelCase         =     init
								UpperCAmelCase         =     init_range
								UpperCAmelCase         =     proj_init_std
								UpperCAmelCase         =     init_std
								UpperCAmelCase         =     layer_norm_epsilon
								super().__init__(eos_token_id=UpperCamelCase__				,		**UpperCamelCase__      )






		@property
		def SCREAMING_SNAKE_CASE_			(						self      :     Any      )				->					Union[str, Any]:
								'''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 SCREAMING_SNAKE_CASE_			(						self      :     List[Any]				,		UpperCamelCase__      :     int      )				->					Optional[Any]:
								'''simple docstring'''







								raise NotImplementedError(
								    F'The model {self.model_type} is one of the few models that has no sequence length limit.'      )








from typing import TYPE_CHECKING

from ...utils import OptionalDependencyNotAvailable, _LazyModule, is_tokenizers_available, is_torch_available


__lowerCamelCase     :							Optional[int]  							=				{
    "configuration_roc_bert": ["ROC_BERT_PRETRAINED_CONFIG_ARCHIVE_MAP", "RoCBertConfig"],
    "tokenization_roc_bert": ["RoCBertTokenizer"],
}

try:
		if not is_tokenizers_available():
				raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
		pass
else:
		pass

try:
		if not is_torch_available():
				raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
		pass
else:
		__lowerCamelCase     :							List[Any]  							=				[
		    "ROC_BERT_PRETRAINED_MODEL_ARCHIVE_LIST",
		    "RoCBertForCausalLM",
		    "RoCBertForMaskedLM",
		    "RoCBertForMultipleChoice",
		    "RoCBertForPreTraining",
		    "RoCBertForQuestionAnswering",
		    "RoCBertForSequenceClassification",
		    "RoCBertForTokenClassification",
		    "RoCBertLayer",
		    "RoCBertModel",
		    "RoCBertPreTrainedModel",
		    "load_tf_weights_in_roc_bert",
		]

if TYPE_CHECKING:
		from .configuration_roc_bert import ROC_BERT_PRETRAINED_CONFIG_ARCHIVE_MAP, RoCBertConfig
		from .tokenization_roc_bert import RoCBertTokenizer

		try:
				if not is_tokenizers_available():
						raise OptionalDependencyNotAvailable()
		except OptionalDependencyNotAvailable:
				pass
		else:
				raise OptionalDependencyNotAvailable()

		try:
				if not is_torch_available():
						raise OptionalDependencyNotAvailable()
		except OptionalDependencyNotAvailable:
				pass
		else:
				from .modeling_roc_bert import (
				    ROC_BERT_PRETRAINED_MODEL_ARCHIVE_LIST,
				    RoCBertForCausalLM,
				    RoCBertForMaskedLM,
				    RoCBertForMultipleChoice,
				    RoCBertForPreTraining,
				    RoCBertForQuestionAnswering,
				    RoCBertForSequenceClassification,
				    RoCBertForTokenClassification,
				    RoCBertLayer,
				    RoCBertModel,
				    RoCBertPreTrainedModel,
				    load_tf_weights_in_roc_bert,
				)


else:
		import sys

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



