


"""simple docstring"""



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


UpperCAmelCase      		=			logging.get_logger(__name__)

UpperCAmelCase      		=			{
    '''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 					__magic_name__		(			__UpperCAmelCase     ):
       __A			:      Optional[int]        =   "falcon"
       __A			:      Optional[Any]        =   ["past_key_values"]






       def __init__(   self  :    Dict  ,     snake_case__  :    Optional[Any]=6_5_0_2_4  ,     snake_case__  :    Union[str, Any]=4_5_4_4  ,     snake_case__  :    List[str]=3_2  ,     snake_case__  :    Dict=7_1  ,     snake_case__  :    List[Any]=1e-5  ,     snake_case__  :    Tuple=0.02  ,     snake_case__  :    Optional[int]=True  ,     snake_case__  :    List[Any]=0.0  ,     snake_case__  :    Dict=0.0  ,     snake_case__  :    Tuple=None  ,     snake_case__  :    Optional[Any]=False  ,     snake_case__  :    Any=False  ,     snake_case__  :    Dict=True  ,     snake_case__  :    Dict=True  ,     snake_case__  :    Tuple=False  ,     snake_case__  :    int=1_1  ,     snake_case__  :    List[str]=1_1  ,     **snake_case__  :    Dict  ,     ):

              '''simple docstring'''






              lowercase		:str       							=				vocab_size
              # Backward compatibility with n_embed kwarg
              lowercase		:List[Any]       							=				kwargs.pop('''n_embed'''  ,     snake_case__				)
              lowercase		:Union[str, Any]       							=				hidden_size if n_embed is None else n_embed
              lowercase		:Dict       							=				num_hidden_layers
              lowercase		:str       							=				num_attention_heads
              lowercase		:Union[str, Any]       							=				layer_norm_epsilon
              lowercase		:int       							=				initializer_range
              lowercase		:List[str]       							=				use_cache
              lowercase		:List[str]       							=				hidden_dropout
              lowercase		:Optional[Any]       							=				attention_dropout

              lowercase		:List[Any]       							=				bos_token_id
              lowercase		:str       							=				eos_token_id
              lowercase		:Optional[int]       							=				num_attention_heads if num_kv_heads is None else num_kv_heads
              lowercase		:int       							=				alibi
              lowercase		:str       							=				new_decoder_architecture
              lowercase		:str       							=				multi_query  # Ignored when new_decoder_architecture is True
              lowercase		:int       							=				parallel_attn
              lowercase		:Dict       							=				bias

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






       @property
       def  __snake_case						(   self  :    str				):

              '''simple docstring'''






              return self.hidden_size // self.num_attention_heads







       @property
       def  __snake_case						(   self  :    List[Any]				):

              '''simple docstring'''






              return not self.alibi





"""simple docstring"""



from collections import OrderedDict
from typing import Mapping

from packaging import version

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


UpperCAmelCase      		=			logging.get_logger(__name__)

UpperCAmelCase      		=			{
    '''facebook/deit-base-distilled-patch16-224''': (
        '''https://huggingface.co/facebook/deit-base-patch16-224/resolve/main/config.json'''
    ),
    # See all DeiT models at https://huggingface.co/models?filter=deit
}
class 					__magic_name__		(			__UpperCAmelCase     ):
       __A			:      Tuple        =   "deit"






       def __init__(   self  :    List[str]  ,     snake_case__  :    int=7_6_8  ,     snake_case__  :    List[Any]=1_2  ,     snake_case__  :    Dict=1_2  ,     snake_case__  :    List[Any]=3_0_7_2  ,     snake_case__  :    Optional[int]="gelu"  ,     snake_case__  :    Dict=0.0  ,     snake_case__  :    str=0.0  ,     snake_case__  :    List[str]=0.02  ,     snake_case__  :    Optional[int]=1e-1_2  ,     snake_case__  :    Any=2_2_4  ,     snake_case__  :    Optional[int]=1_6  ,     snake_case__  :    int=3  ,     snake_case__  :    str=True  ,     snake_case__  :    Optional[int]=1_6  ,     **snake_case__  :    List[Any]  ,     ):

              '''simple docstring'''






              super().__init__(**snake_case__				)

              lowercase		:List[str]       							=				hidden_size
              lowercase		:Union[str, Any]       							=				num_hidden_layers
              lowercase		:Optional[Any]       							=				num_attention_heads
              lowercase		:Optional[Any]       							=				intermediate_size
              lowercase		:int       							=				hidden_act
              lowercase		:int       							=				hidden_dropout_prob
              lowercase		:Dict       							=				attention_probs_dropout_prob
              lowercase		:Optional[int]       							=				initializer_range
              lowercase		:Tuple       							=				layer_norm_eps
              lowercase		:Optional[int]       							=				image_size
              lowercase		:Union[str, Any]       							=				patch_size
              lowercase		:Optional[Any]       							=				num_channels
              lowercase		:Tuple       							=				qkv_bias
              lowercase		:Optional[Any]       							=				encoder_stride







class 					__magic_name__		(			__UpperCAmelCase     ):
       __A			:      Optional[int]        =   version.parse("1.11"     )






       @property
       def  __snake_case						(   self  :    int				):

              '''simple docstring'''






              return OrderedDict(
                  [
                      ('''pixel_values''', {0: '''batch''', 1: '''num_channels''', 2: '''height''', 3: '''width'''}),
                  ]				)







       @property
       def  __snake_case						(   self  :    Optional[int]				):

              '''simple docstring'''






              return 1e-4

