



"""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__		(      UpperCamelCase     ):
		lowerCAmelCase_       :	Tuple 							=     """open-llama"""



		def __init__( self  :    Dict      ,							snake_case  :    Optional[Any]=100_000      ,							snake_case  :    Tuple=4_096      ,							snake_case  :    Union[str, Any]=11_008      ,							snake_case  :    List[Any]=32      ,							snake_case  :    Optional[Any]=32      ,							snake_case  :    List[str]="silu"      ,							snake_case  :    Optional[int]=2_048      ,							snake_case  :    str=0.02      ,							snake_case  :    Any=1E-6      ,							snake_case  :    Tuple=True      ,							snake_case  :    Any=0      ,							snake_case  :    Dict=1      ,							snake_case  :    Any=2      ,							snake_case  :    Optional[Any]=False      ,							snake_case  :    Optional[int]=True      ,							snake_case  :    Any=0.1      ,							snake_case  :    Union[str, Any]=0.1      ,							snake_case  :    List[Any]=True      ,							snake_case  :    Any=True      ,							snake_case  :    int=None      ,							**snake_case  :    Dict      ,							)			->						List[str]:






									'''simple docstring'''

									A         =					vocab_size
									A         =					max_position_embeddings
									A         =					hidden_size
									A         =					intermediate_size
									A         =					num_hidden_layers
									A         =					num_attention_heads
									A         =					hidden_act
									A         =					initializer_range
									A         =					rms_norm_eps
									A         =					use_cache
									A         =					kwargs.pop(
									    'use_memorry_efficient_attention'      ,							snake_case				)
									A         =					hidden_dropout_prob
									A         =					attention_dropout_prob
									A         =					use_stable_embedding
									A         =					shared_input_output_embedding
									A         =					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 					A_		( self  :    Optional[Any]				)			->						Any:






									'''simple docstring'''

									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}"""				)
									A         =					self.rope_scaling.get('type'      ,							snake_case				)
									A         =					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"""







from typing import TYPE_CHECKING

from ...utils import (
    OptionalDependencyNotAvailable,
    _LazyModule,
    is_sentencepiece_available,
    is_tokenizers_available,
    is_torch_available,
)


A    =			{'configuration_plbart': ['PLBART_PRETRAINED_CONFIG_ARCHIVE_MAP', 'PLBartConfig']}

try:
							if not is_sentencepiece_available():
														raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
							pass
else:
							A    =			['PLBartTokenizer']

try:
							if not is_torch_available():
														raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
							pass
else:
							A    =			[
							    'PLBART_PRETRAINED_MODEL_ARCHIVE_LIST',
							    'PLBartForCausalLM',
							    'PLBartForConditionalGeneration',
							    'PLBartForSequenceClassification',
							    'PLBartModel',
							    'PLBartPreTrainedModel',
							]


if TYPE_CHECKING:
							from .configuration_plbart import PLBART_PRETRAINED_CONFIG_ARCHIVE_MAP, PLBartConfig

							try:
														if not is_sentencepiece_available():
																					raise OptionalDependencyNotAvailable()
							except OptionalDependencyNotAvailable:
														pass
							else:
														from .tokenization_plbart import PLBartTokenizer

							try:
														if not is_torch_available():
																					raise OptionalDependencyNotAvailable()
							except OptionalDependencyNotAvailable:
														pass
							else:
														from .modeling_plbart import (
														    PLBART_PRETRAINED_MODEL_ARCHIVE_LIST,
														    PLBartForCausalLM,
														    PLBartForConditionalGeneration,
														    PLBartForSequenceClassification,
														    PLBartModel,
														    PLBartPreTrainedModel,
														)


else:
							import sys

							A    =			_LazyModule(__name__, globals()['__file__'], _import_structure)



