

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


UpperCamelCase__	:   Optional[int]								=     logging.get_logger(__name__)

UpperCamelCase__	:   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    __snake_case	(     lowerCAmelCase__							):
  __lowerCAmelCase  :						Any    			=	'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    ,		):
      super().__init__(**_A)
      SCREAMING_SNAKE_CASE_						=    prompt_types
      SCREAMING_SNAKE_CASE_						=    prompt_length
      SCREAMING_SNAKE_CASE_						=    segment_types
      SCREAMING_SNAKE_CASE_						=    hidden_size
      SCREAMING_SNAKE_CASE_						=    num_attention_heads
      SCREAMING_SNAKE_CASE_						=    dim_head
      SCREAMING_SNAKE_CASE_						=    dim_ff
      SCREAMING_SNAKE_CASE_						=    num_hidden_layers
      SCREAMING_SNAKE_CASE_						=    position_bias_num_buckets
      SCREAMING_SNAKE_CASE_						=    position_bias_max_distance
      SCREAMING_SNAKE_CASE_						=    dropout_p
      SCREAMING_SNAKE_CASE_						=    eps
      SCREAMING_SNAKE_CASE_						=    use_cache
      SCREAMING_SNAKE_CASE_						=    vocab_size
      SCREAMING_SNAKE_CASE_						=    init_std





def        _UpperCAmelCase							(	_SCREAMING_SNAKE_CASE       :		list							):





    """simple docstring"""


    if not isinstance(_SCREAMING_SNAKE_CASE			, _SCREAMING_SNAKE_CASE							):
        raise ValueError('Input series is not valid, valid series - [2, 4, 8]'							)
    if len(_SCREAMING_SNAKE_CASE							) == 0:
        raise ValueError('Input list must be a non empty list'							)
    if len(_SCREAMING_SNAKE_CASE							) == 1:
        return True
    try:
        SCREAMING_SNAKE_CASE_						=    series[1] / series[0]
        for index in range(len(_SCREAMING_SNAKE_CASE							) - 1							):
            if series[index + 1] / series[index] != common_ratio:
                return False
    except ZeroDivisionError:
        return False
    return True


def        _UpperCAmelCase							(	_SCREAMING_SNAKE_CASE       :		list							):





    """simple docstring"""


    if not isinstance(_SCREAMING_SNAKE_CASE			, _SCREAMING_SNAKE_CASE							):
        raise ValueError('Input series is not valid, valid series - [2, 4, 8]'							)
    if len(_SCREAMING_SNAKE_CASE							) == 0:
        raise ValueError('Input list must be a non empty list'							)
    SCREAMING_SNAKE_CASE_						=    1
    for value in series:
        answer *= value
    return pow(_SCREAMING_SNAKE_CASE			, 1 / len(_SCREAMING_SNAKE_CASE							)							)


if __name__ == "__main__":
       import doctest

       doctest.testmod()


