



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


lowerCamelCase__			= logging.get_logger(__name__)

lowerCamelCase__			= {"""ctrl""": """https://huggingface.co/ctrl/resolve/main/config.json"""}






class    SCREAMING_SNAKE_CASE			(							lowerCamelCase__					):
							__lowerCamelCase	:	str    ='ctrl'
							__lowerCamelCase	:	Any    =['past_key_values']
							__lowerCamelCase	:	Any    ={
							    'max_position_embeddings': 'n_positions',
							    'hidden_size': 'n_embd',
							    'num_attention_heads': 'n_head',
							    'num_hidden_layers': 'n_layer',
							}





							def __init__(   self		:		str      ,				__lowercase		:		Any=246534      ,				__lowercase		:		Tuple=256      ,				__lowercase		:		List[str]=1280      ,				__lowercase		:		Union[str, Any]=8192      ,				__lowercase		:		List[str]=48      ,				__lowercase		:		List[str]=16      ,				__lowercase		:		Tuple=0.1      ,				__lowercase		:		Optional[Any]=0.1      ,				__lowercase		:		List[str]=1E-6      ,				__lowercase		:		Union[str, Any]=0.02      ,				__lowercase		:		Tuple=True      ,				**__lowercase		:		Optional[int]      ,				):

											'''simple docstring'''
											__a       =		vocab_size
											__a       =		n_positions
											__a       =		n_embd
											__a       =		n_layer
											__a       =		n_head
											__a       =		dff
											__a       =		resid_pdrop
											__a       =		embd_pdrop
											__a       =		layer_norm_epsilon
											__a       =		initializer_range

											__a       =		use_cache

											super().__init__(**__lowercase	)





def   lowerCAmelCase__						(							_SCREAMING_SNAKE_CASE       :			int = 3				,     _SCREAMING_SNAKE_CASE       :			int = 7				,     _SCREAMING_SNAKE_CASE       :			int = 100_0000    ):
				"""simple docstring"""







				__a       =		0
				__a       =		1

				for current_denominator in range(1				,     limit + 1    ):
								__a       =		current_denominator * numerator // denominator
								if current_denominator % denominator == 0:
												current_numerator -= 1
								if current_numerator * max_denominator > current_denominator * max_numerator:
												__a       =		current_numerator
												__a       =		current_denominator
				return max_numerator


if __name__ == "__main__":
						print(solution(numerator=3, denominator=7, limit=100_0000))
