






"""simple docstring"""



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


A__	:    Union[str, Any]			 = logging.get_logger(__name__)

A__	:    Optional[int]			 = {
    # See all MEGATRON_BERT models at https://huggingface.co/models?filter=bert
}







class        snake_case__      (							_snake_case       ):
			_UpperCAmelCase		:Any             =			"megatron-bert"


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

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











"""simple docstring"""



from typing import TYPE_CHECKING

from ...utils import (
    OptionalDependencyNotAvailable,
    _LazyModule,
    is_sentencepiece_available,
    is_speech_available,
    is_tf_available,
    is_torch_available,
)


A__	:    Optional[int]			 = {
    'configuration_speech_to_text': ['SPEECH_TO_TEXT_PRETRAINED_CONFIG_ARCHIVE_MAP', 'Speech2TextConfig'],
    'processing_speech_to_text': ['Speech2TextProcessor'],
}

try:
						if not is_sentencepiece_available():
												raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
						pass
else:
						A__	:    Dict			 = ['Speech2TextTokenizer']

try:
						if not is_speech_available():
												raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
						pass
else:
						A__	:    Optional[Any]			 = ['Speech2TextFeatureExtractor']

try:
						if not is_tf_available():
												raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
						pass
else:
						A__	:    Dict			 = [
						    'TF_SPEECH_TO_TEXT_PRETRAINED_MODEL_ARCHIVE_LIST',
						    'TFSpeech2TextForConditionalGeneration',
						    'TFSpeech2TextModel',
						    'TFSpeech2TextPreTrainedModel',
						]

try:
						if not is_torch_available():
												raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
						pass
else:
						A__	:    Optional[int]			 = [
						    'SPEECH_TO_TEXT_PRETRAINED_MODEL_ARCHIVE_LIST',
						    'Speech2TextForConditionalGeneration',
						    'Speech2TextModel',
						    'Speech2TextPreTrainedModel',
						]


if TYPE_CHECKING:
						from .configuration_speech_to_text import SPEECH_TO_TEXT_PRETRAINED_CONFIG_ARCHIVE_MAP, SpeechaTextConfig
						from .processing_speech_to_text import SpeechaTextProcessor

						try:
												if not is_sentencepiece_available():
																		raise OptionalDependencyNotAvailable()
						except OptionalDependencyNotAvailable:
												pass
						else:
												from .tokenization_speech_to_text import SpeechaTextTokenizer

						try:
												if not is_speech_available():
																		raise OptionalDependencyNotAvailable()
						except OptionalDependencyNotAvailable:
												pass
						else:
												from .feature_extraction_speech_to_text import SpeechaTextFeatureExtractor

						try:
												if not is_tf_available():
																		raise OptionalDependencyNotAvailable()
						except OptionalDependencyNotAvailable:
												pass
						else:
												from .modeling_tf_speech_to_text import (
												    TF_SPEECH_TO_TEXT_PRETRAINED_MODEL_ARCHIVE_LIST,
												    TFSpeechaTextForConditionalGeneration,
												    TFSpeechaTextModel,
												    TFSpeechaTextPreTrainedModel,
												)

						try:
												if not is_torch_available():
																		raise OptionalDependencyNotAvailable()
						except OptionalDependencyNotAvailable:
												pass
						else:
												from .modeling_speech_to_text import (
												    SPEECH_TO_TEXT_PRETRAINED_MODEL_ARCHIVE_LIST,
												    SpeechaTextForConditionalGeneration,
												    SpeechaTextModel,
												    SpeechaTextPreTrainedModel,
												)

else:
						import sys

						A__	:    List[Any]			 = _LazyModule(__name__, globals()['__file__'], _import_structure, module_spec=__spec__)



