
"""simple docstring"""


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 				lowerCAmelCase_				(      _lowercase    ):



						'''simple docstring'''


						_lowerCamelCase:    Any      =    '''megatron-bert'''


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

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

"""simple docstring"""


from typing import TYPE_CHECKING

from ...utils import (
    OptionalDependencyNotAvailable,
    _LazyModule,
    is_tokenizers_available,
    is_torch_available,
    is_vision_available,
)


_lowercase							   =				{
    '''configuration_perceiver''': ['''PERCEIVER_PRETRAINED_CONFIG_ARCHIVE_MAP''', '''PerceiverConfig''', '''PerceiverOnnxConfig'''],
    '''tokenization_perceiver''': ['''PerceiverTokenizer'''],
}

try:
		if not is_vision_available():
				raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
		pass
else:
		_lowercase							   =				['''PerceiverFeatureExtractor''']
		_lowercase							   =				['''PerceiverImageProcessor''']

try:
		if not is_torch_available():
				raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
		pass
else:
		_lowercase							   =				[
		    '''PERCEIVER_PRETRAINED_MODEL_ARCHIVE_LIST''',
		    '''PerceiverForImageClassificationConvProcessing''',
		    '''PerceiverForImageClassificationFourier''',
		    '''PerceiverForImageClassificationLearned''',
		    '''PerceiverForMaskedLM''',
		    '''PerceiverForMultimodalAutoencoding''',
		    '''PerceiverForOpticalFlow''',
		    '''PerceiverForSequenceClassification''',
		    '''PerceiverLayer''',
		    '''PerceiverModel''',
		    '''PerceiverPreTrainedModel''',
		]


if TYPE_CHECKING:
		from .configuration_perceiver import PERCEIVER_PRETRAINED_CONFIG_ARCHIVE_MAP, PerceiverConfig, PerceiverOnnxConfig
		from .tokenization_perceiver import PerceiverTokenizer

		try:
				if not is_vision_available():
						raise OptionalDependencyNotAvailable()
		except OptionalDependencyNotAvailable:
				pass
		else:
				from .feature_extraction_perceiver import PerceiverFeatureExtractor
				from .image_processing_perceiver import PerceiverImageProcessor

		try:
				if not is_torch_available():
						raise OptionalDependencyNotAvailable()
		except OptionalDependencyNotAvailable:
				pass
		else:
				from .modeling_perceiver import (
				    PERCEIVER_PRETRAINED_MODEL_ARCHIVE_LIST,
				    PerceiverForImageClassificationConvProcessing,
				    PerceiverForImageClassificationFourier,
				    PerceiverForImageClassificationLearned,
				    PerceiverForMaskedLM,
				    PerceiverForMultimodalAutoencoding,
				    PerceiverForOpticalFlow,
				    PerceiverForSequenceClassification,
				    PerceiverLayer,
				    PerceiverModel,
				    PerceiverPreTrainedModel,
				)

else:
		import sys

		_lowercase							   =				_LazyModule(__name__, globals()['''__file__'''], _import_structure, module_spec=__spec__)