
"""simple docstring"""
from ...configuration_utils import PretrainedConfig
from ...utils import logging


_a   :      List[Any]       =				logging.get_logger(__name__)

_a   :      List[Any]       =				{
    """openbmb/cpm-ant-10b""": """https://huggingface.co/openbmb/cpm-ant-10b/blob/main/config.json"""
    # See all CPMAnt models at https://huggingface.co/models?filter=cpmant
}






class   _UpperCAmelCase					(       _snake_case):
    __lowercase				:			List[str]	=       """cpmant"""
    def __init__(     self    ,     snake_case_ = 3_07_20    ,     snake_case_ = 40_96    ,     snake_case_ = 32    ,     snake_case_ = 1_28    ,     snake_case_ = 1_02_40    ,     snake_case_ = 48    ,     snake_case_ = 0.0    ,     snake_case_ = 5_12    ,     snake_case_ = 20_48    ,     snake_case_ = 1E-6    ,     snake_case_ = 1.0    ,     snake_case_ = 32    ,     snake_case_ = 32    ,     snake_case_ = 32    ,     snake_case_ = True    ,     **snake_case_    ,     ):
      super().__init__(**snake_case_  )
      _snake_case  :    Optional[Any]            = prompt_types
      _snake_case  :    Optional[Any]            = prompt_length
      _snake_case  :    List[str]            = segment_types
      _snake_case  :    int            = hidden_size
      _snake_case  :    str            = num_attention_heads
      _snake_case  :    List[str]            = dim_head
      _snake_case  :    List[str]            = dim_ff
      _snake_case  :    str            = num_hidden_layers
      _snake_case  :    int            = position_bias_num_buckets
      _snake_case  :    Union[str, Any]            = position_bias_max_distance
      _snake_case  :    Union[str, Any]            = dropout_p
      _snake_case  :    str            = eps
      _snake_case  :    Dict            = use_cache
      _snake_case  :    str            = vocab_size
      _snake_case  :    Optional[int]            = init_std



import abc
import copy
import dataclasses
from dataclasses import dataclass
from typing import ClassVar, Dict, Type, TypeVar

from ..features import Features


_UpperCamelCase:					List[Any]     =TypeVar('T', bound='TaskTemplate')





@dataclass(frozen=SCREAMING_SNAKE_CASE   )
class 						__lowercase(     abc.ABC   ):


       """simple docstring"""







       UpperCamelCase_				 =							42
       UpperCamelCase_				 =							42
       UpperCamelCase_				 =							42



       def SCREAMING_SNAKE_CASE_				(     self					:			T  ,      _lowerCAmelCase					:			Features       )					->   T:
         return copy.deepcopy(self       )



       @property
       def SCREAMING_SNAKE_CASE_				(     self					:			str       )					->   Features:
         return Features(**self.input_schema  ,      **self.label_schema       )



       @property
       @abc.abstractmethod
       def SCREAMING_SNAKE_CASE_				(     self					:			Dict       )					->   Dict[str, str]:
         raise NotImplementedError






       @classmethod
       def SCREAMING_SNAKE_CASE_				(     cls					:			Type[T]  ,      _lowerCAmelCase					:			dict       )					->   T:
         _lowerCAmelCase						=		{f.name for f in dataclasses.fields(cls       )}
         return cls(**{k: v for k, v in template_dict.items() if k in field_names}       )
