



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


__SCREAMING_SNAKE_CASE           =  logging.get_logger(__name__)

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

class 	lowerCamelCase_    ( _A						):






						'''simple docstring'''
						a__   =  "open-llama"







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




from typing import TYPE_CHECKING

from ...utils import OptionalDependencyNotAvailable, _LazyModule, is_tokenizers_available, is_torch_available


__SCREAMING_SNAKE_CASE           =  {
    """configuration_altclip""": [
        """ALTCLIP_PRETRAINED_CONFIG_ARCHIVE_MAP""",
        """AltCLIPConfig""",
        """AltCLIPTextConfig""",
        """AltCLIPVisionConfig""",
    ],
    """processing_altclip""": ["""AltCLIPProcessor"""],
}

try:
							if not is_torch_available():
														raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
							pass
else:
							__SCREAMING_SNAKE_CASE           =  [
							    """ALTCLIP_PRETRAINED_MODEL_ARCHIVE_LIST""",
							    """AltCLIPPreTrainedModel""",
							    """AltCLIPModel""",
							    """AltCLIPTextModel""",
							    """AltCLIPVisionModel""",
							]


if TYPE_CHECKING:
							from .configuration_altclip import (
							    ALTCLIP_PRETRAINED_CONFIG_ARCHIVE_MAP,
							    AltCLIPConfig,
							    AltCLIPTextConfig,
							    AltCLIPVisionConfig,
							)
							from .processing_altclip import AltCLIPProcessor

							try:
														if not is_torch_available():
																					raise OptionalDependencyNotAvailable()
							except OptionalDependencyNotAvailable:
														pass
							else:
														from .modeling_altclip import (
														    ALTCLIP_PRETRAINED_MODEL_ARCHIVE_LIST,
														    AltCLIPModel,
														    AltCLIPPreTrainedModel,
														    AltCLIPTextModel,
														    AltCLIPVisionModel,
														)


else:
							import sys

							__SCREAMING_SNAKE_CASE           =  _LazyModule(__name__, globals()["""__file__"""], _import_structure, module_spec=__spec__)