




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


_lowerCamelCase			:	int							 =     logging.get_logger(__name__)

_lowerCamelCase			:	Optional[Any]							 =     {
    """google/mobilenet_v2_1.4_224""": """https://huggingface.co/google/mobilenet_v2_1.4_224/resolve/main/config.json""",
    """google/mobilenet_v2_1.0_224""": """https://huggingface.co/google/mobilenet_v2_1.0_224/resolve/main/config.json""",
    """google/mobilenet_v2_0.75_160""": """https://huggingface.co/google/mobilenet_v2_0.75_160/resolve/main/config.json""",
    """google/mobilenet_v2_0.35_96""": """https://huggingface.co/google/mobilenet_v2_0.35_96/resolve/main/config.json""",
    # See all MobileNetV2 models at https://huggingface.co/models?filter=mobilenet_v2
}


class        UpperCamelCase_					(				UpperCAmelCase__  ):

    '''simple docstring'''






    UpperCAmelCase__													=   '''mobilenet_v2'''


    def __init__(    self   :			Any      ,				UpperCAmelCase__   :			Any=3      ,				UpperCAmelCase__   :			Dict=224      ,				UpperCAmelCase__   :			Optional[int]=1.0      ,				UpperCAmelCase__   :			Optional[int]=8      ,				UpperCAmelCase__   :			int=8      ,				UpperCAmelCase__   :			Any=6      ,				UpperCAmelCase__   :			str=32      ,				UpperCAmelCase__   :			List[str]=True      ,				UpperCAmelCase__   :			Union[str, Any]=True      ,				UpperCAmelCase__   :			Any="relu6"      ,				UpperCAmelCase__   :			str=True      ,				UpperCAmelCase__   :			Dict=0.8      ,				UpperCAmelCase__   :			List[Any]=0.02      ,				UpperCAmelCase__   :			Optional[int]=0.001      ,				UpperCAmelCase__   :			int=255      ,				**UpperCAmelCase__   :			Dict      ,				)		->int:





           '''simple docstring'''

           super().__init__(**UpperCAmelCase__)

           if depth_multiplier <= 0:
                  raise ValueError('''depth_multiplier must be greater than zero.''')

           A__   				=					num_channels
           A__   				=					image_size
           A__   				=					depth_multiplier
           A__   				=					depth_divisible_by
           A__   				=					min_depth
           A__   				=					expand_ratio
           A__   				=					output_stride
           A__   				=					first_layer_is_expansion
           A__   				=					finegrained_output
           A__   				=					hidden_act
           A__   				=					tf_padding
           A__   				=					classifier_dropout_prob
           A__   				=					initializer_range
           A__   				=					layer_norm_eps
           A__   				=					semantic_loss_ignore_index


class        UpperCamelCase_					(				UpperCAmelCase__  ):

    '''simple docstring'''






    UpperCAmelCase__													=   version.parse('''1.11'''  )


    @property
    def  SCREAMING_SNAKE_CASE							(    self   :			int)		->Mapping[str, Mapping[int, str]]:





           '''simple docstring'''

           return OrderedDict([('''pixel_values''', {0: '''batch'''})])


    @property
    def  SCREAMING_SNAKE_CASE							(    self   :			List[Any])		->Mapping[str, Mapping[int, str]]:





           '''simple docstring'''

           if self.task == "image-classification":
                  return OrderedDict([('''logits''', {0: '''batch'''})])
           else:
                  return OrderedDict([('''last_hidden_state''', {0: '''batch'''}), ('''pooler_output''', {0: '''batch'''})])





    @property
    def  SCREAMING_SNAKE_CASE							(    self   :			Optional[Any])		->float:





           '''simple docstring'''

           return 1e-4








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


_lowerCamelCase			:	Tuple							 =     logging.get_logger(__name__)

_lowerCamelCase			:	Tuple							 =     {
    """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_					(				UpperCAmelCase__  ):

    '''simple docstring'''






    UpperCAmelCase__													=   '''falcon'''
    UpperCAmelCase__													=   ['''past_key_values''']


    def __init__(    self   :			Optional[Any]      ,				UpperCAmelCase__   :			str=65_024      ,				UpperCAmelCase__   :			List[Any]=4_544      ,				UpperCAmelCase__   :			Optional[Any]=32      ,				UpperCAmelCase__   :			Dict=71      ,				UpperCAmelCase__   :			Any=1e-5      ,				UpperCAmelCase__   :			Optional[int]=0.02      ,				UpperCAmelCase__   :			Optional[int]=True      ,				UpperCAmelCase__   :			Union[str, Any]=0.0      ,				UpperCAmelCase__   :			List[str]=0.0      ,				UpperCAmelCase__   :			str=None      ,				UpperCAmelCase__   :			Dict=False      ,				UpperCAmelCase__   :			List[str]=False      ,				UpperCAmelCase__   :			Optional[Any]=True      ,				UpperCAmelCase__   :			Optional[Any]=True      ,				UpperCAmelCase__   :			Optional[Any]=False      ,				UpperCAmelCase__   :			Dict=11      ,				UpperCAmelCase__   :			str=11      ,				**UpperCAmelCase__   :			Dict      ,				)		->Any:





           '''simple docstring'''

           A__   				=					vocab_size
           # Backward compatibility with n_embed kwarg
           A__   				=					kwargs.pop('''n_embed'''      ,				UpperCAmelCase__)
           A__   				=					hidden_size if n_embed is None else n_embed
           A__   				=					num_hidden_layers
           A__   				=					num_attention_heads
           A__   				=					layer_norm_epsilon
           A__   				=					initializer_range
           A__   				=					use_cache
           A__   				=					hidden_dropout
           A__   				=					attention_dropout

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

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


    @property
    def  SCREAMING_SNAKE_CASE							(    self   :			str)		->int:





           '''simple docstring'''

           return self.hidden_size // self.num_attention_heads





    @property
    def  SCREAMING_SNAKE_CASE							(    self   :			str)		->Dict:





           '''simple docstring'''

           return not self.alibi


