


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


_snake_case				=			logging.get_logger(__name__)

_snake_case				=			{
    "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  A_ (			a_  ):







 """simple docstring"""





 _UpperCamelCase					:			Tuple     	=       '''opt'''
 _UpperCamelCase					:			List[Any]     	=       ['''past_key_values''']
 def __init__(      self       :			int							,     _a       :			Any=5_0_2_7_2							,     _a       :			Tuple=7_6_8							,     _a       :			Tuple=1_2							,     _a       :			List[Any]=3_0_7_2							,     _a       :			str=2_0_4_8							,     _a       :			str=True							,     _a       :			List[Any]=False							,     _a       :			Tuple=None							,     _a       :			int=0.1							,     _a       :			Optional[int]=0.0							,     _a       :			str=1_2							,     _a       :			Any="relu"							,     _a       :			Dict=0.0							,     _a       :			List[str]=0.0_2							,     _a       :			str=True							,     _a       :			List[str]=1							,     _a       :			Any=2							,     _a       :			Any=2							,     _a       :			Union[str, Any]=True							,     _a       :			Optional[Any]=True							,     **_a       :			List[Any]							,     )     ->      Optional[Any]:
      super().__init__(
          pad_token_id=_a							,     bos_token_id=_a							,     eos_token_id=_a							,     **_a							,     )
      UpperCAmelCase    :					Tuple			=      vocab_size
      UpperCAmelCase    :					Dict			=      max_position_embeddings
      UpperCAmelCase    :					int			=      num_attention_heads
      UpperCAmelCase    :					Any			=      word_embed_proj_dim if word_embed_proj_dim is not None else hidden_size
      UpperCAmelCase    :					Any			=      ffn_dim
      UpperCAmelCase    :					Tuple			=      hidden_size
      UpperCAmelCase    :					str			=      num_hidden_layers
      UpperCAmelCase    :					str			=      dropout
      UpperCAmelCase    :					Optional[int]			=      attention_dropout
      UpperCAmelCase    :					Optional[int]			=      activation_function
      UpperCAmelCase    :					Tuple			=      init_std
      UpperCAmelCase    :					Any			=      layerdrop
      UpperCAmelCase    :					Union[str, Any]			=      use_cache
      UpperCAmelCase    :					Union[str, Any]			=      do_layer_norm_before
      # We keep these variables at `True` for backward compatibility.
      UpperCAmelCase    :					Any			=      enable_bias
      UpperCAmelCase    :					List[Any]			=      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[str]			=      _remove_final_layer_norm







from typing import TYPE_CHECKING

from ...utils import OptionalDependencyNotAvailable, _LazyModule, is_tokenizers_available, is_torch_available


_snake_case				=			{
    "configuration_nystromformer": ["NYSTROMFORMER_PRETRAINED_CONFIG_ARCHIVE_MAP", "NystromformerConfig"],
}

try:
      if not is_torch_available():
            raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
      pass
else:
      _snake_case				=			[
          "NYSTROMFORMER_PRETRAINED_MODEL_ARCHIVE_LIST",
          "NystromformerForMaskedLM",
          "NystromformerForMultipleChoice",
          "NystromformerForQuestionAnswering",
          "NystromformerForSequenceClassification",
          "NystromformerForTokenClassification",
          "NystromformerLayer",
          "NystromformerModel",
          "NystromformerPreTrainedModel",
      ]


if TYPE_CHECKING:
      from .configuration_nystromformer import NYSTROMFORMER_PRETRAINED_CONFIG_ARCHIVE_MAP, NystromformerConfig

      try:
            if not is_torch_available():
                  raise OptionalDependencyNotAvailable()
      except OptionalDependencyNotAvailable:
            pass
      else:
            from .modeling_nystromformer import (
                NYSTROMFORMER_PRETRAINED_MODEL_ARCHIVE_LIST,
                NystromformerForMaskedLM,
                NystromformerForMultipleChoice,
                NystromformerForQuestionAnswering,
                NystromformerForSequenceClassification,
                NystromformerForTokenClassification,
                NystromformerLayer,
                NystromformerModel,
                NystromformerPreTrainedModel,
            )


else:
      import sys

      _snake_case				=			_LazyModule(__name__, globals()["__file__"], _import_structure, module_spec=__spec__)



