



'''simple docstring'''





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


__a  			=						logging.get_logger(__name__)

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







class        UpperCAmelCase_			(			_a      ):
    """simple docstring"""







    lowercase   =						"open-llama"




    def __init__(       self   :	str					,	snake_case_   :	Dict=100_000					,	snake_case_   :	Optional[Any]=4_096					,	snake_case_   :	int=11_008					,	snake_case_   :	Union[str, Any]=32					,	snake_case_   :	Tuple=32					,	snake_case_   :	str="silu"					,	snake_case_   :	Union[str, Any]=2_048					,	snake_case_   :	Optional[Any]=0.02					,	snake_case_   :	Any=1E-6					,	snake_case_   :	int=True					,	snake_case_   :	List[str]=0					,	snake_case_   :	int=1					,	snake_case_   :	str=2					,	snake_case_   :	List[str]=False					,	snake_case_   :	Optional[Any]=True					,	snake_case_   :	Optional[int]=0.1					,	snake_case_   :	List[Any]=0.1					,	snake_case_   :	Any=True					,	snake_case_   :	int=True					,	snake_case_   :	Tuple=None					,	**snake_case_   :	Union[str, Any]					,	):
          snake_case__    :       int       		= vocab_size
          snake_case__    :       Dict       		= max_position_embeddings
          snake_case__    :       Tuple       		= hidden_size
          snake_case__    :       Any       		= intermediate_size
          snake_case__    :       Optional[Any]       		= num_hidden_layers
          snake_case__    :       Dict       		= num_attention_heads
          snake_case__    :       str       		= hidden_act
          snake_case__    :       Optional[Any]       		= initializer_range
          snake_case__    :       List[Any]       		= rms_norm_eps
          snake_case__    :       Union[str, Any]       		= use_cache
          snake_case__    :       Optional[Any]       		= kwargs.pop(
              """use_memorry_efficient_attention"""					,	snake_case_		)
          snake_case__    :       str       		= hidden_dropout_prob
          snake_case__    :       Tuple       		= attention_dropout_prob
          snake_case__    :       Union[str, Any]       		= use_stable_embedding
          snake_case__    :       Union[str, Any]       		= shared_input_output_embedding
          snake_case__    :       Union[str, Any]       		= rope_scaling
          self._rope_scaling_validation()

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




    def lowerCamelCase			(       self   :	Optional[Any]		):
          if self.rope_scaling is None:
                return

          if not isinstance(self.rope_scaling					,	snake_case_		) 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}"		)
          snake_case__    :       Optional[Any]       		= self.rope_scaling.get("""type"""					,	snake_case_		)
          snake_case__    :       str       		= self.rope_scaling.get("""factor"""					,	snake_case_		)
          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(snake_case_					,	snake_case_		) 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'''





# flake8: noqa
# Lint as: python3
__a  			=						[
    "VerificationMode",
    "Version",
    "disable_progress_bar",
    "enable_progress_bar",
    "is_progress_bar_enabled",
    "experimental",
]

from .info_utils import VerificationMode
from .logging import disable_progress_bar, enable_progress_bar, is_progress_bar_enabled
from .version import Version
from .experimental import experimental
