



'''simple docstring'''

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


__lowerCAmelCase									=   logging.get_logger(__name__)

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

class 	__magic_name__						(    _UpperCamelCase   ):
							lowerCAmelCase       :    List[str]   				=					'open-llama'







							def __init__(							self					:       List[str]	,_UpperCAmelCase					:       str=100000	,_UpperCAmelCase					:       Optional[int]=4096	,_UpperCAmelCase					:       Dict=11008	,_UpperCAmelCase					:       Dict=32	,_UpperCAmelCase					:       Dict=32	,_UpperCAmelCase					:       int="silu"	,_UpperCAmelCase					:       Tuple=2048	,_UpperCAmelCase					:       Optional[int]=0.02	,_UpperCAmelCase					:       List[Any]=1E-6	,_UpperCAmelCase					:       int=True	,_UpperCAmelCase					:       int=0	,_UpperCAmelCase					:       List[str]=1	,_UpperCAmelCase					:       int=2	,_UpperCAmelCase					:       List[str]=False	,_UpperCAmelCase					:       List[str]=True	,_UpperCAmelCase					:       Dict=0.1	,_UpperCAmelCase					:       Any=0.1	,_UpperCAmelCase					:       Optional[Any]=True	,_UpperCAmelCase					:       Dict=True	,_UpperCAmelCase					:       Any=None	,**_UpperCAmelCase					:       Union[str, Any]	,):
									_a     :      str        =							vocab_size
									_a     :      Dict        =							max_position_embeddings
									_a     :      Tuple        =							hidden_size
									_a     :      Any        =							intermediate_size
									_a     :      Optional[int]        =							num_hidden_layers
									_a     :      Optional[Any]        =							num_attention_heads
									_a     :      Union[str, Any]        =							hidden_act
									_a     :      List[str]        =							initializer_range
									_a     :      List[str]        =							rms_norm_eps
									_a     :      str        =							use_cache
									_a     :      Tuple        =							kwargs.pop(
									    'use_memorry_efficient_attention'	,_UpperCAmelCase		)
									_a     :      Any        =							hidden_dropout_prob
									_a     :      str        =							attention_dropout_prob
									_a     :      List[str]        =							use_stable_embedding
									_a     :      Tuple        =							shared_input_output_embedding
									_a     :      List[Any]        =							rope_scaling
									self._rope_scaling_validation()

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







							def 							__lowercase			(							self					:       Optional[int]		):
									if self.rope_scaling is None:
											return

									if not isinstance(self.rope_scaling	,_UpperCAmelCase		) 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     :      Optional[Any]        =							self.rope_scaling.get('type'	,_UpperCAmelCase		)
									_a     :      List[str]        =							self.rope_scaling.get('factor'	,_UpperCAmelCase		)
									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(_UpperCAmelCase	,_UpperCAmelCase		) 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 dataclasses import dataclass, field
from typing import ClassVar, Dict

from ..features import Features, Value
from .base import TaskTemplate







@dataclass(frozen=lowercase_  )
class       UpperCamelCase__   (	lowercase_  ):




      """simple docstring"""




      _SCREAMING_SNAKE_CASE  				=     field(default="""summarization""",					metadata={"""include_in_asdict_even_if_is_default""": True}  )
      _SCREAMING_SNAKE_CASE  				=     Features({"""text""": Value("""string"""  )}  )
      _SCREAMING_SNAKE_CASE  				=     Features({"""summary""": Value("""string"""  )}  )
      _SCREAMING_SNAKE_CASE  				=     "text"
      _SCREAMING_SNAKE_CASE  				=     "summary"



      @property
      def      SCREAMING_SNAKE_CASE__ (      self				:      Dict       ):
        return {self.text_column: "text", self.summary_column: "summary"}





