
"""simple docstring"""






from collections import OrderedDict
from typing import Mapping

from ...configuration_utils import PretrainedConfig
from ...onnx import OnnxConfig


lowerCamelCase__ :       Any						     =			{
    "albert-base-v1": "https://huggingface.co/albert-base-v1/resolve/main/config.json",
    "albert-large-v1": "https://huggingface.co/albert-large-v1/resolve/main/config.json",
    "albert-xlarge-v1": "https://huggingface.co/albert-xlarge-v1/resolve/main/config.json",
    "albert-xxlarge-v1": "https://huggingface.co/albert-xxlarge-v1/resolve/main/config.json",
    "albert-base-v2": "https://huggingface.co/albert-base-v2/resolve/main/config.json",
    "albert-large-v2": "https://huggingface.co/albert-large-v2/resolve/main/config.json",
    "albert-xlarge-v2": "https://huggingface.co/albert-xlarge-v2/resolve/main/config.json",
    "albert-xxlarge-v2": "https://huggingface.co/albert-xxlarge-v2/resolve/main/config.json",
}




class 				lowercase__(				_UpperCAmelCase   ):
	'''simple docstring'''

	UpperCamelCase				=  """albert"""





	def __init__(						self    :List[str]		, lowerCamelCase_    :Any=3_00_00		, lowerCamelCase_    :List[str]=1_28		, lowerCamelCase_    :Optional[Any]=40_96		, lowerCamelCase_    :int=12		, lowerCamelCase_    :Union[str, Any]=1		, lowerCamelCase_    :str=64		, lowerCamelCase_    :List[Any]=1_63_84		, lowerCamelCase_    :List[str]=1		, lowerCamelCase_    :Optional[Any]="gelu_new"		, lowerCamelCase_    :Any=0		, lowerCamelCase_    :Union[str, Any]=0		, lowerCamelCase_    :Optional[int]=5_12		, lowerCamelCase_    :str=2		, lowerCamelCase_    :str=0.0_2		, lowerCamelCase_    :Dict=1E-12		, lowerCamelCase_    :int=0.1		, lowerCamelCase_    :int="absolute"		, lowerCamelCase_    :str=0		, lowerCamelCase_    :Optional[Any]=2		, lowerCamelCase_    :str=3		, **lowerCamelCase_    :int		, )							->			List[str]:







			'''simple docstring'''




			super().__init__(pad_token_id=lowerCamelCase_		, bos_token_id=lowerCamelCase_		, eos_token_id=lowerCamelCase_		, **lowerCamelCase_					)

			SCREAMING_SNAKE_CASE       :     Union[str, Any]				= vocab_size
			SCREAMING_SNAKE_CASE       :     str				= embedding_size
			SCREAMING_SNAKE_CASE       :     int				= hidden_size
			SCREAMING_SNAKE_CASE       :     str				= num_hidden_layers
			SCREAMING_SNAKE_CASE       :     Dict				= num_hidden_groups
			SCREAMING_SNAKE_CASE       :     Optional[Any]				= num_attention_heads
			SCREAMING_SNAKE_CASE       :     Optional[int]				= inner_group_num
			SCREAMING_SNAKE_CASE       :     List[str]				= hidden_act
			SCREAMING_SNAKE_CASE       :     Dict				= intermediate_size
			SCREAMING_SNAKE_CASE       :     Dict				= hidden_dropout_prob
			SCREAMING_SNAKE_CASE       :     Optional[int]				= attention_probs_dropout_prob
			SCREAMING_SNAKE_CASE       :     str				= max_position_embeddings
			SCREAMING_SNAKE_CASE       :     List[str]				= type_vocab_size
			SCREAMING_SNAKE_CASE       :     Dict				= initializer_range
			SCREAMING_SNAKE_CASE       :     Union[str, Any]				= layer_norm_eps
			SCREAMING_SNAKE_CASE       :     Tuple				= classifier_dropout_prob
			SCREAMING_SNAKE_CASE       :     Optional[int]				= position_embedding_type





class 				lowercase__(				_UpperCAmelCase   ):
	'''simple docstring'''

	@property
	def   __lowerCAmelCase (						self    :Any					)							->			Mapping[str, Mapping[int, str]]:







			'''simple docstring'''




			if self.task == "multiple-choice":
					SCREAMING_SNAKE_CASE       :     List[str]				= {0: '''batch''', 1: '''choice''', 2: '''sequence'''}
			else:
					SCREAMING_SNAKE_CASE       :     Optional[Any]				= {0: '''batch''', 1: '''sequence'''}
			return OrderedDict(
			    [
			        ('''input_ids''', dynamic_axis),
			        ('''attention_mask''', dynamic_axis),
			        ('''token_type_ids''', dynamic_axis),
			    ]					)







"""simple docstring"""






import os
import sys

lowerCamelCase__ :       List[Any]						     =			os.path.join(os.path.dirname(__file__), "src")
sys.path.append(SRC_DIR)


from transformers import (
    AutoConfig,
    AutoModel,
    AutoModelForCausalLM,
    AutoModelForMaskedLM,
    AutoModelForQuestionAnswering,
    AutoModelForSequenceClassification,
    AutoTokenizer,
    add_start_docstrings,
)


lowerCamelCase__ :       str						     =			[
    "torch",
    "numpy",
    "tokenizers",
    "filelock",
    "requests",
    "tqdm",
    "regex",
    "sentencepiece",
    "sacremoses",
    "importlib_metadata",
    "huggingface_hub",
]





@add_start_docstrings(AutoConfig.__doc__     )
def __A						(   *a_ :							Any		,		**a_ :							Union[str, Any]     )->							Dict:




		'''simple docstring'''






		return AutoConfig.from_pretrained(*a_		,		**a_     )





@add_start_docstrings(AutoTokenizer.__doc__     )
def __A						(   *a_ :							str		,		**a_ :							Union[str, Any]     )->							Union[str, Any]:




		'''simple docstring'''






		return AutoTokenizer.from_pretrained(*a_		,		**a_     )





@add_start_docstrings(AutoModel.__doc__     )
def __A						(   *a_ :							List[str]		,		**a_ :							int     )->							Dict:




		'''simple docstring'''






		return AutoModel.from_pretrained(*a_		,		**a_     )





@add_start_docstrings(AutoModelForCausalLM.__doc__     )
def __A						(   *a_ :							Any		,		**a_ :							Tuple     )->							Dict:




		'''simple docstring'''






		return AutoModelForCausalLM.from_pretrained(*a_		,		**a_     )





@add_start_docstrings(AutoModelForMaskedLM.__doc__     )
def __A						(   *a_ :							Dict		,		**a_ :							Optional[Any]     )->							Optional[int]:




		'''simple docstring'''






		return AutoModelForMaskedLM.from_pretrained(*a_		,		**a_     )





@add_start_docstrings(AutoModelForSequenceClassification.__doc__     )
def __A						(   *a_ :							Optional[int]		,		**a_ :							str     )->							Optional[int]:




		'''simple docstring'''






		return AutoModelForSequenceClassification.from_pretrained(*a_		,		**a_     )





@add_start_docstrings(AutoModelForQuestionAnswering.__doc__     )
def __A						(   *a_ :							List[str]		,		**a_ :							int     )->							List[Any]:




		'''simple docstring'''






		return AutoModelForQuestionAnswering.from_pretrained(*a_		,		**a_     )





