



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


A__  :  int       = logging.get_logger(__name__)

A__  :  Tuple       = {
    '''dandelin/vilt-b32-mlm''': '''https://huggingface.co/dandelin/vilt-b32-mlm/blob/main/config.json'''
}



class     __snake_case						(					UpperCamelCase_						):
							_a      				=			'''vilt'''




							def __init__(	self					:	Dict    ,    A_					:	Tuple=3_0_5_2_2    ,    A_					:	Tuple=2    ,    A_					:	List[Any]=2    ,    A_					:	Optional[Any]=4_0    ,    A_					:	Union[str, Any]=7_6_8    ,    A_					:	str=1_2    ,    A_					:	Optional[int]=1_2    ,    A_					:	Tuple=3_0_7_2    ,    A_					:	Optional[Any]="gelu"    ,    A_					:	Dict=0.0    ,    A_					:	Union[str, Any]=0.0    ,    A_					:	Dict=0.02    ,    A_					:	Optional[int]=1e-12    ,    A_					:	Dict=3_8_4    ,    A_					:	Union[str, Any]=3_2    ,    A_					:	int=3    ,    A_					:	Dict=True    ,    A_					:	int=-1    ,    A_					:	Any=False    ,    A_					:	List[Any]=-1    ,    **A_					:	Union[str, Any]    ,    ):
									super().__init__(tie_word_embeddings=A_    ,    **A_)

									lowerCAmelCase_      :					str     =			vocab_size
									lowerCAmelCase_      :					Tuple     =			type_vocab_size
									lowerCAmelCase_      :					Optional[Any]     =			modality_type_vocab_size
									lowerCAmelCase_      :					Any     =			max_position_embeddings

									lowerCAmelCase_      :					Optional[int]     =			hidden_size
									lowerCAmelCase_      :					Dict     =			num_hidden_layers
									lowerCAmelCase_      :					int     =			num_attention_heads
									lowerCAmelCase_      :					Optional[Any]     =			intermediate_size
									lowerCAmelCase_      :					Tuple     =			hidden_act
									lowerCAmelCase_      :					Optional[int]     =			hidden_dropout_prob
									lowerCAmelCase_      :					List[str]     =			attention_probs_dropout_prob
									lowerCAmelCase_      :					Optional[Any]     =			initializer_range
									lowerCAmelCase_      :					str     =			layer_norm_eps

									lowerCAmelCase_      :					Tuple     =			image_size
									lowerCAmelCase_      :					str     =			patch_size
									lowerCAmelCase_      :					Tuple     =			num_channels
									lowerCAmelCase_      :					Optional[int]     =			qkv_bias
									lowerCAmelCase_      :					Dict     =			max_image_length
									lowerCAmelCase_      :					Tuple     =			num_images










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


A__  :  Tuple       = logging.get_logger(__name__)

A__  :  Tuple       = {
    '''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     __snake_case						(					UpperCamelCase_						):
							_a      				=			'''opt'''
							_a      				=			['''past_key_values''']




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





