
'''simple docstring'''

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


__snake_case:  str								=			logging.get_logger(__name__)

__snake_case:  Optional[int]								=			{
    "tanreinama/GPTSAN-2.8B-spout_is_uniform": (
        "https://huggingface.co/tanreinama/GPTSAN-2.8B-spout_is_uniform/resolve/main/config.json"
    ),
}


class  _UpperCAmelCase ( lowerCAmelCase__    ):

     """simple docstring"""

     a_    	=					"gptsan-japanese"
     a_    	=					[
         "past_key_values",
     ]
     a_    	=					{
         "hidden_size": "d_model",
         "num_attention_heads": "num_heads",
         "num_hidden_layers": "num_layers",
     }


     def __init__(      self							,		lowerCAmelCase_=3_60_00							,		lowerCAmelCase_=12_80							,		lowerCAmelCase_=10_24							,		lowerCAmelCase_=81_92							,		lowerCAmelCase_=40_96							,		lowerCAmelCase_=1_28							,		lowerCAmelCase_=10							,		lowerCAmelCase_=0							,		lowerCAmelCase_=16							,		lowerCAmelCase_=16							,		lowerCAmelCase_=1_28							,		lowerCAmelCase_=0.0							,		lowerCAmelCase_=1E-5							,		lowerCAmelCase_=False							,		lowerCAmelCase_=0.0							,		lowerCAmelCase_="float32"							,		lowerCAmelCase_=False							,		lowerCAmelCase_=False							,		lowerCAmelCase_=False							,		lowerCAmelCase_=0.002							,		lowerCAmelCase_=False							,		lowerCAmelCase_=True							,		lowerCAmelCase_=3_59_98							,		lowerCAmelCase_=3_59_95							,		lowerCAmelCase_=3_59_99							,		**lowerCAmelCase_							,		):

       '''simple docstring'''

       a_      :	str      =							vocab_size
       a_      :	Optional[Any]      =							max_position_embeddings
       a_      :	Optional[Any]      =							d_model
       a_      :	Dict      =							d_ff
       a_      :	List[Any]      =							d_ext
       a_      :	List[Any]      =							d_spout
       a_      :	Optional[int]      =							num_switch_layers
       a_      :	List[Any]      =							num_ext_layers
       a_      :	List[Any]      =							num_switch_layers + num_ext_layers
       a_      :	Any      =							num_heads
       a_      :	int      =							num_experts
       a_      :	List[str]      =							expert_capacity
       a_      :	List[Any]      =							dropout_rate
       a_      :	List[str]      =							layer_norm_epsilon
       a_      :	List[str]      =							router_bias
       a_      :	Union[str, Any]      =							router_jitter_noise
       a_      :	str      =							router_dtype
       a_      :	Optional[Any]      =							router_ignore_padding_tokens
       a_      :	Union[str, Any]      =							output_hidden_states
       a_      :	int      =							output_attentions
       a_      :	Any      =							initializer_factor
       a_      :	Union[str, Any]      =							output_router_logits
       a_      :	Dict      =							use_cache

       super().__init__(
           separator_token_id=lowerCAmelCase_							,		pad_token_id=lowerCAmelCase_							,		eos_token_id=lowerCAmelCase_							,		**lowerCAmelCase_							,		)




'''simple docstring'''

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

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


@dataclass(frozen=lowerCAmelCase__    )
class  _UpperCAmelCase ( lowerCAmelCase__    ):

     """simple docstring"""

     a_    	=					field(default="automatic-speech-recognition"	,metadata={"include_in_asdict_even_if_is_default": True}    )
     a_    	=					Features({"audio": Audio()}    )
     a_    	=					Features({"transcription": Value("string"    )}    )
     a_    	=					"audio"
     a_    	=					"transcription"


     def 							_lowerCAmelCase  (      self							,		lowerCAmelCase_ ):

       '''simple docstring'''

       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]							,		lowerCAmelCase_ ):
         raise ValueError(f'''Column {self.audio_column} is not an Audio type.''' )
       a_      :	int      =							copy.deepcopy(self )
       a_      :	Optional[int]      =							self.input_schema.copy()
       a_      :	Any      =							features[self.audio_column]
       a_      :	Any      =							input_schema
       return task_template






     @property
     def 							_lowerCAmelCase  (      self ):

       '''simple docstring'''

       return {self.audio_column: "audio", self.transcription_column: "transcription"}


