





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


_lowerCamelCase :    Dict  							= logging.get_logger(__name__)

_lowerCamelCase :    List[Any]  							= {
    '''s-JoL/Open-Llama-V1''': '''https://huggingface.co/s-JoL/Open-Llama-V1/blob/main/config.json''',
}


class 						lowerCamelCase       (a__      ):







       """simple docstring"""




       UpperCAmelCase_      						=   """open-llama"""






       def __init__( self     :					Any,			_UpperCAmelCase     :					Optional[int]=1_0_0_0_0_0,			_UpperCAmelCase     :					Dict=4_0_9_6,			_UpperCAmelCase     :					Any=1_1_0_0_8,			_UpperCAmelCase     :					List[str]=3_2,			_UpperCAmelCase     :					List[str]=3_2,			_UpperCAmelCase     :					Optional[int]="silu",			_UpperCAmelCase     :					Optional[int]=2_0_4_8,			_UpperCAmelCase     :					Dict=0.02,			_UpperCAmelCase     :					Optional[Any]=1E-6,			_UpperCAmelCase     :					str=True,			_UpperCAmelCase     :					List[str]=0,			_UpperCAmelCase     :					Tuple=1,			_UpperCAmelCase     :					List[str]=2,			_UpperCAmelCase     :					List[Any]=False,			_UpperCAmelCase     :					List[str]=True,			_UpperCAmelCase     :					Optional[Any]=0.1,			_UpperCAmelCase     :					Any=0.1,			_UpperCAmelCase     :					int=True,			_UpperCAmelCase     :					List[Any]=True,			_UpperCAmelCase     :					Union[str, Any]=None,			**_UpperCAmelCase     :					Optional[int],			)				->			Tuple:





              """simple docstring"""
              SCREAMING_SNAKE_CASE__       :      Any     =						vocab_size
              SCREAMING_SNAKE_CASE__       :      List[str]     =						max_position_embeddings
              SCREAMING_SNAKE_CASE__       :      int     =						hidden_size
              SCREAMING_SNAKE_CASE__       :      str     =						intermediate_size
              SCREAMING_SNAKE_CASE__       :      List[str]     =						num_hidden_layers
              SCREAMING_SNAKE_CASE__       :      int     =						num_attention_heads
              SCREAMING_SNAKE_CASE__       :      Dict     =						hidden_act
              SCREAMING_SNAKE_CASE__       :      Union[str, Any]     =						initializer_range
              SCREAMING_SNAKE_CASE__       :      Tuple     =						rms_norm_eps
              SCREAMING_SNAKE_CASE__       :      Union[str, Any]     =						use_cache
              SCREAMING_SNAKE_CASE__       :      Union[str, Any]     =						kwargs.pop(
                  "use_memorry_efficient_attention",			lowerCAmelCase__						)
              SCREAMING_SNAKE_CASE__       :      int     =						hidden_dropout_prob
              SCREAMING_SNAKE_CASE__       :      Tuple     =						attention_dropout_prob
              SCREAMING_SNAKE_CASE__       :      Optional[Any]     =						use_stable_embedding
              SCREAMING_SNAKE_CASE__       :      str     =						shared_input_output_embedding
              SCREAMING_SNAKE_CASE__       :      str     =						rope_scaling
              self._rope_scaling_validation()

              super().__init__(
                  pad_token_id=lowerCAmelCase__,			bos_token_id=lowerCAmelCase__,			eos_token_id=lowerCAmelCase__,			tie_word_embeddings=lowerCAmelCase__,			**lowerCAmelCase__,			)






       def  A_     ( self     :					List[str]						)				->			Union[str, Any]:





              """simple docstring"""
              if self.rope_scaling is None:
                     return

              if not isinstance(self.rope_scaling,			lowerCAmelCase__						) or len(self.rope_scaling						) != 2:
                     raise ValueError(
                         "`rope_scaling` must be a dictionary with with two fields, `name` and `factor`, "
                         F'''got {self.rope_scaling}'''						)
              SCREAMING_SNAKE_CASE__       :      Any     =						self.rope_scaling.get("type",			lowerCAmelCase__						)
              SCREAMING_SNAKE_CASE__       :      List[str]     =						self.rope_scaling.get("factor",			lowerCAmelCase__						)
              if rope_scaling_type is None or rope_scaling_type not in ["linear", "dynamic"]:
                     raise ValueError(
                         F'''`rope_scaling`\'s name field must be one of [\'linear\', \'dynamic\'], got {rope_scaling_type}'''						)
              if rope_scaling_factor is None or not isinstance(lowerCAmelCase__,			lowerCAmelCase__						) or rope_scaling_factor <= 1.0:
                     raise ValueError(F'''`rope_scaling`\'s factor field must be an float > 1, got {rope_scaling_factor}'''						)













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




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

							'''simple docstring'''






							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__       :      Union[str, Any]     =						(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__       :      Tuple     =						_calculate(days - 1			,				SCREAMING_SNAKE_CASE__			,				late + 1       )

							# 2) if we are absent, the "absent" counter increases by 1, and the
							# "late" counter resets to 0
							SCREAMING_SNAKE_CASE__       :      Dict     =						_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__       :      Any     =						_calculate(days - 1			,				SCREAMING_SNAKE_CASE__			,				0       )

							SCREAMING_SNAKE_CASE__       :      str     =						state_late + state_absent + state_ontime

							SCREAMING_SNAKE_CASE__       :      Optional[int]     =						prizestrings
							return prizestrings




def _a (  SCREAMING_SNAKE_CASE__      :  int = 30       )	->    int:

							'''simple docstring'''






							return _calculate(SCREAMING_SNAKE_CASE__			,				absent=0			,				late=0       )


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






