






'''simple docstring'''





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


_UpperCamelCase		:		Tuple								=			logging.get_logger(__name__)

_UpperCamelCase		:		Union[str, Any]								=			{
    '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):
					a_       =			"opt"
					a_       =			["past_key_values"]




					def __init__(       self       :						List[str]							,				_A       :						Any=5_02_72							,				_A       :						Any=7_68							,				_A       :						Optional[int]=12							,				_A       :						Optional[Any]=30_72							,				_A       :						Optional[Any]=20_48							,				_A       :						str=True							,				_A       :						List[str]=False							,				_A       :						Optional[Any]=None							,				_A       :						Optional[int]=0.1							,				_A       :						Optional[Any]=0.0							,				_A       :						Optional[Any]=12							,				_A       :						Optional[Any]="relu"							,				_A       :						List[str]=0.0							,				_A       :						Optional[Any]=0.02							,				_A       :						Any=True							,				_A       :						List[str]=1							,				_A       :						List[str]=2							,				_A       :						Optional[Any]=2							,				_A       :						List[str]=True							,				_A       :						str=True							,				**_A       :						str							,				)  ->    List[Any]:
								super().__init__(
								    pad_token_id=_A							,				bos_token_id=_A							,				eos_token_id=_A							,				**_A							,				)
								UpperCAmelCase_     :   List[str]       =   vocab_size
								UpperCAmelCase_     :   Optional[Any]       =   max_position_embeddings
								UpperCAmelCase_     :   Any       =   num_attention_heads
								UpperCAmelCase_     :   Union[str, Any]       =   word_embed_proj_dim if word_embed_proj_dim is not None else hidden_size
								UpperCAmelCase_     :   str       =   ffn_dim
								UpperCAmelCase_     :   str       =   hidden_size
								UpperCAmelCase_     :   List[str]       =   num_hidden_layers
								UpperCAmelCase_     :   List[str]       =   dropout
								UpperCAmelCase_     :   Optional[int]       =   attention_dropout
								UpperCAmelCase_     :   Optional[Any]       =   activation_function
								UpperCAmelCase_     :   List[Any]       =   init_std
								UpperCAmelCase_     :   Any       =   layerdrop
								UpperCAmelCase_     :   Union[str, Any]       =   use_cache
								UpperCAmelCase_     :   Optional[int]       =   do_layer_norm_before
								# We keep these variables at `True` for backward compatibility.
								UpperCAmelCase_     :   str       =   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_     :   Dict       =   _remove_final_layer_norm










'''simple docstring'''





from typing import TYPE_CHECKING

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


_UpperCamelCase		:		Optional[Any]								=			{'configuration_vit_hybrid': ['VIT_HYBRID_PRETRAINED_CONFIG_ARCHIVE_MAP', 'ViTHybridConfig']}

try:
						if not is_torch_available():
												raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
						pass
else:
						_UpperCamelCase		:		Optional[int]								=			[
						    'VIT_HYBRID_PRETRAINED_MODEL_ARCHIVE_LIST',
						    'ViTHybridForImageClassification',
						    'ViTHybridModel',
						    'ViTHybridPreTrainedModel',
						]

try:
						if not is_vision_available():
												raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
						pass
else:
						_UpperCamelCase		:		str								=			['ViTHybridImageProcessor']


if TYPE_CHECKING:
						from .configuration_vit_hybrid import VIT_HYBRID_PRETRAINED_CONFIG_ARCHIVE_MAP, ViTHybridConfig

						try:
												if not is_torch_available():
																		raise OptionalDependencyNotAvailable()
						except OptionalDependencyNotAvailable:
												pass
						else:
												from .modeling_vit_hybrid import (
												    VIT_HYBRID_PRETRAINED_MODEL_ARCHIVE_LIST,
												    ViTHybridForImageClassification,
												    ViTHybridModel,
												    ViTHybridPreTrainedModel,
												)

						try:
												if not is_vision_available():
																		raise OptionalDependencyNotAvailable()
						except OptionalDependencyNotAvailable:
												pass
						else:
												from .image_processing_vit_hybrid import ViTHybridImageProcessor


else:
						import sys

						_UpperCamelCase		:		Tuple								=			_LazyModule(__name__, globals()['__file__'], _import_structure, module_spec=__spec__)


