

from collections import OrderedDict
from typing import Mapping

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


_a:    Optional[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 						__UpperCamelCase    (					UpperCAmelCase__						):
	SCREAMING_SNAKE_CASE__    				=     'albert'




	def __init__(		self	:						Dict		,	lowerCAmelCase	:						List[str]=30_000		,	lowerCAmelCase	:						List[Any]=128		,	lowerCAmelCase	:						List[str]=4_096		,	lowerCAmelCase	:						str=12		,	lowerCAmelCase	:						str=1		,	lowerCAmelCase	:						Tuple=64		,	lowerCAmelCase	:						Dict=16_384		,	lowerCAmelCase	:						int=1		,	lowerCAmelCase	:						str="gelu_new"		,	lowerCAmelCase	:						Dict=0		,	lowerCAmelCase	:						Optional[Any]=0		,	lowerCAmelCase	:						str=512		,	lowerCAmelCase	:						Optional[int]=2		,	lowerCAmelCase	:						List[Any]=0.02		,	lowerCAmelCase	:						Union[str, Any]=1e-12		,	lowerCAmelCase	:						Tuple=0.1		,	lowerCAmelCase	:						List[Any]="absolute"		,	lowerCAmelCase	:						List[Any]=0		,	lowerCAmelCase	:						int=2		,	lowerCAmelCase	:						Optional[int]=3		,	**lowerCAmelCase	:						int		,	):


		'''simple docstring'''







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

		UpperCAmelCase_       				=			vocab_size
		UpperCAmelCase_       				=			embedding_size
		UpperCAmelCase_       				=			hidden_size
		UpperCAmelCase_       				=			num_hidden_layers
		UpperCAmelCase_       				=			num_hidden_groups
		UpperCAmelCase_       				=			num_attention_heads
		UpperCAmelCase_       				=			inner_group_num
		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_       				=			classifier_dropout_prob
		UpperCAmelCase_       				=			position_embedding_type


class 						__UpperCamelCase    (					UpperCAmelCase__						):




	@property
	def       __A					(		self	:						Optional[int]							):


		'''simple docstring'''







		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),
		        ("token_type_ids", dynamic_axis),
		    ]							)


from .imports import is_tqdm_available


if is_tqdm_available():
				from tqdm.auto import tqdm as _tqdm

from ..state import PartialState



def       __lowerCAmelCase      (						A = True       ,     *A       ,     **A    ):
	if not is_tqdm_available():
		raise ImportError("Accelerate's `tqdm` module requires `tqdm` to be installed. Please run `pip install tqdm`."    )
	UpperCAmelCase_       				=			False
	if main_process_only:
		UpperCAmelCase_       				=			PartialState().local_process_index == 0
	return _tqdm(*A       ,     **A       ,     disable=A    )