
import copy
from dataclasses import dataclass, field
from typing import ClassVar, Dict

from ..features import Audio, Features, Value
from .base import TaskTemplate





@dataclass(frozen=UpperCAmelCase							)
class    __A(					UpperCAmelCase							):
					SCREAMING_SNAKE_CASE           =     field(default='''automatic-speech-recognition'''  ,		metadata={'''include_in_asdict_even_if_is_default''': True}							)
					SCREAMING_SNAKE_CASE           =     Features({'''audio''': Audio()}							)
					SCREAMING_SNAKE_CASE           =     Features({'''transcription''': Value('''string'''							)}							)
					SCREAMING_SNAKE_CASE           =     "audio"
					SCREAMING_SNAKE_CASE           =     "transcription"

					def  lowercase__   (						self       :  Optional[Any] ,       __UpperCamelCase       :  Optional[int] ):
												if self.audio_column not in features:
																			raise ValueError(F'''Column {self.audio_column} is not present in features.''' )
												if not isinstance(features[self.audio_column] ,       __UpperCamelCase ):
																			raise ValueError(F'''Column {self.audio_column} is not an Audio type.''' )
												lowerCamelCase_					=       copy.deepcopy(self )
												lowerCamelCase_					=       self.input_schema.copy()
												lowerCamelCase_					=       features[self.audio_column]
												lowerCamelCase_					=       input_schema
												return task_template



					@property
					def  lowercase__   (						self       :  str ):
												return {self.audio_column: "audio", self.transcription_column: "transcription"}







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


lowercase   =	logging.get_logger(__name__)

lowercase   =	{
    '''abeja/gpt-neox-japanese-2.7b''': '''https://huggingface.co/abeja/gpt-neox-japanese-2.7b/resolve/main/config.json''',
}





class    __A(					UpperCAmelCase							):
					SCREAMING_SNAKE_CASE           =     '''gpt_neox_japanese'''

					def __init__(						self       :  Union[str, Any] ,       __UpperCamelCase       :  str=3_2_0_0_0 ,       __UpperCamelCase       :  List[Any]=2_5_6_0 ,       __UpperCamelCase       :  Any=3_2 ,       __UpperCamelCase       :  List[str]=3_2 ,       __UpperCamelCase       :  List[str]=4 ,       __UpperCamelCase       :  Dict="gelu" ,       __UpperCamelCase       :  List[Any]=1.00 ,       __UpperCamelCase       :  Any=1_0_0_0_0 ,       __UpperCamelCase       :  Optional[Any]=2_0_4_8 ,       __UpperCamelCase       :  Tuple=0.02 ,       __UpperCamelCase       :  List[str]=1E-5 ,       __UpperCamelCase       :  str=True ,       __UpperCamelCase       :  str=3_1_9_9_6 ,       __UpperCamelCase       :  int=3_1_9_9_9 ,       __UpperCamelCase       :  Optional[Any]=0.1 ,       __UpperCamelCase       :  Tuple=0.0 ,       **__UpperCamelCase       :  List[str] ,       ):
												super().__init__(bos_token_id=__UpperCamelCase ,       eos_token_id=__UpperCamelCase ,       **__UpperCamelCase )
												lowerCamelCase_					=       vocab_size
												lowerCamelCase_					=       max_position_embeddings
												lowerCamelCase_					=       hidden_size
												lowerCamelCase_					=       num_hidden_layers
												lowerCamelCase_					=       num_attention_heads
												lowerCamelCase_					=       intermediate_multiple_size
												lowerCamelCase_					=       hidden_act
												lowerCamelCase_					=       rotary_pct
												lowerCamelCase_					=       rotary_emb_base
												lowerCamelCase_					=       initializer_range
												lowerCamelCase_					=       layer_norm_eps
												lowerCamelCase_					=       use_cache
												lowerCamelCase_					=       attention_dropout
												lowerCamelCase_					=       hidden_dropout





