




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


snake_case_ : int    		=       logging.get_logger(__name__)

snake_case_ : Union[str, Any]    		=       {
    'alibaba-damo/mgp-str-base': 'https://huggingface.co/alibaba-damo/mgp-str-base/resolve/main/config.json',
}







class __snake_case			(			a		):
   UpperCAmelCase__  :    Dict          =  '''mgp-str'''







   def __init__(      self		:						Dict					,						_snake_case		:						Optional[Any]=[32, 128]					,						_snake_case		:						int=4					,						_snake_case		:						List[str]=3					,						_snake_case		:						Union[str, Any]=27					,						_snake_case		:						Union[str, Any]=38					,						_snake_case		:						int=50257					,						_snake_case		:						str=30522					,						_snake_case		:						Union[str, Any]=768					,						_snake_case		:						Optional[int]=12					,						_snake_case		:						Dict=12					,						_snake_case		:						Optional[Any]=4.0					,						_snake_case		:						int=True					,						_snake_case		:						Union[str, Any]=False					,						_snake_case		:						List[Any]=1e-5					,						_snake_case		:						str=0.0					,						_snake_case		:						Dict=0.0					,						_snake_case		:						Union[str, Any]=0.0					,						_snake_case		:						Optional[int]=False					,						_snake_case		:						Tuple=0.0_2					,						**_snake_case		:						str					,						):

        """simple docstring"""


        super().__init__(**_snake_case)

        UpperCAmelCase_          =							image_size
        UpperCAmelCase_          =							patch_size
        UpperCAmelCase_          =							num_channels
        UpperCAmelCase_          =							max_token_length
        UpperCAmelCase_          =							num_character_labels
        UpperCAmelCase_          =							num_bpe_labels
        UpperCAmelCase_          =							num_wordpiece_labels
        UpperCAmelCase_          =							hidden_size
        UpperCAmelCase_          =							num_hidden_layers
        UpperCAmelCase_          =							num_attention_heads
        UpperCAmelCase_          =							mlp_ratio
        UpperCAmelCase_          =							distilled
        UpperCAmelCase_          =							layer_norm_eps
        UpperCAmelCase_          =							drop_rate
        UpperCAmelCase_          =							qkv_bias
        UpperCAmelCase_          =							attn_drop_rate
        UpperCAmelCase_          =							drop_path_rate
        UpperCAmelCase_          =							output_aa_attentions
        UpperCAmelCase_          =							initializer_range











"""simple docstring"""
from ...configuration_utils import PretrainedConfig
from ...utils import logging


_lowerCAmelCase    :List[str]     =					logging.get_logger(__name__)

_lowerCAmelCase    :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 							_UpperCAmelCase							( a      ):





     '''simple docstring'''



     a__									='''falcon'''
     a__									=['''past_key_values''']





     def __init__(					self       ,	A=6_5_0_2_4       ,	A=4_5_4_4       ,	A=3_2       ,	A=7_1       ,	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=1_1       ,	A=1_1       ,	**A       ,	)							->					Any:
         _UpperCAmelCase							:  int											=    vocab_size
         # Backward compatibility with n_embed kwarg
         _UpperCAmelCase							:  Optional[Any]											=    kwargs.pop('''n_embed'''       ,	A		)
         _UpperCAmelCase							:  int											=    hidden_size if n_embed is None else n_embed
         _UpperCAmelCase							:  List[str]											=    num_hidden_layers
         _UpperCAmelCase							:  Tuple											=    num_attention_heads
         _UpperCAmelCase							:  Optional[int]											=    layer_norm_epsilon
         _UpperCAmelCase							:  Tuple											=    initializer_range
         _UpperCAmelCase							:  Optional[int]											=    use_cache
         _UpperCAmelCase							:  Any											=    hidden_dropout
         _UpperCAmelCase							:  Dict											=    attention_dropout

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

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





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





     @property
     def  __lowerCAmelCase	(					self		)							->					List[Any]:
         return not self.alibi


