"""simple docstring"""







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


_a					:					Dict=			logging.get_logger(__name__)

_a					:					Tuple=			{
    # See all MEGATRON_BERT models at https://huggingface.co/models?filter=bert
}

class 		UpperCamelCase      (   lowercase						):
				UpperCAmelCase    :				str   =		"""megatron-bert"""



				def __init__(self    :				Any     ,  _A    :				Union[str, Any]=2_90_56     ,  _A    :				Dict=10_24     ,  _A    :				Dict=24     ,  _A    :				Optional[Any]=16     ,  _A    :				Optional[Any]=40_96     ,  _A    :				Union[str, Any]="gelu"     ,  _A    :				List[Any]=0.1     ,  _A    :				Optional[Any]=0.1     ,  _A    :				Tuple=5_12     ,  _A    :				Any=2     ,  _A    :				Optional[int]=0.02     ,  _A    :				List[Any]=1E-12     ,  _A    :				Union[str, Any]=0     ,  _A    :				List[str]="absolute"     ,  _A    :				int=True     ,  **_A    :				Any     ,  )   ->     List[str]:
					super().__init__(pad_token_id=_A     ,  **_A)

					__snake_case      :							List[Any]						=			vocab_size
					__snake_case      :							List[str]						=			hidden_size
					__snake_case      :							List[str]						=			num_hidden_layers
					__snake_case      :							List[Any]						=			num_attention_heads
					__snake_case      :							List[Any]						=			hidden_act
					__snake_case      :							Union[str, Any]						=			intermediate_size
					__snake_case      :							Optional[Any]						=			hidden_dropout_prob
					__snake_case      :							List[str]						=			attention_probs_dropout_prob
					__snake_case      :							Dict						=			max_position_embeddings
					__snake_case      :							str						=			type_vocab_size
					__snake_case      :							Optional[Any]						=			initializer_range
					__snake_case      :							Dict						=			layer_norm_eps
					__snake_case      :							Optional[Any]						=			position_embedding_type
					__snake_case      :							Dict						=			use_cache






"""simple docstring"""







def   __UpperCAmelCase    (   UpperCAmelCase_   :    int      ,							UpperCAmelCase_   :    int  )							->      int:

	'''simple docstring'''





	while a != 0:
		__snake_case		,    __snake_case      :							Union[str, Any]						=			b % a, a
	return b

def   __UpperCAmelCase    (   UpperCAmelCase_   :    int      ,							UpperCAmelCase_   :    int  )							->      int:

	'''simple docstring'''





	if gcd(UpperCAmelCase_      ,							UpperCAmelCase_  ) != 1:
		__snake_case      :							Union[str, Any]						=			F"mod inverse of {a!r} and {m!r} does not exist"
		raise ValueError(UpperCAmelCase_  )
	__snake_case		,    __snake_case		,    __snake_case      :							List[str]						=			1, 0, a
	__snake_case		,    __snake_case		,    __snake_case      :							Dict						=			0, 1, m
	while va != 0:
		__snake_case      :							List[str]						=			ua // va
		__snake_case		,    __snake_case		,    __snake_case		,    __snake_case		,    __snake_case		,    __snake_case      :							List[str]						=			(ua - q * va), (ua - q * va), (ua - q * va), va, va, va
	return ua % m





