



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


_lowercase						: List[Any]     						=logging.get_logger(__name__)

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

class   snake_case__							(__a						):







						"""simple docstring"""




						__lowerCAmelCase	:Dict         =	"open-llama"

						def __init__(  self   ,  __lowercase=1_0_0_0_0_0   ,  __lowercase=4_0_9_6   ,  __lowercase=1_1_0_0_8   ,  __lowercase=3_2   ,  __lowercase=3_2   ,  __lowercase="silu"   ,  __lowercase=2_0_4_8   ,  __lowercase=0.0_2   ,  __lowercase=1E-6   ,  __lowercase=True   ,  __lowercase=0   ,  __lowercase=1   ,  __lowercase=2   ,  __lowercase=False   ,  __lowercase=True   ,  __lowercase=0.1   ,  __lowercase=0.1   ,  __lowercase=True   ,  __lowercase=True   ,  __lowercase=None   ,  **__lowercase   ,  )   -> int:
									"""simple docstring"""




									a__  :		Union[str, Any]					=    vocab_size
									a__  :		Any					=    max_position_embeddings
									a__  :		Optional[Any]					=    hidden_size
									a__  :		Any					=    intermediate_size
									a__  :		List[Any]					=    num_hidden_layers
									a__  :		Tuple					=    num_attention_heads
									a__  :		Optional[int]					=    hidden_act
									a__  :		Dict					=    initializer_range
									a__  :		str					=    rms_norm_eps
									a__  :		Dict					=    use_cache
									a__  :		Tuple					=    kwargs.pop(
									    """use_memorry_efficient_attention"""   ,  lowercase_    )
									a__  :		int					=    hidden_dropout_prob
									a__  :		Any					=    attention_dropout_prob
									a__  :		Optional[Any]					=    use_stable_embedding
									a__  :		Dict					=    shared_input_output_embedding
									a__  :		Union[str, Any]					=    rope_scaling
									self._rope_scaling_validation()

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

						def 				SCREAMING_SNAKE_CASE__(  self    )   -> Dict:
									"""simple docstring"""




									if self.rope_scaling is None:
												return

									if not isinstance(self.rope_scaling   ,  lowercase_    ) 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__  :		Tuple					=    self.rope_scaling.get("""type"""   ,  lowercase_    )
									a__  :		Union[str, Any]					=    self.rope_scaling.get("""factor"""   ,  lowercase_    )
									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(lowercase_   ,  lowercase_    ) 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 collections import OrderedDict
from typing import Mapping

from ...configuration_utils import PretrainedConfig
from ...onnx import OnnxConfig
from ...utils import logging


__snake_case						  =		logging.get_logger(__name__)

__snake_case						  =		{
    """camembert-base""": """https://huggingface.co/camembert-base/resolve/main/config.json""",
    """umberto-commoncrawl-cased-v1""": (
        """https://huggingface.co/Musixmatch/umberto-commoncrawl-cased-v1/resolve/main/config.json"""
    ),
    """umberto-wikipedia-uncased-v1""": (
        """https://huggingface.co/Musixmatch/umberto-wikipedia-uncased-v1/resolve/main/config.json"""
    ),
}





class       _a    (		__a      ):


  """simple docstring"""

  A_    							=						'''camembert'''




  def __init__(		self      :       Union[str, Any]   ,				lowercase_      :       Union[str, Any]=30_522   ,				lowercase_      :       Optional[Any]=768   ,				lowercase_      :       Tuple=12   ,				lowercase_      :       Dict=12   ,				lowercase_      :       Tuple=3_072   ,				lowercase_      :       Optional[Any]="gelu"   ,				lowercase_      :       Optional[int]=0.1   ,				lowercase_      :       Optional[int]=0.1   ,				lowercase_      :       List[Any]=512   ,				lowercase_      :       Optional[int]=2   ,				lowercase_      :       str=0.0_2   ,				lowercase_      :       int=1e-12   ,				lowercase_      :       str=1   ,				lowercase_      :       List[str]=0   ,				lowercase_      :       int=2   ,				lowercase_      :       Union[str, Any]="absolute"   ,				lowercase_      :       Optional[Any]=True   ,				lowercase_      :       List[Any]=None   ,				**lowercase_      :       int   ,				):







    '''simple docstring'''


    super().__init__(pad_token_id=lowercase_   ,				bos_token_id=lowercase_   ,				eos_token_id=lowercase_   ,				**lowercase_      )

    lowercase_     =       vocab_size
    lowercase_     =       hidden_size
    lowercase_     =       num_hidden_layers
    lowercase_     =       num_attention_heads
    lowercase_     =       hidden_act
    lowercase_     =       intermediate_size
    lowercase_     =       hidden_dropout_prob
    lowercase_     =       attention_probs_dropout_prob
    lowercase_     =       max_position_embeddings
    lowercase_     =       type_vocab_size
    lowercase_     =       initializer_range
    lowercase_     =       layer_norm_eps
    lowercase_     =       position_embedding_type
    lowercase_     =       use_cache
    lowercase_     =       classifier_dropout






class       _a    (		__a      ):


  """simple docstring"""

  @property
  def 		lowerCamelCase__  (		self      :       Dict      ):







    '''simple docstring'''


    if self.task == "multiple-choice":
      lowercase_     =       {0: """batch""", 1: """choice""", 2: """sequence"""}
    else:
      lowercase_     =       {0: """batch""", 1: """sequence"""}
    return OrderedDict(
        [
            ("""input_ids""", dynamic_axis),
            ("""attention_mask""", dynamic_axis),
        ]      )

