






'''simple docstring'''

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


UpperCamelCase      					=logging.get_logger(__name__)

UpperCamelCase      					={
    "s-JoL/Open-Llama-V1": "https://huggingface.co/s-JoL/Open-Llama-V1/blob/main/config.json",
}




class      A     (   SCREAMING_SNAKE_CASE__    ):






 """simple docstring"""





 __a      :    Dict			  =    '''open-llama'''
 def __init__(				self      ,  __lowerCAmelCase=10_00_00      ,  __lowerCAmelCase=40_96      ,  __lowerCAmelCase=1_10_08      ,  __lowerCAmelCase=32      ,  __lowerCAmelCase=32      ,  __lowerCAmelCase="silu"      ,  __lowerCAmelCase=20_48      ,  __lowerCAmelCase=0.02      ,  __lowerCAmelCase=1E-6      ,  __lowerCAmelCase=True      ,  __lowerCAmelCase=0      ,  __lowerCAmelCase=1      ,  __lowerCAmelCase=2      ,  __lowerCAmelCase=False      ,  __lowerCAmelCase=True      ,  __lowerCAmelCase=0.1      ,  __lowerCAmelCase=0.1      ,  __lowerCAmelCase=True      ,  __lowerCAmelCase=True      ,  __lowerCAmelCase=None      ,  **__lowerCAmelCase      ,  ):
       UpperCamelCase_					: List[Any]            =				vocab_size
       UpperCamelCase_					: Optional[int]            =				max_position_embeddings
       UpperCamelCase_					: str            =				hidden_size
       UpperCamelCase_					: List[Any]            =				intermediate_size
       UpperCamelCase_					: Optional[int]            =				num_hidden_layers
       UpperCamelCase_					: str            =				num_attention_heads
       UpperCamelCase_					: Any            =				hidden_act
       UpperCamelCase_					: str            =				initializer_range
       UpperCamelCase_					: Union[str, Any]            =				rms_norm_eps
       UpperCamelCase_					: List[str]            =				use_cache
       UpperCamelCase_					: List[str]            =				kwargs.pop(
           """use_memorry_efficient_attention"""      ,  __lowerCAmelCase			)
       UpperCamelCase_					: Any            =				hidden_dropout_prob
       UpperCamelCase_					: Tuple            =				attention_dropout_prob
       UpperCamelCase_					: Optional[Any]            =				use_stable_embedding
       UpperCamelCase_					: Union[str, Any]            =				shared_input_output_embedding
       UpperCamelCase_					: 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 	_UpperCAmelCase							(				self			):
       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}"			)
       UpperCamelCase_					: Any            =				self.rope_scaling.get("""type"""      ,  __lowerCAmelCase			)
       UpperCamelCase_					: Optional[Any]            =				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}"			)














'''simple docstring'''

def 				snake_case       (  a_				:			list[int]     , a_				:			list[int]						)							->					tuple[float, float]:





      """simple docstring"""

      if not len(a_						) == len(a_						) == 3:
            raise ValueError("""Please enter a valid equation."""						)
      if equationa[0] == equationa[1] == equationa[0] == equationa[1] == 0:
            raise ValueError("""Both a & b of two equations can't be zero."""						)

      # Extract the coefficients
      UpperCamelCase_     ,      UpperCamelCase_     ,      UpperCamelCase_					: Optional[int]            =				equationa
      UpperCamelCase_     ,      UpperCamelCase_     ,      UpperCamelCase_					: List[str]            =				equationa

      # Calculate the determinants of the matrices
      UpperCamelCase_					: Union[str, Any]            =				aa * ba - aa * ba
      UpperCamelCase_					: Dict            =				ca * ba - ca * ba
      UpperCamelCase_					: Dict            =				aa * ca - aa * ca

      # Check if the system of linear equations has a solution (using Cramer's rule)
      if determinant == 0:
            if determinant_x == determinant_y == 0:
                  raise ValueError("""Infinite solutions. (Consistent system)"""						)
            else:
                  raise ValueError("""No solution. (Inconsistent system)"""						)
      else:
            if determinant_x == determinant_y == 0:
                  # Trivial solution (Inconsistent system)
                  return (0.0, 0.0)
            else:
                  UpperCamelCase_					: List[Any]            =				determinant_x / determinant
                  UpperCamelCase_					: List[str]            =				determinant_y / determinant
                  # Non-Trivial Solution (Consistent system)
                  return (x, y)






