



"""simple docstring"""







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


A     =      logging.get_logger(__name__)

A     =      {
    '''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   UpperCAmelCase__		(   __a  ):
		lowerCAmelCase_							:						Any							=  """opt"""
		lowerCAmelCase_							:						List[Any]							=  ["""past_key_values"""]



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






									'''simple docstring'''

									super().__init__(
									    pad_token_id=SCREAMING_SNAKE_CASE__   ,				bos_token_id=SCREAMING_SNAKE_CASE__   ,				eos_token_id=SCREAMING_SNAKE_CASE__   ,				**SCREAMING_SNAKE_CASE__   ,				)
									A    =       vocab_size
									A    =       max_position_embeddings
									A    =       num_attention_heads
									A    =       word_embed_proj_dim if word_embed_proj_dim is not None else hidden_size
									A    =       ffn_dim
									A    =       hidden_size
									A    =       num_hidden_layers
									A    =       dropout
									A    =       attention_dropout
									A    =       activation_function
									A    =       init_std
									A    =       layerdrop
									A    =       use_cache
									A    =       do_layer_norm_before
									# We keep these variables at `True` for backward compatibility.
									A    =       enable_bias
									A    =       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
									A    =       _remove_final_layer_norm






"""simple docstring"""




# Copyright 2023 The HuggingFace Team. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#     http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
from typing import TYPE_CHECKING

# rely on isort to merge the imports
from ...utils import (
    OptionalDependencyNotAvailable,
    _LazyModule,
    is_torch_available,
)


SCREAMING_SNAKE_CASE_  :      Tuple							=      {
    '''configuration_convnextv2''': [
        '''CONVNEXTV2_PRETRAINED_CONFIG_ARCHIVE_MAP''',
        '''ConvNextV2Config''',
    ]
}

try:
     if not is_torch_available():
          raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
     pass
else:
     SCREAMING_SNAKE_CASE_  :      int							=      [
         '''CONVNEXTV2_PRETRAINED_MODEL_ARCHIVE_LIST''',
         '''ConvNextV2ForImageClassification''',
         '''ConvNextV2Model''',
         '''ConvNextV2PreTrainedModel''',
         '''ConvNextV2Backbone''',
     ]


if TYPE_CHECKING:
     from .configuration_convnextva import (
         CONVNEXTV2_PRETRAINED_CONFIG_ARCHIVE_MAP,
         ConvNextVaConfig,
     )

     try:
          if not is_torch_available():
               raise OptionalDependencyNotAvailable()
     except OptionalDependencyNotAvailable:
          pass
     else:
          from .modeling_convnextva import (
              CONVNEXTV2_PRETRAINED_MODEL_ARCHIVE_LIST,
              ConvNextVaBackbone,
              ConvNextVaForImageClassification,
              ConvNextVaModel,
              ConvNextVaPreTrainedModel,
          )

else:
     import sys

     SCREAMING_SNAKE_CASE_  :      Dict							=      _LazyModule(__name__, globals()['''__file__'''], _import_structure)




