
"""simple docstring"""



from collections import OrderedDict
from typing import Mapping

from ...configuration_utils import PretrainedConfig
from ...onnx import OnnxConfig
from ...utils import logging


_snake_case        =    logging.get_logger(__name__)

_snake_case        =    {
    '''facebook/data2vec-text-base''': '''https://huggingface.co/data2vec/resolve/main/config.json''',
}
class 							_SCREAMING_SNAKE_CASE	(	UpperCAmelCase				):






				'''simple docstring'''



				SCREAMING_SNAKE_CASE_:				Any				=       "data2vec-text"


				def __init__(       self						:      str					,  UpperCAmelCase_						:      str=30_522					,  UpperCAmelCase_						:      Dict=768					,  UpperCAmelCase_						:      Tuple=12					,  UpperCAmelCase_						:      List[str]=12					,  UpperCAmelCase_						:      int=3_072					,  UpperCAmelCase_						:      Union[str, Any]="gelu"					,  UpperCAmelCase_						:      str=0.1					,  UpperCAmelCase_						:      str=0.1					,  UpperCAmelCase_						:      Dict=512					,  UpperCAmelCase_						:      Optional[Any]=2					,  UpperCAmelCase_						:      List[str]=0.02					,  UpperCAmelCase_						:      Optional[int]=1E-1_2					,  UpperCAmelCase_						:      Optional[int]=1					,  UpperCAmelCase_						:      Union[str, Any]=0					,  UpperCAmelCase_						:      Tuple=2					,  UpperCAmelCase_						:      Optional[Any]="absolute"					,  UpperCAmelCase_						:      Any=True					,  UpperCAmelCase_						:      List[Any]=None					,  **UpperCAmelCase_						:      Optional[int]					,  )		->	Any:







											"""simple docstring"""




											super().__init__(pad_token_id=UpperCAmelCase_					,  bos_token_id=UpperCAmelCase_					,  eos_token_id=UpperCAmelCase_					,  **UpperCAmelCase_	)

											_lowerCAmelCase							=      vocab_size
											_lowerCAmelCase							=      hidden_size
											_lowerCAmelCase							=      num_hidden_layers
											_lowerCAmelCase							=      num_attention_heads
											_lowerCAmelCase							=      hidden_act
											_lowerCAmelCase							=      intermediate_size
											_lowerCAmelCase							=      hidden_dropout_prob
											_lowerCAmelCase							=      attention_probs_dropout_prob
											_lowerCAmelCase							=      max_position_embeddings
											_lowerCAmelCase							=      type_vocab_size
											_lowerCAmelCase							=      initializer_range
											_lowerCAmelCase							=      layer_norm_eps
											_lowerCAmelCase							=      position_embedding_type
											_lowerCAmelCase							=      use_cache
											_lowerCAmelCase							=      classifier_dropout






class 							_SCREAMING_SNAKE_CASE	(	UpperCAmelCase				):






				'''simple docstring'''



				@property
				def 					__lowerCamelCase						(       self						:      int	)		->	Optional[Any]:







											"""simple docstring"""




											if self.task == "multiple-choice":
																		_lowerCAmelCase							=      {0: 'batch', 1: 'choice', 2: 'sequence'}
											else:
																		_lowerCAmelCase							=      {0: 'batch', 1: 'sequence'}
											return OrderedDict(
											    [
											        ('input_ids', dynamic_axis),
											        ('attention_mask', dynamic_axis),
											    ]	)












"""simple docstring"""






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


lowercase__			=		logging.get_logger(__name__)

lowercase__			=		{"""openai-gpt""": """https://huggingface.co/openai-gpt/resolve/main/config.json"""}






class lowerCAmelCase__      (	lowercase		):






			'''simple docstring'''



			lowerCamelCase__ =     """openai-gpt"""
			lowerCamelCase__ =     {
			    """max_position_embeddings""": """n_positions""",
			    """hidden_size""": """n_embd""",
			    """num_attention_heads""": """n_head""",
			    """num_hidden_layers""": """n_layer""",
			}
			def __init__(    self    , lowercase=40478    , lowercase=512    , lowercase=768    , lowercase=12    , lowercase=12    , lowercase="gelu"    , lowercase=0.1    , lowercase=0.1    , lowercase=0.1    , lowercase=1E-5    , lowercase=0.02    , lowercase="cls_index"    , lowercase=True    , lowercase=None    , lowercase=True    , lowercase=0.1    , **lowercase    , ):
							_lowerCamelCase	:     Tuple       =       vocab_size
							_lowerCamelCase	:     List[str]       =       n_positions
							_lowerCamelCase	:     Tuple       =       n_embd
							_lowerCamelCase	:     Optional[int]       =       n_layer
							_lowerCamelCase	:     List[Any]       =       n_head
							_lowerCamelCase	:     Dict       =       afn
							_lowerCamelCase	:     Union[str, Any]       =       resid_pdrop
							_lowerCamelCase	:     Dict       =       embd_pdrop
							_lowerCamelCase	:     List[Any]       =       attn_pdrop
							_lowerCamelCase	:     Any       =       layer_norm_epsilon
							_lowerCamelCase	:     List[Any]       =       initializer_range
							_lowerCamelCase	:     List[Any]       =       summary_type
							_lowerCamelCase	:     List[str]       =       summary_use_proj
							_lowerCamelCase	:     Tuple       =       summary_activation
							_lowerCamelCase	:     int       =       summary_first_dropout
							_lowerCamelCase	:     str       =       summary_proj_to_labels
							super().__init__(**lowercase    )