


import warnings

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


_UpperCAmelCase			:  Optional[int]     =logging.get_logger(__name__)

_UpperCAmelCase			:  Dict     ={
    """RUCAIBox/mvp""": """https://huggingface.co/RUCAIBox/mvp/resolve/main/config.json""",
}







class 				snake_case__(							UpperCAmelCase__							):







						'''simple docstring'''




						SCREAMING_SNAKE_CASE__      :  Dict					=							"""mvp"""
						SCREAMING_SNAKE_CASE__      :  List[str]					=							["""past_key_values"""]
						SCREAMING_SNAKE_CASE__      :  Union[str, Any]					=							{"""num_attention_heads""": """encoder_attention_heads""", """hidden_size""": """d_model"""}




						def __init__(				self   ,						__lowercase=5_0_2_6_7   ,						__lowercase=1_0_2_4   ,						__lowercase=1_2   ,						__lowercase=4_0_9_6   ,						__lowercase=1_6   ,						__lowercase=1_2   ,						__lowercase=4_0_9_6   ,						__lowercase=1_6   ,						__lowercase=0.0   ,						__lowercase=0.0   ,						__lowercase="gelu"   ,						__lowercase=1_0_2_4   ,						__lowercase=0.1   ,						__lowercase=0.0   ,						__lowercase=0.0   ,						__lowercase=0.02   ,						__lowercase=0.0   ,						__lowercase=False   ,						__lowercase=True   ,						__lowercase=1   ,						__lowercase=0   ,						__lowercase=2   ,						__lowercase=True   ,						__lowercase=2   ,						__lowercase=2   ,						__lowercase=False   ,						__lowercase=1_0_0   ,						__lowercase=8_0_0   ,						**__lowercase   ,						)					->    Tuple:
										lowerCAmelCase_ :      Any    				=				vocab_size
										lowerCAmelCase_ :      int    				=				max_position_embeddings
										lowerCAmelCase_ :      Dict    				=				d_model
										lowerCAmelCase_ :      int    				=				encoder_ffn_dim
										lowerCAmelCase_ :      Optional[Any]    				=				encoder_layers
										lowerCAmelCase_ :      List[Any]    				=				encoder_attention_heads
										lowerCAmelCase_ :      Union[str, Any]    				=				decoder_ffn_dim
										lowerCAmelCase_ :      Optional[Any]    				=				decoder_layers
										lowerCAmelCase_ :      str    				=				decoder_attention_heads
										lowerCAmelCase_ :      Union[str, Any]    				=				dropout
										lowerCAmelCase_ :      int    				=				attention_dropout
										lowerCAmelCase_ :      List[str]    				=				activation_dropout
										lowerCAmelCase_ :      Any    				=				activation_function
										lowerCAmelCase_ :      Optional[int]    				=				init_std
										lowerCAmelCase_ :      Union[str, Any]    				=				encoder_layerdrop
										lowerCAmelCase_ :      int    				=				decoder_layerdrop
										lowerCAmelCase_ :      Any    				=				classifier_dropout
										lowerCAmelCase_ :      int    				=				use_cache
										lowerCAmelCase_ :      Union[str, Any]    				=				encoder_layers
										lowerCAmelCase_ :      List[str]    				=				scale_embedding  # scale factor will be sqrt(d_model) if True
										lowerCAmelCase_ :      Dict    				=				use_prompt
										lowerCAmelCase_ :      Tuple    				=				prompt_length
										lowerCAmelCase_ :      str    				=				prompt_mid_dim

										super().__init__(
										    pad_token_id=__lowercase   ,						bos_token_id=__lowercase   ,						eos_token_id=__lowercase   ,						is_encoder_decoder=__lowercase   ,						decoder_start_token_id=__lowercase   ,						forced_eos_token_id=__lowercase   ,						**__lowercase   ,						)

										if self.forced_bos_token_id is None and kwargs.get('''force_bos_token_to_be_generated'''   ,						__lowercase							):
														lowerCAmelCase_ :      int    				=				self.bos_token_id
														warnings.warn(
														    f"""Please make sure the config includes `forced_bos_token_id={self.bos_token_id}` in future versions. """
														    '''The config can simply be saved and uploaded again to be fixed.'''							)



from typing import TYPE_CHECKING

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


_UpperCAmelCase			:  Union[str, Any]     ={
    """configuration_llama""": ["""LLAMA_PRETRAINED_CONFIG_ARCHIVE_MAP""", """LlamaConfig"""],
}

try:
						if not is_sentencepiece_available():
												raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
						pass
else:
						_UpperCAmelCase			:  Optional[Any]     =["""LlamaTokenizer"""]

try:
						if not is_tokenizers_available():
												raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
						pass
else:
						_UpperCAmelCase			:  Optional[int]     =["""LlamaTokenizerFast"""]

try:
						if not is_torch_available():
												raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
						pass
else:
						_UpperCAmelCase			:  Tuple     =[
						    """LlamaForCausalLM""",
						    """LlamaModel""",
						    """LlamaPreTrainedModel""",
						    """LlamaForSequenceClassification""",
						]


if TYPE_CHECKING:
						from .configuration_llama import LLAMA_PRETRAINED_CONFIG_ARCHIVE_MAP, LlamaConfig

						try:
												if not is_sentencepiece_available():
																		raise OptionalDependencyNotAvailable()
						except OptionalDependencyNotAvailable:
												pass
						else:
												from .tokenization_llama import LlamaTokenizer

						try:
												if not is_tokenizers_available():
																		raise OptionalDependencyNotAvailable()
						except OptionalDependencyNotAvailable:
												pass
						else:
												from .tokenization_llama_fast import LlamaTokenizerFast

						try:
												if not is_torch_available():
																		raise OptionalDependencyNotAvailable()
						except OptionalDependencyNotAvailable:
												pass
						else:
												from .modeling_llama import LlamaForCausalLM, LlamaForSequenceClassification, LlamaModel, LlamaPreTrainedModel


else:
						import sys

						_UpperCAmelCase			:  List[Any]     =_LazyModule(__name__, globals()["""__file__"""], _import_structure, module_spec=__spec__)