'''simple docstring'''

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


lowercase_     		= logging.get_logger(__name__)

lowercase_     		= {
    '''tiiuae/falcon-40b''': '''https://huggingface.co/tiiuae/falcon-40b/resolve/main/config.json''',
    '''tiiuae/falcon-7b''': '''https://huggingface.co/tiiuae/falcon-7b/resolve/main/config.json''',
}
class   SCREAMING_SNAKE_CASE			(						__lowercase):







		"""simple docstring"""
		lowercase   :      int       =							"""falcon"""
		lowercase   :      Tuple       =							["""past_key_values"""]






		def __init__(   self		,						__A=6_5024		,						__A=4544		,						__A=32		,						__A=71		,						__A=1E-5		,						__A=0.02		,						__A=True		,						__A=0.0		,						__A=0.0		,						__A=None		,						__A=False		,						__A=False		,						__A=True		,						__A=True		,						__A=False		,						__A=11		,						__A=11		,						**__A		,						) ->     str:
								_lowerCAmelCase										=vocab_size
								# Backward compatibility with n_embed kwarg
								_lowerCAmelCase										=kwargs.pop('n_embed'		,						__A				)
								_lowerCAmelCase										=hidden_size if n_embed is None else n_embed
								_lowerCAmelCase										=num_hidden_layers
								_lowerCAmelCase										=num_attention_heads
								_lowerCAmelCase										=layer_norm_epsilon
								_lowerCAmelCase										=initializer_range
								_lowerCAmelCase										=use_cache
								_lowerCAmelCase										=hidden_dropout
								_lowerCAmelCase										=attention_dropout

								_lowerCAmelCase										=bos_token_id
								_lowerCAmelCase										=eos_token_id
								_lowerCAmelCase										=num_attention_heads if num_kv_heads is None else num_kv_heads
								_lowerCAmelCase										=alibi
								_lowerCAmelCase										=new_decoder_architecture
								_lowerCAmelCase										=multi_query  # Ignored when new_decoder_architecture is True
								_lowerCAmelCase										=parallel_attn
								_lowerCAmelCase										=bias

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






		@property
		def 		UpperCamelCase__       (   self				) ->     List[Any]:
								return self.hidden_size // self.num_attention_heads






		@property
		def 		UpperCamelCase__       (   self				) ->     Optional[int]:
								return not self.alibi






'''simple docstring'''

from collections import OrderedDict
from typing import Mapping

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


lowercase_     		= logging.get_logger(__name__)

lowercase_     		= {
    '''facebook/data2vec-text-base''': '''https://huggingface.co/data2vec/resolve/main/config.json''',
}
class   SCREAMING_SNAKE_CASE			(						__lowercase):







		"""simple docstring"""
		lowercase   :      List[str]       =							'data2vec-text'






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

								_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			(						__lowercase):







		"""simple docstring"""






		@property
		def 		UpperCamelCase__       (   self				) ->     Mapping[str, Mapping[int, str]]:
								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),
								    ]				)





