



from collections import OrderedDict
from typing import Mapping

from ...configuration_utils import PretrainedConfig
from ...onnx import OnnxConfig
from ...utils import logging


__A							       =		logging.get_logger(__name__)

__A							       =		{
    '''andreasmadsen/efficient_mlm_m0.40''': (
        '''https://huggingface.co/andreasmadsen/efficient_mlm_m0.40/resolve/main/config.json'''
    ),
}






class 						lowercase		(					snake_case__):






	"""simple docstring"""


	a__ :   Optional[int]						  =				"roberta-prelayernorm"




	def __init__(      self      :		List[Any]		,    __UpperCAmelCase      :		List[Any]=50_265		,    __UpperCAmelCase      :		Union[str, Any]=768		,    __UpperCAmelCase      :		Optional[Any]=12		,    __UpperCAmelCase      :		Optional[Any]=12		,    __UpperCAmelCase      :		List[str]=3_072		,    __UpperCAmelCase      :		Dict="gelu"		,    __UpperCAmelCase      :		Optional[Any]=0.1		,    __UpperCAmelCase      :		Dict=0.1		,    __UpperCAmelCase      :		Tuple=512		,    __UpperCAmelCase      :		Any=2		,    __UpperCAmelCase      :		Tuple=0.02		,    __UpperCAmelCase      :		int=1E-12		,    __UpperCAmelCase      :		Optional[Any]=1		,    __UpperCAmelCase      :		Optional[int]=0		,    __UpperCAmelCase      :		List[Any]=2		,    __UpperCAmelCase      :		Optional[int]="absolute"		,    __UpperCAmelCase      :		str=True		,    __UpperCAmelCase      :		Optional[int]=None		,    **__UpperCAmelCase      :		Optional[Any]		,    )     ->					Optional[Any]:
							super().__init__(pad_token_id=snake_case_		,    bos_token_id=snake_case_		,    eos_token_id=snake_case_		,    **snake_case_	)

							UpperCAmelCase_=  vocab_size
							UpperCAmelCase_=  hidden_size
							UpperCAmelCase_=  num_hidden_layers
							UpperCAmelCase_=  num_attention_heads
							UpperCAmelCase_=  hidden_act
							UpperCAmelCase_=  intermediate_size
							UpperCAmelCase_=  hidden_dropout_prob
							UpperCAmelCase_=  attention_probs_dropout_prob
							UpperCAmelCase_=  max_position_embeddings
							UpperCAmelCase_=  type_vocab_size
							UpperCAmelCase_=  initializer_range
							UpperCAmelCase_=  layer_norm_eps
							UpperCAmelCase_=  position_embedding_type
							UpperCAmelCase_=  use_cache
							UpperCAmelCase_=  classifier_dropout






class 						lowercase		(					snake_case__):






	"""simple docstring"""


	@property
	def     _SCREAMING_SNAKE_CASE						(      self      :		Optional[int]	)     ->					Mapping[str, Mapping[int, str]]:
							if self.task == "multiple-choice":
													UpperCAmelCase_=  {0: """batch""", 1: """choice""", 2: """sequence"""}
							else:
													UpperCAmelCase_=  {0: """batch""", 1: """sequence"""}
							return OrderedDict(
							    [
							        ("""input_ids""", dynamic_axis),
							        ("""attention_mask""", dynamic_axis),
							    ]	)









from typing import TYPE_CHECKING

from ...utils import (
    OptionalDependencyNotAvailable,
    _LazyModule,
    is_flax_available,
    is_sentencepiece_available,
    is_tf_available,
    is_tokenizers_available,
    is_torch_available,
)


lowercase_													=      {
    '''configuration_albert''': ['''ALBERT_PRETRAINED_CONFIG_ARCHIVE_MAP''', '''AlbertConfig''', '''AlbertOnnxConfig'''],
}

try:
				if not is_sentencepiece_available():
								raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
				pass
else:
				lowercase_													=      ['''AlbertTokenizer''']

try:
				if not is_tokenizers_available():
								raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
				pass
else:
				lowercase_													=      ['''AlbertTokenizerFast''']

try:
				if not is_torch_available():
								raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
				pass
else:
				lowercase_													=      [
				    '''ALBERT_PRETRAINED_MODEL_ARCHIVE_LIST''',
				    '''AlbertForMaskedLM''',
				    '''AlbertForMultipleChoice''',
				    '''AlbertForPreTraining''',
				    '''AlbertForQuestionAnswering''',
				    '''AlbertForSequenceClassification''',
				    '''AlbertForTokenClassification''',
				    '''AlbertModel''',
				    '''AlbertPreTrainedModel''',
				    '''load_tf_weights_in_albert''',
				]

try:
				if not is_tf_available():
								raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
				pass
else:
				lowercase_													=      [
				    '''TF_ALBERT_PRETRAINED_MODEL_ARCHIVE_LIST''',
				    '''TFAlbertForMaskedLM''',
				    '''TFAlbertForMultipleChoice''',
				    '''TFAlbertForPreTraining''',
				    '''TFAlbertForQuestionAnswering''',
				    '''TFAlbertForSequenceClassification''',
				    '''TFAlbertForTokenClassification''',
				    '''TFAlbertMainLayer''',
				    '''TFAlbertModel''',
				    '''TFAlbertPreTrainedModel''',
				]

try:
				if not is_flax_available():
								raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
				pass
else:
				lowercase_													=      [
				    '''FlaxAlbertForMaskedLM''',
				    '''FlaxAlbertForMultipleChoice''',
				    '''FlaxAlbertForPreTraining''',
				    '''FlaxAlbertForQuestionAnswering''',
				    '''FlaxAlbertForSequenceClassification''',
				    '''FlaxAlbertForTokenClassification''',
				    '''FlaxAlbertModel''',
				    '''FlaxAlbertPreTrainedModel''',
				]

if TYPE_CHECKING:
				from .configuration_albert import ALBERT_PRETRAINED_CONFIG_ARCHIVE_MAP, AlbertConfig, AlbertOnnxConfig

				try:
								if not is_sentencepiece_available():
												raise OptionalDependencyNotAvailable()
				except OptionalDependencyNotAvailable:
								pass
				else:
								from .tokenization_albert import AlbertTokenizer

				try:
								if not is_tokenizers_available():
												raise OptionalDependencyNotAvailable()
				except OptionalDependencyNotAvailable:
								pass
				else:
								from .tokenization_albert_fast import AlbertTokenizerFast

				try:
								if not is_torch_available():
												raise OptionalDependencyNotAvailable()
				except OptionalDependencyNotAvailable:
								pass
				else:
								from .modeling_albert import (
								    ALBERT_PRETRAINED_MODEL_ARCHIVE_LIST,
								    AlbertForMaskedLM,
								    AlbertForMultipleChoice,
								    AlbertForPreTraining,
								    AlbertForQuestionAnswering,
								    AlbertForSequenceClassification,
								    AlbertForTokenClassification,
								    AlbertModel,
								    AlbertPreTrainedModel,
								    load_tf_weights_in_albert,
								)

				try:
								if not is_tf_available():
												raise OptionalDependencyNotAvailable()
				except OptionalDependencyNotAvailable:
								pass
				else:
								from .modeling_tf_albert import (
								    TF_ALBERT_PRETRAINED_MODEL_ARCHIVE_LIST,
								    TFAlbertForMaskedLM,
								    TFAlbertForMultipleChoice,
								    TFAlbertForPreTraining,
								    TFAlbertForQuestionAnswering,
								    TFAlbertForSequenceClassification,
								    TFAlbertForTokenClassification,
								    TFAlbertMainLayer,
								    TFAlbertModel,
								    TFAlbertPreTrainedModel,
								)

				try:
								if not is_flax_available():
												raise OptionalDependencyNotAvailable()
				except OptionalDependencyNotAvailable:
								pass
				else:
								from .modeling_flax_albert import (
								    FlaxAlbertForMaskedLM,
								    FlaxAlbertForMultipleChoice,
								    FlaxAlbertForPreTraining,
								    FlaxAlbertForQuestionAnswering,
								    FlaxAlbertForSequenceClassification,
								    FlaxAlbertForTokenClassification,
								    FlaxAlbertModel,
								    FlaxAlbertPreTrainedModel,
								)
else:
				import sys

				lowercase_													=      _LazyModule(__name__, globals()['''__file__'''], _import_structure, module_spec=__spec__)




