



"""simple docstring"""


from ... import PretrainedConfig


__A   :							str										=   {
    "sijunhe/nezha-cn-base": "https://huggingface.co/sijunhe/nezha-cn-base/resolve/main/config.json",
}
class 			_a (					lowerCAmelCase):
			"""simple docstring"""
			UpperCamelCase__			      =	NEZHA_PRETRAINED_CONFIG_ARCHIVE_MAP
			UpperCamelCase__			      =	"""nezha"""



			def __init__(		self     :    str				,   __UpperCamelCase     :    Tuple=2_1_1_2_8				,   __UpperCamelCase     :    str=7_6_8				,   __UpperCamelCase     :    int=1_2				,   __UpperCamelCase     :    List[str]=1_2				,   __UpperCamelCase     :    List[Any]=3_0_7_2				,   __UpperCamelCase     :    Optional[Any]="gelu"				,   __UpperCamelCase     :    Dict=0.1				,   __UpperCamelCase     :    int=0.1				,   __UpperCamelCase     :    int=5_1_2				,   __UpperCamelCase     :    Tuple=6_4				,   __UpperCamelCase     :    Tuple=2				,   __UpperCamelCase     :    Optional[int]=0.0_2				,   __UpperCamelCase     :    Union[str, Any]=1e-12				,   __UpperCamelCase     :    List[Any]=0.1				,   __UpperCamelCase     :    List[str]=0				,   __UpperCamelCase     :    Tuple=2				,   __UpperCamelCase     :    Tuple=3				,   __UpperCamelCase     :    Dict=True				,   **__UpperCamelCase     :    List[str]				,   )->int:
							super().__init__(pad_token_id=__UpperCamelCase				,   bos_token_id=__UpperCamelCase				,   eos_token_id=__UpperCamelCase				,   **__UpperCamelCase   )

							_UpperCAmelCase					=    vocab_size
							_UpperCAmelCase					=    hidden_size
							_UpperCAmelCase					=    num_hidden_layers
							_UpperCAmelCase					=    num_attention_heads
							_UpperCAmelCase					=    hidden_act
							_UpperCAmelCase					=    intermediate_size
							_UpperCAmelCase					=    hidden_dropout_prob
							_UpperCAmelCase					=    attention_probs_dropout_prob
							_UpperCAmelCase					=    max_position_embeddings
							_UpperCAmelCase					=    max_relative_position
							_UpperCAmelCase					=    type_vocab_size
							_UpperCAmelCase					=    initializer_range
							_UpperCAmelCase					=    layer_norm_eps
							_UpperCAmelCase					=    classifier_dropout
							_UpperCAmelCase					=    use_cache








"""simple docstring"""


from typing import Optional

from .. import Features, NamedSplit
from ..packaged_modules.text.text import Text
from ..utils.typing import NestedDataStructureLike, PathLike
from .abc import AbstractDatasetReader
class 			_a (					lowerCAmelCase):
			"""simple docstring"""



			def __init__(		self     :    List[str]				,   __UpperCamelCase     :    NestedDataStructureLike[PathLike]				,   __UpperCamelCase     :    Optional[NamedSplit] = None				,   __UpperCamelCase     :    Optional[Features] = None				,   __UpperCamelCase     :    str = None				,   __UpperCamelCase     :    bool = False				,   __UpperCamelCase     :    bool = False				,   __UpperCamelCase     :    Optional[int] = None				,   **__UpperCamelCase     :    Optional[Any]				,   )->Any:
							super().__init__(
							    __UpperCamelCase				,   split=__UpperCamelCase				,   features=__UpperCamelCase				,   cache_dir=__UpperCamelCase				,   keep_in_memory=__UpperCamelCase				,   streaming=__UpperCamelCase				,   num_proc=__UpperCamelCase				,   **__UpperCamelCase				,   )
							_UpperCAmelCase					=    path_or_paths if isinstance(__UpperCamelCase				,   __UpperCamelCase   ) else {self.split: path_or_paths}
							_UpperCAmelCase					=    Text(
							    cache_dir=__UpperCamelCase				,   data_files=__UpperCamelCase				,   features=__UpperCamelCase				,   **__UpperCamelCase				,   )



			def  lowercase__						(		self     :    Optional[Any]   )->str:
							# Build iterable dataset
							if self.streaming:
											_UpperCAmelCase					=    self.builder.as_streaming_dataset(split=self.split   )
							# Build regular (map-style) dataset
							else:
											_UpperCAmelCase					=    None
											_UpperCAmelCase					=    None
											_UpperCAmelCase					=    None
											_UpperCAmelCase					=    None

											self.builder.download_and_prepare(
											    download_config=__UpperCamelCase				,   download_mode=__UpperCamelCase				,   verification_mode=__UpperCamelCase				,   base_path=__UpperCamelCase				,   num_proc=self.num_proc				,   )
											_UpperCAmelCase					=    self.builder.as_dataset(
											    split=self.split				,   verification_mode=__UpperCamelCase				,   in_memory=self.keep_in_memory   )
							return dataset



