

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


lowercase     :       List[str]        =       logging.get_logger(__name__)

lowercase     :       Optional[int]        =       {
    "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 		SCREAMING_SNAKE_CASE__					(		lowerCamelCase__   ):







						"""simple docstring"""




						lowercase  :				List[str]											=							'cpmant'

						def __init__(				self , __UpperCamelCase = 3_07_20 , __UpperCamelCase = 40_96 , __UpperCamelCase = 32 , __UpperCamelCase = 1_28 , __UpperCamelCase = 1_02_40 , __UpperCamelCase = 48 , __UpperCamelCase = 0.0 , __UpperCamelCase = 5_12 , __UpperCamelCase = 20_48 , __UpperCamelCase = 1E-6 , __UpperCamelCase = 1.0 , __UpperCamelCase = 32 , __UpperCamelCase = 32 , __UpperCamelCase = 32 , __UpperCamelCase = True , **__UpperCamelCase , )							->	List[Any]:




									'''simple docstring'''


									super().__init__(**__UpperCamelCase    )
									__UpperCamelCase    :    Dict								=      prompt_types
									__UpperCamelCase    :    Optional[Any]								=      prompt_length
									__UpperCamelCase    :    int								=      segment_types
									__UpperCamelCase    :    Optional[Any]								=      hidden_size
									__UpperCamelCase    :    int								=      num_attention_heads
									__UpperCamelCase    :    int								=      dim_head
									__UpperCamelCase    :    List[Any]								=      dim_ff
									__UpperCamelCase    :    Dict								=      num_hidden_layers
									__UpperCamelCase    :    Tuple								=      position_bias_num_buckets
									__UpperCamelCase    :    List[str]								=      position_bias_max_distance
									__UpperCamelCase    :    Optional[int]								=      dropout_p
									__UpperCamelCase    :    List[Any]								=      eps
									__UpperCamelCase    :    Dict								=      use_cache
									__UpperCamelCase    :    str								=      vocab_size
									__UpperCamelCase    :    str								=      init_std






lowercase     :       dict[str, float]        =       {
    "kilogram": 1,
    "gram": pow(10, 3),
    "milligram": pow(10, 6),
    "metric-ton": pow(10, -3),
    "long-ton": 0.0009842073,
    "short-ton": 0.0011023122,
    "pound": 2.2046244202,
    "stone": 0.1574731728,
    "ounce": 35.273990723,
    "carrat": 5000,
    "atomic-mass-unit": 6.0_22_13_66_52E26,
}

lowercase     :       dict[str, float]        =       {
    "kilogram": 1,
    "gram": pow(10, -3),
    "milligram": pow(10, -6),
    "metric-ton": pow(10, 3),
    "long-ton": 1016.04608,
    "short-ton": 907.184,
    "pound": 0.453592,
    "stone": 6.35029,
    "ounce": 0.0283495,
    "carrat": 0.0002,
    "atomic-mass-unit": 1.6_60_54_01_99E-27,
}







def  UpperCAmelCase_   (_lowerCAmelCase :		str     ,			_lowerCAmelCase :		str     ,			_lowerCAmelCase :		float		):
			if to_type not in KILOGRAM_CHART or from_type not in WEIGHT_TYPE_CHART:
						__UpperCamelCase    :    Dict								=      (
						    F'''Invalid \'from_type\' or \'to_type\' value: {from_type!r}, {to_type!r}\n'''
						    F'''Supported values are: {", ".join(_lowerCAmelCase		)}'''
						)
						raise ValueError(_lowerCAmelCase		)
			return value * KILOGRAM_CHART[to_type] * WEIGHT_TYPE_CHART[from_type]


if __name__ == "__main__":
					import doctest

					doctest.testmod()