
from typing import TYPE_CHECKING

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


__SCREAMING_SNAKE_CASE      : Any       =  {
    "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:
		__SCREAMING_SNAKE_CASE      : int       =  ["Speech2TextTokenizer"]

try:
		if not is_speech_available():
				raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
		pass
else:
		__SCREAMING_SNAKE_CASE      : Optional[int]       =  ["Speech2TextFeatureExtractor"]

try:
		if not is_tf_available():
				raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
		pass
else:
		__SCREAMING_SNAKE_CASE      : int       =  [
		    "TF_SPEECH_TO_TEXT_PRETRAINED_MODEL_ARCHIVE_LIST",
		    "TFSpeech2TextForConditionalGeneration",
		    "TFSpeech2TextModel",
		    "TFSpeech2TextPreTrainedModel",
		]

try:
		if not is_torch_available():
				raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
		pass
else:
		__SCREAMING_SNAKE_CASE      : str       =  [
		    "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

		__SCREAMING_SNAKE_CASE      : Tuple       =  _LazyModule(__name__, globals()['__file__'], _import_structure, module_spec=__spec__)








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


__a   :							Dict						= logging.get_logger(__name__)

__a   :							Dict						= {
    "bigcode/gpt_bigcode-santacoder": "https://huggingface.co/bigcode/gpt_bigcode-santacoder/resolve/main/config.json",
}


class    __lowercase   (						lowercase_	):







     '''simple docstring'''
     SCREAMING_SNAKE_CASE     =					"gpt_bigcode"
     SCREAMING_SNAKE_CASE     =					["past_key_values"]
     SCREAMING_SNAKE_CASE     =					{
         "hidden_size": "n_embd",
         "max_position_embeddings": "n_positions",
         "num_attention_heads": "n_head",
         "num_hidden_layers": "n_layer",
     }




     def __init__(					self							:      List[str]			,						UpperCamelCase_							:      Dict=50_257			,						UpperCamelCase_							:      int=1_024			,						UpperCamelCase_							:      List[Any]=768			,						UpperCamelCase_							:      str=12			,						UpperCamelCase_							:      Union[str, Any]=12			,						UpperCamelCase_							:      Optional[Any]=None			,						UpperCamelCase_							:      Tuple="gelu_pytorch_tanh"			,						UpperCamelCase_							:      Optional[Any]=0.1			,						UpperCamelCase_							:      List[str]=0.1			,						UpperCamelCase_							:      Optional[int]=0.1			,						UpperCamelCase_							:      int=1e-5			,						UpperCamelCase_							:      Tuple=0.02			,						UpperCamelCase_							:      Any=True			,						UpperCamelCase_							:      List[Any]=True			,						UpperCamelCase_							:      Dict=50_256			,						UpperCamelCase_							:      Optional[Any]=50_256			,						UpperCamelCase_							:      int=True			,						UpperCamelCase_							:      List[Any]=True			,						UpperCamelCase_							:      List[Any]=True			,						**UpperCamelCase_							:      int			,						):


         """simple docstring"""



         __A       =						vocab_size
         __A       =						n_positions
         __A       =						n_embd
         __A       =						n_layer
         __A       =						n_head
         __A       =						n_inner
         __A       =						activation_function
         __A       =						resid_pdrop
         __A       =						embd_pdrop
         __A       =						attn_pdrop
         __A       =						layer_norm_epsilon
         __A       =						initializer_range
         __A       =						scale_attn_weights
         __A       =						use_cache
         __A       =						attention_softmax_in_fpaa
         __A       =						scale_attention_softmax_in_fpaa
         __A       =						multi_query

         __A       =						bos_token_id
         __A       =						eos_token_id

         super().__init__(bos_token_id=UpperCamelCase_			,						eos_token_id=UpperCamelCase_			,						**UpperCamelCase_					)




