






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


lowercase  							=					logging.get_logger(__name__)

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




class  UpperCamelCase_      (			snake_case_				):



	'''simple docstring'''




	lowerCAmelCase													= '''megatron-bert'''




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

								snake_case_				=							vocab_size
								snake_case_				=							hidden_size
								snake_case_				=							num_hidden_layers
								snake_case_				=							num_attention_heads
								snake_case_				=							hidden_act
								snake_case_				=							intermediate_size
								snake_case_				=							hidden_dropout_prob
								snake_case_				=							attention_probs_dropout_prob
								snake_case_				=							max_position_embeddings
								snake_case_				=							type_vocab_size
								snake_case_				=							initializer_range
								snake_case_				=							layer_norm_eps
								snake_case_				=							position_embedding_type
								snake_case_				=							use_cache













from __future__ import annotations





def 						__UpperCAmelCase			(     a_							,     a_							,     a_							,     a_):  # noqa: E741
							while r - l > 1:
														snake_case_				=							(l + r) // 2
														if v[m] >= key:
																					snake_case_				=							m
														else:
																					snake_case_				=							m  # noqa: E741
							return r





def 						__UpperCAmelCase			(     a_):
							if len(a_) == 0:
														return 0

							snake_case_				=							[0] * len(a_)
							snake_case_				=							1

							snake_case_				=							v[0]

							for i in range(1							,     len(a_)):
														if v[i] < tail[0]:
																					snake_case_				=							v[i]
														elif v[i] > tail[length - 1]:
																					snake_case_				=							v[i]
																					length += 1
														else:
																					snake_case_				=							v[i]

							return length


if __name__ == "__main__":
	import doctest

	doctest.testmod()





