

'''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   a__    (				__lowerCAmelCase    ):
   _SCREAMING_SNAKE_CASE       :	List[str]      			=				"""data2vec-text"""


   def __init__(					self     ,							_UpperCamelCase=30522     ,							_UpperCamelCase=768     ,							_UpperCamelCase=12     ,							_UpperCamelCase=12     ,							_UpperCamelCase=3072     ,							_UpperCamelCase="gelu"     ,							_UpperCamelCase=0.1     ,							_UpperCamelCase=0.1     ,							_UpperCamelCase=512     ,							_UpperCamelCase=2     ,							_UpperCamelCase=0.0_2     ,							_UpperCamelCase=1E-1_2     ,							_UpperCamelCase=1     ,							_UpperCamelCase=0     ,							_UpperCamelCase=2     ,							_UpperCamelCase="absolute"     ,							_UpperCamelCase=True     ,							_UpperCamelCase=None     ,							**_UpperCamelCase     ,							):





      """simple docstring"""





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

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




class   a__    (				__lowerCAmelCase    ):


   @property
   def 		_lowerCamelCase  (					self    ):





      """simple docstring"""





      if self.task == "multiple-choice":
         _lowercase     : Dict     	=  {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


UpperCamelCase_		:     int          =		logging.get_logger(__name__)

UpperCamelCase_		:     Any          =		{
    '''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   _a							(		__lowerCAmelCase				):
     SCREAMING_SNAKE_CASE_				:       List[str]       							=		"""falcon"""
     SCREAMING_SNAKE_CASE_				:       Optional[int]       							=		["""past_key_values"""]






     def __init__(					self   ,_SCREAMING_SNAKE_CASE=65_024   ,_SCREAMING_SNAKE_CASE=4_544   ,_SCREAMING_SNAKE_CASE=32   ,_SCREAMING_SNAKE_CASE=71   ,_SCREAMING_SNAKE_CASE=1e-5   ,_SCREAMING_SNAKE_CASE=0.0_2   ,_SCREAMING_SNAKE_CASE=True   ,_SCREAMING_SNAKE_CASE=0.0   ,_SCREAMING_SNAKE_CASE=0.0   ,_SCREAMING_SNAKE_CASE=None   ,_SCREAMING_SNAKE_CASE=False   ,_SCREAMING_SNAKE_CASE=False   ,_SCREAMING_SNAKE_CASE=True   ,_SCREAMING_SNAKE_CASE=True   ,_SCREAMING_SNAKE_CASE=False   ,_SCREAMING_SNAKE_CASE=11   ,_SCREAMING_SNAKE_CASE=11   ,**_SCREAMING_SNAKE_CASE   ,)				->     Dict:
          _snake_case				= vocab_size
          # Backward compatibility with n_embed kwarg
          _snake_case				= kwargs.pop("n_embed"   ,_SCREAMING_SNAKE_CASE       )
          _snake_case				= hidden_size if n_embed is None else n_embed
          _snake_case				= num_hidden_layers
          _snake_case				= num_attention_heads
          _snake_case				= layer_norm_epsilon
          _snake_case				= initializer_range
          _snake_case				= use_cache
          _snake_case				= hidden_dropout
          _snake_case				= attention_dropout

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

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






     @property
     def 							_lowercase      (					self       )				->     Union[str, Any]:
          return self.hidden_size // self.num_attention_heads






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


