
"""simple docstring"""


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


a					:Optional[Any]    = logging.get_logger(__name__)

a					:Optional[Any]    = {
    "s-JoL/Open-Llama-V1": "https://huggingface.co/s-JoL/Open-Llama-V1/blob/main/config.json",
}

class      __a							(UpperCamelCase_):






     '''simple docstring'''
     _SCREAMING_SNAKE_CASE						:Any       = """open-llama"""

     def __init__(						self	,    _a=100_000	,    _a=4_096	,    _a=11_008	,    _a=32	,    _a=32	,    _a="silu"	,    _a=2_048	,    _a=0.02	,    _a=1E-6	,    _a=True	,    _a=0	,    _a=1	,    _a=2	,    _a=False	,    _a=True	,    _a=0.1	,    _a=0.1	,    _a=True	,    _a=True	,    _a=None	,    **_a	,    )  ->      str:


           """simple docstring"""


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

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





     def 					_a			(						self  )  ->      str:


           """simple docstring"""


           if self.rope_scaling is None:
                 return

           if not isinstance(self.rope_scaling	,    _a  ) 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__   :      List[Any]      		=	self.rope_scaling.get("""type"""	,    _a  )
           SCREAMING_SNAKE_CASE__   :      Optional[Any]      		=	self.rope_scaling.get("""factor"""	,    _a  )
           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(_a	,    _a  ) or rope_scaling_factor <= 1.0:
                 raise ValueError(f'''`rope_scaling`\'s factor field must be an float > 1, got {rope_scaling_factor}'''  )







"""simple docstring"""


def  _lowercase					(    __lowerCAmelCase							)       ->				int:
      if divisor % 5 == 0 or divisor % 2 == 0:
            return 0
      SCREAMING_SNAKE_CASE__   :      List[Any]      		=	1
      SCREAMING_SNAKE_CASE__   :      int      		=	1
      while repunit:
            SCREAMING_SNAKE_CASE__   :      str      		=	(10 * repunit + 1) % divisor
            repunit_index += 1
      return repunit_index




def  _lowercase					(    __lowerCAmelCase = 100_0000							)       ->				int:
      SCREAMING_SNAKE_CASE__   :      Dict      		=	limit - 1
      if divisor % 2 == 0:
            divisor += 1
      while least_divisible_repunit(__lowerCAmelCase							) <= limit:
            divisor += 2
      return divisor


if __name__ == "__main__":
  print(f'{solution() = }')




