



'''simple docstring'''






import dataclasses
import re
from dataclasses import dataclass
from functools import total_ordering
from typing import Optional, Union


UpperCamelCase__:     List[str]										=    re.compile(r'^(?P<major>\d+)' r'\.(?P<minor>\d+)' r'\.(?P<patch>\d+)$')

@total_ordering
@dataclass
class        SCREAMING_SNAKE_CASE:







	"""simple docstring"""






	lowerCamelCase__    				= 42
	lowerCamelCase__    				= None
	lowerCamelCase__    				= None
	lowerCamelCase__    				= None
	lowerCamelCase__    				= None







	def   A			(		self    :  Optional[Any]	)    ->	Dict:
								UpperCAmelCase				: Any											=	_str_to_version_tuple(self.version_str	)







	def __repr__(		self    :  str	)    ->	Optional[Any]:
								return F"""{self.tuple[0]}.{self.tuple[1]}.{self.tuple[2]}"""







	@property
	def   A			(		self    :  Tuple	)    ->	Dict:
								return self.major, self.minor, self.patch







	def   A			(		self    :  str	,    __snake_case    :  Any	)    ->	Tuple:
								if isinstance(__snake_case	,    __snake_case	):
															return Version(__snake_case	)
								elif isinstance(__snake_case	,    __snake_case	):
															return other
								raise TypeError(F"""{other} (type {type(__snake_case	)}) cannot be compared to version."""	)







	def __eq__(		self    :  str	,    __snake_case    :  Union[str, Any]	)    ->	List[Any]:
								try:
															UpperCAmelCase				: Dict											=	self._validate_operand(__snake_case	)
								except (TypeError, ValueError):
															return False
								else:
															return self.tuple == other.tuple







	def __lt__(		self    :  Any	,    __snake_case    :  int	)    ->	Optional[int]:
								UpperCAmelCase				: int											=	self._validate_operand(__snake_case	)
								return self.tuple < other.tuple







	def __hash__(		self    :  List[str]	)    ->	str:
								return hash(_version_tuple_to_str(self.tuple	)	)







	@classmethod
	def   A			(		cls    :  Any	,    __snake_case    :  Tuple	)    ->	Union[str, Any]:
								UpperCAmelCase				: Optional[Any]											=	{f.name for f in dataclasses.fields(cls	)}
								return cls(**{k: v for k, v in dic.items() if k in field_names}	)







	def   A			(		self    :  Dict	)    ->	str:
								return self.version_str


def 				snake_case_  (      _lowerCAmelCase						:		Optional[Any]						)   ->     List[Any]:
							UpperCAmelCase				: Optional[Any]											=	_VERSION_REG.match(_lowerCAmelCase						)
							if not res:
														raise ValueError(f"""Invalid version '{version_str}'. Format should be x.y.z with {{x,y,z}} being digits."""						)
							return tuple(int(_lowerCAmelCase						) for v in [res.group('''major'''						), res.group('''minor'''						), res.group('''patch'''						)]						)




def 				snake_case_  (      _lowerCAmelCase						:		List[str]						)   ->     List[Any]:
							return ".".join(str(_lowerCAmelCase						) for v in version_tuple						)










'''simple docstring'''






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


UpperCamelCase__:     Dict										=    logging.get_logger(__name__)

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

class        SCREAMING_SNAKE_CASE(							A__    ):







	"""simple docstring"""






	lowerCamelCase__    				= """megatron-bert"""







	def __init__(		self    :  int	,    __snake_case    :  List[Any]=29056	,    __snake_case    :  Dict=1024	,    __snake_case    :  Tuple=24	,    __snake_case    :  Any=16	,    __snake_case    :  Tuple=4096	,    __snake_case    :  int="gelu"	,    __snake_case    :  Dict=0.1	,    __snake_case    :  str=0.1	,    __snake_case    :  Optional[Any]=512	,    __snake_case    :  Tuple=2	,    __snake_case    :  Tuple=0.02	,    __snake_case    :  int=1E-12	,    __snake_case    :  Union[str, Any]=0	,    __snake_case    :  int="absolute"	,    __snake_case    :  str=True	,    **__snake_case    :  Tuple	,    )    ->	Union[str, Any]:
								super().__init__(pad_token_id=__snake_case	,    **__snake_case	)

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





