





"""simple docstring"""





class 		lowercase					:





      def __init__(       self      ,						lowercase )		->     None:
            lowerCAmelCase  						=       set_counts
            lowerCAmelCase  						=       max(lowercase )
            lowerCAmelCase  						=       len(lowercase )
            lowerCAmelCase  						=       [1] * num_sets
            lowerCAmelCase  						=       list(range(lowercase ) )





      def     _snake_case			(       self      ,						lowercase      ,						lowercase )		->     bool:
            lowerCAmelCase  						=       self.get_parent(lowercase )
            lowerCAmelCase  						=       self.get_parent(lowercase )

            if src_parent == dst_parent:
                  return False

            if self.ranks[dst_parent] >= self.ranks[src_parent]:
                  self.set_counts[dst_parent] += self.set_counts[src_parent]
                  lowerCAmelCase  						=       0
                  lowerCAmelCase  						=       dst_parent
                  if self.ranks[dst_parent] == self.ranks[src_parent]:
                        self.ranks[dst_parent] += 1
                  lowerCAmelCase  						=       self.set_counts[dst_parent]
            else:
                  self.set_counts[src_parent] += self.set_counts[dst_parent]
                  lowerCAmelCase  						=       0
                  lowerCAmelCase  						=       src_parent
                  lowerCAmelCase  						=       self.set_counts[src_parent]

            lowerCAmelCase  						=       max(self.max_set      ,						lowercase )
            return True





      def     _snake_case			(       self      ,						lowercase )		->     int:
            if self.parents[disj_set] == disj_set:
                  return disj_set
            lowerCAmelCase  						=       self.get_parent(self.parents[disj_set] )
            return self.parents[disj_set]







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


a_    					=       logging.get_logger(__name__)

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





class 		_lowercase						(					snake_case_       ):
 lowercase				     =   'megatron-bert'

 def __init__( self	:							List[str]   ,      snake_case	:							Tuple=2_9_0_5_6   ,      snake_case	:							Dict=1_0_2_4   ,      snake_case	:							Dict=2_4   ,      snake_case	:							Union[str, Any]=1_6   ,      snake_case	:							Optional[int]=4_0_9_6   ,      snake_case	:							Optional[int]="gelu"   ,      snake_case	:							Any=0.1   ,      snake_case	:							Tuple=0.1   ,      snake_case	:							Optional[int]=5_1_2   ,      snake_case	:							List[Any]=2   ,      snake_case	:							Tuple=0.02   ,      snake_case	:							Optional[Any]=1e-12   ,      snake_case	:							str=0   ,      snake_case	:							Optional[int]="absolute"   ,      snake_case	:							Union[str, Any]=True   ,      **snake_case	:							Any   ,      )   ->						List[Any]:

  """simple docstring"""





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

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



