





"""simple docstring"""


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


__magic_name__       :					Union[str, Any]						=			logging.get_logger(__name__)

__magic_name__       :					List[Any]						=			{
    # See all MEGATRON_BERT models at https://huggingface.co/models?filter=bert
}






class 							lowercase__			(   __SCREAMING_SNAKE_CASE	):

			"""simple docstring"""
			__lowerCAmelCase     :				Any										=  """megatron-bert"""







			def __init__(      self						,   _A=2_9_0_5_6						,   _A=1_0_2_4						,   _A=2_4						,   _A=1_6						,   _A=4_0_9_6						,   _A="gelu"						,   _A=0.1						,   _A=0.1						,   _A=5_1_2						,   _A=2						,   _A=0.02						,   _A=1e-1_2						,   _A=0						,   _A="absolute"						,   _A=True						,   **_A						,   ):






									'''simple docstring'''







									super().__init__(pad_token_id=_A						,   **_A    )

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










"""simple docstring"""


import math

def      UpperCamelCase							(SCREAMING_SNAKE_CASE							,     SCREAMING_SNAKE_CASE     ):
						return math.pow(SCREAMING_SNAKE_CASE							,     2     ) - a

def      UpperCamelCase							(SCREAMING_SNAKE_CASE     ):
						return 2 * x

def      UpperCamelCase							(SCREAMING_SNAKE_CASE     ):
						UpperCamelCase				:		Union[str, Any]				   =			2.0

						while start <= a:
												UpperCamelCase				:		Optional[Any]				   =			math.pow(SCREAMING_SNAKE_CASE							,     2     )

						return start

def      UpperCamelCase							(SCREAMING_SNAKE_CASE							,     SCREAMING_SNAKE_CASE = 9999							,     SCREAMING_SNAKE_CASE = 0.00_00_00_00_00_00_01     ):

						if a < 0:
												raise ValueError("""math domain error"""     )

						UpperCamelCase				:		Optional[Any]				   =			get_initial_point(SCREAMING_SNAKE_CASE     )

						for _ in range(SCREAMING_SNAKE_CASE     ):
												UpperCamelCase				:		List[str]				   =			value
												UpperCamelCase				:		Tuple				   =			value - fx(SCREAMING_SNAKE_CASE							,     SCREAMING_SNAKE_CASE     ) / fx_derivative(SCREAMING_SNAKE_CASE     )
												if abs(prev_value - value     ) < tolerance:
																		return value

						return value


if __name__ == "__main__":
		from doctest import testmod

		testmod()



