

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


_UpperCamelCase     =    logging.get_logger(__name__)

_UpperCamelCase     =    {
    '''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 					lowercase		( _UpperCamelCase      ):



 '''simple docstring'''


 __SCREAMING_SNAKE_CASE      							=       """cpmant"""




 def __init__(self , __a = 30720 , __a = 4096 , __a = 32 , __a = 128 , __a = 10240 , __a = 48 , __a = 0.0 , __a = 512 , __a = 2048 , __a = 1E-6 , __a = 1.0 , __a = 32 , __a = 32 , __a = 32 , __a = True , **__a , )				->      Optional[Any]:






  """simple docstring"""





  super().__init__(**__a				)
  UpperCAmelCase__           =       prompt_types
  UpperCAmelCase__           =       prompt_length
  UpperCAmelCase__           =       segment_types
  UpperCAmelCase__           =       hidden_size
  UpperCAmelCase__           =       num_attention_heads
  UpperCAmelCase__           =       dim_head
  UpperCAmelCase__           =       dim_ff
  UpperCAmelCase__           =       num_hidden_layers
  UpperCAmelCase__           =       position_bias_num_buckets
  UpperCAmelCase__           =       position_bias_max_distance
  UpperCAmelCase__           =       dropout_p
  UpperCAmelCase__           =       eps
  UpperCAmelCase__           =       use_cache
  UpperCAmelCase__           =       vocab_size
  UpperCAmelCase__           =       init_std






def 		UpperCamelCase_(    snake_case__:						int     ) ->				int:
 if not isinstance(snake_case__						,					snake_case__     ):
  UpperCAmelCase__           =       f"Input value of [number={number}] must be an integer"
  raise TypeError(snake_case__     )
 if number < 1:
  raise ValueError('Input must be a positive integer'     )
 return number * (2 * number - 1)


if __name__ == "__main__":
 import doctest

 doctest.testmod()



