


'''simple docstring'''



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


_lowercase      :      int            =					logging.get_logger(__name__)

_lowercase      :      Optional[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__(       snake_case__	):
				__magic_name__    :				Optional[Any]  		=	"falcon"
				__magic_name__    :				List[Any]  		=	["past_key_values"]




				def __init__(		self      :			int				,   lowerCAmelCase      :			Any=65024				,   lowerCAmelCase      :			int=4544				,   lowerCAmelCase      :			List[Any]=32				,   lowerCAmelCase      :			Any=71				,   lowerCAmelCase      :			str=1E-5				,   lowerCAmelCase      :			Any=0.02				,   lowerCAmelCase      :			Optional[Any]=True				,   lowerCAmelCase      :			str=0.0				,   lowerCAmelCase      :			List[Any]=0.0				,   lowerCAmelCase      :			int=None				,   lowerCAmelCase      :			Optional[Any]=False				,   lowerCAmelCase      :			List[Any]=False				,   lowerCAmelCase      :			Dict=True				,   lowerCAmelCase      :			Optional[Any]=True				,   lowerCAmelCase      :			Tuple=False				,   lowerCAmelCase      :			Optional[Any]=11				,   lowerCAmelCase      :			Dict=11				,   **lowerCAmelCase      :			Union[str, Any]				,   )->					Optional[Any]:

										"""simple docstring"""




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

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

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




				@property
				def 					a__(		self      :			Any				)->					Dict:

										"""simple docstring"""




										return self.hidden_size // self.num_attention_heads





				@property
				def 					a__(		self      :			str				)->					Union[str, Any]:

										"""simple docstring"""




										return not self.alibi









'''simple docstring'''



from typing import TYPE_CHECKING

from ...utils import OptionalDependencyNotAvailable, _LazyModule, is_torch_available, is_vision_available


_lowercase      :      Union[str, Any]            =					{
    """configuration_poolformer""": [
        """POOLFORMER_PRETRAINED_CONFIG_ARCHIVE_MAP""",
        """PoolFormerConfig""",
        """PoolFormerOnnxConfig""",
    ]
}

try:
	if not is_vision_available():
		raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
	pass
else:
	_lowercase      :      List[Any]            =					["""PoolFormerFeatureExtractor"""]
	_lowercase      :      Any            =					["""PoolFormerImageProcessor"""]

try:
	if not is_torch_available():
		raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
	pass
else:
	_lowercase      :      Tuple            =					[
	    """POOLFORMER_PRETRAINED_MODEL_ARCHIVE_LIST""",
	    """PoolFormerForImageClassification""",
	    """PoolFormerModel""",
	    """PoolFormerPreTrainedModel""",
	]


if TYPE_CHECKING:
	from .configuration_poolformer import (
	    POOLFORMER_PRETRAINED_CONFIG_ARCHIVE_MAP,
	    PoolFormerConfig,
	    PoolFormerOnnxConfig,
	)

	try:
		if not is_vision_available():
			raise OptionalDependencyNotAvailable()
	except OptionalDependencyNotAvailable:
		pass
	else:
		from .feature_extraction_poolformer import PoolFormerFeatureExtractor
		from .image_processing_poolformer import PoolFormerImageProcessor

	try:
		if not is_torch_available():
			raise OptionalDependencyNotAvailable()
	except OptionalDependencyNotAvailable:
		pass
	else:
		from .modeling_poolformer import (
		    POOLFORMER_PRETRAINED_MODEL_ARCHIVE_LIST,
		    PoolFormerForImageClassification,
		    PoolFormerModel,
		    PoolFormerPreTrainedModel,
		)


else:
	import sys

	_lowercase      :      Dict            =					_LazyModule(__name__, globals()["""__file__"""], _import_structure)





