






'''simple docstring'''

from collections import OrderedDict
from typing import Mapping

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


A:      Dict  				=				logging.get_logger(__name__)

A:      str  				=				{
    "facebook/data2vec-text-base": "https://huggingface.co/data2vec/resolve/main/config.json",
}






class 							__magic_name__     (	UpperCAmelCase_				):







	"""simple docstring"""



	SCREAMING_SNAKE_CASE_					:      Optional[int]        =  'data2vec-text'
	def __init__(							self  ,      _lowercase=3_0522  ,      _lowercase=768  ,      _lowercase=12  ,      _lowercase=12  ,      _lowercase=3072  ,      _lowercase="gelu"  ,      _lowercase=0.1  ,      _lowercase=0.1  ,      _lowercase=512  ,      _lowercase=2  ,      _lowercase=0.02  ,      _lowercase=1E-1_2  ,      _lowercase=1  ,      _lowercase=0  ,      _lowercase=2  ,      _lowercase="absolute"  ,      _lowercase=True  ,      _lowercase=None  ,      **_lowercase  ,      )						->  List[Any]:
							super().__init__(pad_token_id=_lowercase  ,      bos_token_id=_lowercase  ,      eos_token_id=_lowercase  ,      **_lowercase       )

							lowercase_      :   Dict        =			vocab_size
							lowercase_      :   Optional[int]        =			hidden_size
							lowercase_      :   Union[str, Any]        =			num_hidden_layers
							lowercase_      :   Tuple        =			num_attention_heads
							lowercase_      :   str        =			hidden_act
							lowercase_      :   Any        =			intermediate_size
							lowercase_      :   Union[str, Any]        =			hidden_dropout_prob
							lowercase_      :   List[str]        =			attention_probs_dropout_prob
							lowercase_      :   int        =			max_position_embeddings
							lowercase_      :   Tuple        =			type_vocab_size
							lowercase_      :   Union[str, Any]        =			initializer_range
							lowercase_      :   Any        =			layer_norm_eps
							lowercase_      :   List[Any]        =			position_embedding_type
							lowercase_      :   List[str]        =			use_cache
							lowercase_      :   List[Any]        =			classifier_dropout






class 							__magic_name__     (	UpperCAmelCase_				):







	"""simple docstring"""



	@property
	def        lowerCamelCase__		(							self       )						->  Mapping[str, Mapping[int, str]]:
							if self.task == "multiple-choice":
													lowercase_      :   List[str]        =			{0: 'batch', 1: 'choice', 2: 'sequence'}
							else:
													lowercase_      :   Union[str, Any]        =			{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


A:      int  				=				logging.get_logger(__name__)

A:      int  				=				{
    "bigcode/gpt_bigcode-santacoder": "https://huggingface.co/bigcode/gpt_bigcode-santacoder/resolve/main/config.json",
}






class 							__magic_name__     (	UpperCAmelCase_				):







	"""simple docstring"""



	SCREAMING_SNAKE_CASE_					:      List[str]        =  'gpt_bigcode'
	SCREAMING_SNAKE_CASE_					:      int        =  ['past_key_values']
	SCREAMING_SNAKE_CASE_					:      Any        =  {
	    'hidden_size': 'n_embd',
	    'max_position_embeddings': 'n_positions',
	    'num_attention_heads': 'n_head',
	    'num_hidden_layers': 'n_layer',
	}
	def __init__(							self  ,      _lowercase=5_0257  ,      _lowercase=1024  ,      _lowercase=768  ,      _lowercase=12  ,      _lowercase=12  ,      _lowercase=None  ,      _lowercase="gelu_pytorch_tanh"  ,      _lowercase=0.1  ,      _lowercase=0.1  ,      _lowercase=0.1  ,      _lowercase=1E-5  ,      _lowercase=0.02  ,      _lowercase=True  ,      _lowercase=True  ,      _lowercase=5_0256  ,      _lowercase=5_0256  ,      _lowercase=True  ,      _lowercase=True  ,      _lowercase=True  ,      **_lowercase  ,      )						->  Any:
							lowercase_      :   Tuple        =			vocab_size
							lowercase_      :   str        =			n_positions
							lowercase_      :   List[str]        =			n_embd
							lowercase_      :   str        =			n_layer
							lowercase_      :   Optional[Any]        =			n_head
							lowercase_      :   Optional[int]        =			n_inner
							lowercase_      :   Union[str, Any]        =			activation_function
							lowercase_      :   Dict        =			resid_pdrop
							lowercase_      :   str        =			embd_pdrop
							lowercase_      :   Optional[Any]        =			attn_pdrop
							lowercase_      :   List[Any]        =			layer_norm_epsilon
							lowercase_      :   Optional[int]        =			initializer_range
							lowercase_      :   List[Any]        =			scale_attn_weights
							lowercase_      :   Any        =			use_cache
							lowercase_      :   List[str]        =			attention_softmax_in_fpaa
							lowercase_      :   Any        =			scale_attention_softmax_in_fpaa
							lowercase_      :   Optional[Any]        =			multi_query

							lowercase_      :   Optional[Any]        =			bos_token_id
							lowercase_      :   Optional[Any]        =			eos_token_id

							super().__init__(bos_token_id=_lowercase  ,      eos_token_id=_lowercase  ,      **_lowercase       )
