





'''simple docstring'''

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


lowerCAmelCase__      :   int      	=			logging.get_logger(__name__)

lowerCAmelCase__      :   List[str]      	=			{
    "facebook/opt-125m": "https://huggingface.co/facebook/opt-125m/blob/main/config.json",
    "facebook/opt-350m": "https://huggingface.co/facebook/opt-350m/blob/main/config.json",
    "facebook/opt-1.3b": "https://huggingface.co/facebook/opt-1.3b/blob/main/config.json",
    "facebook/opt-2.7b": "https://huggingface.co/facebook/opt-2.7b/blob/main/config.json",
    "facebook/opt-6.7b": "https://huggingface.co/facebook/opt-6.7b/blob/main/config.json",
    "facebook/opt-13b": "https://huggingface.co/facebook/opt-13b/blob/main/config.json",
}


class      SCREAMING_SNAKE_CASE__      (   __lowerCAmelCase		):







					"""simple docstring"""






					SCREAMING_SNAKE_CASE							=	"opt"
					SCREAMING_SNAKE_CASE							=	["past_key_values"]
					def __init__(   self       :      Dict		,	UpperCAmelCase_       :      Any=50_272		,	UpperCAmelCase_       :      Optional[Any]=768		,	UpperCAmelCase_       :      int=12		,	UpperCAmelCase_       :      Optional[Any]=3_072		,	UpperCAmelCase_       :      Any=2_048		,	UpperCAmelCase_       :      List[Any]=True		,	UpperCAmelCase_       :      Tuple=False		,	UpperCAmelCase_       :      Dict=None		,	UpperCAmelCase_       :      Tuple=0.1		,	UpperCAmelCase_       :      int=0.0		,	UpperCAmelCase_       :      Tuple=12		,	UpperCAmelCase_       :      Tuple="relu"		,	UpperCAmelCase_       :      Optional[int]=0.0		,	UpperCAmelCase_       :      Tuple=0.02		,	UpperCAmelCase_       :      int=True		,	UpperCAmelCase_       :      int=1		,	UpperCAmelCase_       :      int=2		,	UpperCAmelCase_       :      str=2		,	UpperCAmelCase_       :      Dict=True		,	UpperCAmelCase_       :      Optional[int]=True		,	**UpperCAmelCase_       :      List[Any]		,	):







							"""simple docstring"""
							super().__init__(
							    pad_token_id=lowerCamelCase__		,	bos_token_id=lowerCamelCase__		,	eos_token_id=lowerCamelCase__		,	**lowerCamelCase__		,	)
							__UpperCAmelCase	:							Optional[int]     =     vocab_size
							__UpperCAmelCase	:							List[Any]     =     max_position_embeddings
							__UpperCAmelCase	:							List[str]     =     num_attention_heads
							__UpperCAmelCase	:							int     =     word_embed_proj_dim if word_embed_proj_dim is not None else hidden_size
							__UpperCAmelCase	:							Optional[int]     =     ffn_dim
							__UpperCAmelCase	:							Optional[Any]     =     hidden_size
							__UpperCAmelCase	:							List[Any]     =     num_hidden_layers
							__UpperCAmelCase	:							str     =     dropout
							__UpperCAmelCase	:							int     =     attention_dropout
							__UpperCAmelCase	:							Dict     =     activation_function
							__UpperCAmelCase	:							Tuple     =     init_std
							__UpperCAmelCase	:							Tuple     =     layerdrop
							__UpperCAmelCase	:							Optional[Any]     =     use_cache
							__UpperCAmelCase	:							List[Any]     =     do_layer_norm_before
							# We keep these variables at `True` for backward compatibility.
							__UpperCAmelCase	:							Dict     =     enable_bias
							__UpperCAmelCase	:							str     =     layer_norm_elementwise_affine

							# Note that the only purpose of `_remove_final_layer_norm` is to keep backward compatibility
							# with checkpoints that have been fine-tuned before transformers v4.20.1
							# see https://github.com/facebookresearch/metaseq/pull/164
							__UpperCAmelCase	:							List[Any]     =     _remove_final_layer_norm








from typing import TYPE_CHECKING

from ...utils import (
    OptionalDependencyNotAvailable,
    _LazyModule,
    is_flax_available,
    is_tf_available,
    is_tokenizers_available,
    is_torch_available,
)


__UpperCamelCase							:							List[Any]    							=					{
    "configuration_mpnet": ["MPNET_PRETRAINED_CONFIG_ARCHIVE_MAP", "MPNetConfig"],
    "tokenization_mpnet": ["MPNetTokenizer"],
}

try:
       if not is_tokenizers_available():
              raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
       pass
else:
       __UpperCamelCase							:							Union[str, Any]    							=					["MPNetTokenizerFast"]

try:
       if not is_torch_available():
              raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
       pass
else:
       __UpperCamelCase							:							Union[str, Any]    							=					[
           "MPNET_PRETRAINED_MODEL_ARCHIVE_LIST",
           "MPNetForMaskedLM",
           "MPNetForMultipleChoice",
           "MPNetForQuestionAnswering",
           "MPNetForSequenceClassification",
           "MPNetForTokenClassification",
           "MPNetLayer",
           "MPNetModel",
           "MPNetPreTrainedModel",
       ]

try:
       if not is_tf_available():
              raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
       pass
else:
       __UpperCamelCase							:							List[Any]    							=					[
           "TF_MPNET_PRETRAINED_MODEL_ARCHIVE_LIST",
           "TFMPNetEmbeddings",
           "TFMPNetForMaskedLM",
           "TFMPNetForMultipleChoice",
           "TFMPNetForQuestionAnswering",
           "TFMPNetForSequenceClassification",
           "TFMPNetForTokenClassification",
           "TFMPNetMainLayer",
           "TFMPNetModel",
           "TFMPNetPreTrainedModel",
       ]


if TYPE_CHECKING:
       from .configuration_mpnet import MPNET_PRETRAINED_CONFIG_ARCHIVE_MAP, MPNetConfig
       from .tokenization_mpnet import MPNetTokenizer

       try:
              if not is_tokenizers_available():
                     raise OptionalDependencyNotAvailable()
       except OptionalDependencyNotAvailable:
              pass
       else:
              from .tokenization_mpnet_fast import MPNetTokenizerFast

       try:
              if not is_torch_available():
                     raise OptionalDependencyNotAvailable()
       except OptionalDependencyNotAvailable:
              pass
       else:
              from .modeling_mpnet import (
                  MPNET_PRETRAINED_MODEL_ARCHIVE_LIST,
                  MPNetForMaskedLM,
                  MPNetForMultipleChoice,
                  MPNetForQuestionAnswering,
                  MPNetForSequenceClassification,
                  MPNetForTokenClassification,
                  MPNetLayer,
                  MPNetModel,
                  MPNetPreTrainedModel,
              )

       try:
              if not is_tf_available():
                     raise OptionalDependencyNotAvailable()
       except OptionalDependencyNotAvailable:
              pass
       else:
              from .modeling_tf_mpnet import (
                  TF_MPNET_PRETRAINED_MODEL_ARCHIVE_LIST,
                  TFMPNetEmbeddings,
                  TFMPNetForMaskedLM,
                  TFMPNetForMultipleChoice,
                  TFMPNetForQuestionAnswering,
                  TFMPNetForSequenceClassification,
                  TFMPNetForTokenClassification,
                  TFMPNetMainLayer,
                  TFMPNetModel,
                  TFMPNetPreTrainedModel,
              )

else:
       import sys

       __UpperCamelCase							:							Tuple    							=					_LazyModule(__name__, globals()["__file__"], _import_structure, module_spec=__spec__)


