


'''simple docstring'''





from __future__ import annotations

from typing import Dict

from ...configuration_utils import PretrainedConfig


__UpperCAmelCase : Tuple 			=				{
    "susnato/ernie-m-base_pytorch": "https://huggingface.co/susnato/ernie-m-base_pytorch/blob/main/config.json",
    "susnato/ernie-m-large_pytorch": "https://huggingface.co/susnato/ernie-m-large_pytorch/blob/main/config.json",
}



class    UpperCAmelCase_	(							_a):
       '''simple docstring'''
       __UpperCamelCase      :     List[str]							=					"ernie_m"
       __UpperCamelCase      :     Dict[str, str]							=					{"dropout": "classifier_dropout", "num_classes": "num_labels"}






       def __init__(     self ,					__SCREAMING_SNAKE_CASE = 250_002 ,					__SCREAMING_SNAKE_CASE = 768 ,					__SCREAMING_SNAKE_CASE = 12 ,					__SCREAMING_SNAKE_CASE = 12 ,					__SCREAMING_SNAKE_CASE = 3_072 ,					__SCREAMING_SNAKE_CASE = "gelu" ,					__SCREAMING_SNAKE_CASE = 0.1 ,					__SCREAMING_SNAKE_CASE = 0.1 ,					__SCREAMING_SNAKE_CASE = 514 ,					__SCREAMING_SNAKE_CASE = 0.02 ,					__SCREAMING_SNAKE_CASE = 1 ,					__SCREAMING_SNAKE_CASE = 1e-05 ,					__SCREAMING_SNAKE_CASE=None ,					__SCREAMING_SNAKE_CASE=False ,					__SCREAMING_SNAKE_CASE=0.0 ,					**__SCREAMING_SNAKE_CASE ,					):




              """simple docstring"""




              super().__init__(pad_token_id=__SCREAMING_SNAKE_CASE ,					**__SCREAMING_SNAKE_CASE						)
              UpperCamelCase    :	List[Any]   	=		vocab_size
              UpperCamelCase    :	List[Any]   	=		hidden_size
              UpperCamelCase    :	Dict   	=		num_hidden_layers
              UpperCamelCase    :	Optional[int]   	=		num_attention_heads
              UpperCamelCase    :	Tuple   	=		intermediate_size
              UpperCamelCase    :	List[Any]   	=		hidden_act
              UpperCamelCase    :	Optional[Any]   	=		hidden_dropout_prob
              UpperCamelCase    :	List[str]   	=		attention_probs_dropout_prob
              UpperCamelCase    :	int   	=		max_position_embeddings
              UpperCamelCase    :	Optional[Any]   	=		initializer_range
              UpperCamelCase    :	Union[str, Any]   	=		layer_norm_eps
              UpperCamelCase    :	Any   	=		classifier_dropout
              UpperCamelCase    :	List[Any]   	=		is_decoder
              UpperCamelCase    :	Union[str, Any]   	=		act_dropout





from .imports import is_tqdm_available


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

from ..state import PartialState


def      a	(							SCREAMING_SNAKE_CASE_      :		bool = True							,			*SCREAMING_SNAKE_CASE_      :		List[str]							,			**SCREAMING_SNAKE_CASE_      :		Tuple       ):






       """simple docstring"""





       if not is_tqdm_available():
              raise ImportError('''Accelerate\'s `tqdm` module requires `tqdm` to be installed. Please run `pip install tqdm`.'''       )
       UpperCamelCase    :	int   	=		False
       if main_process_only:
              UpperCamelCase    :	int   	=		PartialState().local_process_index == 0
       return _tqdm(*SCREAMING_SNAKE_CASE_							,			**SCREAMING_SNAKE_CASE_							,			disable=SCREAMING_SNAKE_CASE_       )

