
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 	A_       (      __lowerCamelCase       ):




	'''simple docstring'''


	_UpperCamelCase					:					int										=	"""cpmant"""





	def __init__(	self		,   snake_case = 3_0720		,   snake_case = 4096		,   snake_case = 32		,   snake_case = 128		,   snake_case = 1_0240		,   snake_case = 48		,   snake_case = 0.0		,   snake_case = 512		,   snake_case = 2048		,   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	)
		lowercase					  =   prompt_types
		lowercase					  =   prompt_length
		lowercase					  =   segment_types
		lowercase					  =   hidden_size
		lowercase					  =   num_attention_heads
		lowercase					  =   dim_head
		lowercase					  =   dim_ff
		lowercase					  =   num_hidden_layers
		lowercase					  =   position_bias_num_buckets
		lowercase					  =   position_bias_max_distance
		lowercase					  =   dropout_p
		lowercase					  =   eps
		lowercase					  =   use_cache
		lowercase					  =   vocab_size
		lowercase					  =   init_std



import unittest
from timeit import timeit






def 							UpperCAmelCase_		(							__SCREAMING_SNAKE_CASE			,							__SCREAMING_SNAKE_CASE							):
	lowercase					  =   first_num if first_num >= second_num else second_num
	lowercase					  =   max_num
	while (common_mult % first_num > 0) or (common_mult % second_num > 0):
		common_mult += max_num
	return common_mult






def 							UpperCAmelCase_		(							__SCREAMING_SNAKE_CASE			,							__SCREAMING_SNAKE_CASE							):
	return b if a == 0 else greatest_common_divisor(b % a			,							__SCREAMING_SNAKE_CASE							)






def 							UpperCAmelCase_		(							__SCREAMING_SNAKE_CASE			,							__SCREAMING_SNAKE_CASE							):
	return first_num // greatest_common_divisor(__SCREAMING_SNAKE_CASE			,							__SCREAMING_SNAKE_CASE							) * second_num






def 							UpperCAmelCase_		(							):
	lowercase					  =   (
	    'from __main__ import least_common_multiple_slow, least_common_multiple_fast'
	)
	print(
	    'least_common_multiple_slow():'			,							timeit('least_common_multiple_slow(1000, 999)'			,							setup=__SCREAMING_SNAKE_CASE							)			,							)
	print(
	    'least_common_multiple_fast():'			,							timeit('least_common_multiple_fast(1000, 999)'			,							setup=__SCREAMING_SNAKE_CASE							)			,							)







class 	A_       (      unittest.TestCase       ):




	'''simple docstring'''


	_UpperCamelCase					:					Any										=	(
	    (10, 20),
	    (13, 15),
	    (4, 31),
	    (10, 42),
	    (43, 34),
	    (5, 12),
	    (12, 25),
	    (10, 25),
	    (6, 9),
	)
	_UpperCamelCase					:					int										=	(20, 195, 124, 210, 1462, 60, 300, 50, 18)





	def      SCREAMING_SNAKE_CASE__						(	self	):
		for i, (first_num, second_num) in enumerate(self.test_inputs	):
			lowercase					  =   least_common_multiple_slow(snake_case		,   snake_case	)
			lowercase					  =   least_common_multiple_fast(snake_case		,   snake_case	)
			with self.subTest(i=snake_case	):
				self.assertEqual(snake_case		,   self.expected_results[i]	)
				self.assertEqual(snake_case		,   self.expected_results[i]	)


if __name__ == "__main__":
	benchmark()
	unittest.main()

