



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


lowercase_										=  logging.get_logger(__name__)

lowercase_										=  {
    '''tiiuae/falcon-40b''': '''https://huggingface.co/tiiuae/falcon-40b/resolve/main/config.json''',
    '''tiiuae/falcon-7b''': '''https://huggingface.co/tiiuae/falcon-7b/resolve/main/config.json''',
}
class 					_snake_case      (       SCREAMING_SNAKE_CASE__):
				UpperCamelCase__					:       Any  		="""falcon"""
				UpperCamelCase__					:       str  		=["""past_key_values"""]




				def __init__(    self       :    Any,       __lowercase       :    Optional[int]=6_5024,       __lowercase       :    Optional[int]=4544,       __lowercase       :    List[str]=32,       __lowercase       :    int=71,       __lowercase       :    Tuple=1e-5,       __lowercase       :    int=0.02,       __lowercase       :    List[Any]=True,       __lowercase       :    Union[str, Any]=0.0,       __lowercase       :    Any=0.0,       __lowercase       :    List[Any]=None,       __lowercase       :    Tuple=False,       __lowercase       :    Tuple=False,       __lowercase       :    str=True,       __lowercase       :    Dict=True,       __lowercase       :    List[str]=False,       __lowercase       :    Optional[Any]=11,       __lowercase       :    Union[str, Any]=11,       **__lowercase       :    str,       ):
							lowercase__       	=					vocab_size
							# Backward compatibility with n_embed kwarg
							lowercase__       	=					kwargs.pop("n_embed",       snake_case__    )
							lowercase__       	=					hidden_size if n_embed is None else n_embed
							lowercase__       	=					num_hidden_layers
							lowercase__       	=					num_attention_heads
							lowercase__       	=					layer_norm_epsilon
							lowercase__       	=					initializer_range
							lowercase__       	=					use_cache
							lowercase__       	=					hidden_dropout
							lowercase__       	=					attention_dropout

							lowercase__       	=					bos_token_id
							lowercase__       	=					eos_token_id
							lowercase__       	=					num_attention_heads if num_kv_heads is None else num_kv_heads
							lowercase__       	=					alibi
							lowercase__       	=					new_decoder_architecture
							lowercase__       	=					multi_query  # Ignored when new_decoder_architecture is True
							lowercase__       	=					parallel_attn
							lowercase__       	=					bias

							super().__init__(bos_token_id=snake_case__,       eos_token_id=snake_case__,       **snake_case__    )




				@property
				def 				A__   (    self       :    int    ):
							return self.hidden_size // self.num_attention_heads




				@property
				def 				A__   (    self       :    str    ):
							return not self.alibi










SCREAMING_SNAKE_CASE:     dict[tuple[int, int, int], int]									= {}


def 					_a							(					lowerCAmelCase    ,						lowerCAmelCase    ,						lowerCAmelCase )->	int:

		# if we are absent twice, or late 3 consecutive days,
		# no further prize strings are possible
		if late == 3 or absent == 2:
				return 0

		# if we have no days left, and have not failed any other rules,
		# we have a prize string
		if days == 0:
				return 1

		# No easy solution, so now we need to do the recursive calculation

		# First, check if the combination is already in the cache, and
		# if yes, return the stored value from there since we already
		# know the number of possible prize strings from this point on
		SCREAMING_SNAKE_CASE_					      =							(days, absent, late)
		if key in cache:
				return cache[key]

		# now we calculate the three possible ways that can unfold from
		# this point on, depending on our attendance today

		# 1) if we are late (but not absent), the "absent" counter stays as
		# it is, but the "late" counter increases by one
		SCREAMING_SNAKE_CASE_					      =							_calculate(days - 1    ,						lowerCAmelCase    ,						late + 1 )

		# 2) if we are absent, the "absent" counter increases by 1, and the
		# "late" counter resets to 0
		SCREAMING_SNAKE_CASE_					      =							_calculate(days - 1    ,						absent + 1    ,						0 )

		# 3) if we are on time, this resets the "late" counter and keeps the
		# absent counter
		SCREAMING_SNAKE_CASE_					      =							_calculate(days - 1    ,						lowerCAmelCase    ,						0 )

		SCREAMING_SNAKE_CASE_					      =							state_late + state_absent + state_ontime

		SCREAMING_SNAKE_CASE_					      =							prizestrings
		return prizestrings


def 					_a							(					lowerCAmelCase = 30 )->	int:
		return _calculate(lowerCAmelCase    ,						absent=0    ,						late=0 )


if __name__ == "__main__":
						print(solution())