


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


UpperCAmelCase_   :				Optional[Any]						      = logging.get_logger(__name__)

UpperCAmelCase_   :				Dict						      = {
    # See all MEGATRON_BERT models at https://huggingface.co/models?filter=bert
}
class 				SCREAMING_SNAKE_CASE__						(       lowercase__    ):
      snake_case__       :  int       =		'''megatron-bert'''
      def __init__( self       : Optional[Any]  ,							SCREAMING_SNAKE_CASE__       : List[Any]=2_9_0_5_6  ,							SCREAMING_SNAKE_CASE__       : Dict=1_0_2_4  ,							SCREAMING_SNAKE_CASE__       : int=2_4  ,							SCREAMING_SNAKE_CASE__       : Union[str, Any]=1_6  ,							SCREAMING_SNAKE_CASE__       : Optional[int]=4_0_9_6  ,							SCREAMING_SNAKE_CASE__       : List[Any]="gelu"  ,							SCREAMING_SNAKE_CASE__       : Tuple=0.1  ,							SCREAMING_SNAKE_CASE__       : Tuple=0.1  ,							SCREAMING_SNAKE_CASE__       : Union[str, Any]=5_1_2  ,							SCREAMING_SNAKE_CASE__       : Optional[Any]=2  ,							SCREAMING_SNAKE_CASE__       : Optional[Any]=0.02  ,							SCREAMING_SNAKE_CASE__       : Dict=1E-12  ,							SCREAMING_SNAKE_CASE__       : Union[str, Any]=0  ,							SCREAMING_SNAKE_CASE__       : Optional[Any]="absolute"  ,							SCREAMING_SNAKE_CASE__       : Dict=True  ,							**SCREAMING_SNAKE_CASE__       : Tuple  ,							)	->    List[str]:
             super().__init__(pad_token_id=SCREAMING_SNAKE_CASE__  ,							**SCREAMING_SNAKE_CASE__  )

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






from .dependency_versions_table import deps
from .utils.versions import require_version, require_version_core


# define which module versions we always want to check at run time
# (usually the ones defined in `install_requires` in setup.py)
#
# order specific notes:
# - tqdm must be checked before tokenizers

UpperCAmelCase_   :				Dict						      = [
    'python',
    'tqdm',
    'regex',
    'requests',
    'packaging',
    'filelock',
    'numpy',
    'tokenizers',
    'huggingface-hub',
    'safetensors',
    'accelerate',
    'pyyaml',
]

for pkg in pkgs_to_check_at_runtime:
   if pkg in deps:
      if pkg == "tokenizers":
         # must be loaded here, or else tqdm check may fail
         from .utils import is_tokenizers_available

         if not is_tokenizers_available():
            continue  # not required, check version only if installed
      elif pkg == "accelerate":
         # must be loaded here, or else tqdm check may fail
         from .utils import is_accelerate_available

         # Maybe switch to is_torch_available in the future here so that Accelerate is hard dep of
         # Transformers with PyTorch
         if not is_accelerate_available():
            continue  # not required, check version only if installed

      require_version_core(deps[pkg])
   else:
      raise ValueError(F'can\'t find {pkg} in {deps.keys()}, check dependency_versions_table.py')







def  SCREAMING_SNAKE_CASE_		(    __A				:    Optional[Any]						,					__A				:    int=None       )			->	int:

       """simple docstring"""

       require_version(deps[pkg]						,					__A       )


