


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


SCREAMING_SNAKE_CASE       :      str												= logging.get_logger(__name__)

SCREAMING_SNAKE_CASE       :      List[str]												= {
    "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 _lowerCamelCase(						_a   ):
       lowercase_ :	Optional[int]     =			"""falcon"""
       lowercase_ :	Dict     =			["""past_key_values"""]
       def __init__(					self,      lowerCamelCase=6_50_24,      lowerCamelCase=45_44,      lowerCamelCase=32,      lowerCamelCase=71,      lowerCamelCase=1E-5,      lowerCamelCase=0.0_2,      lowerCamelCase=True,      lowerCamelCase=0.0,      lowerCamelCase=0.0,      lowerCamelCase=None,      lowerCamelCase=False,      lowerCamelCase=False,      lowerCamelCase=True,      lowerCamelCase=True,      lowerCamelCase=False,      lowerCamelCase=11,      lowerCamelCase=11,      **lowerCamelCase,      )       ->   Optional[Any]:




           """simple docstring"""

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

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

           super().__init__(bos_token_id=lowerCamelCase,      eos_token_id=lowerCamelCase,      **lowerCamelCase)
       @property
       def 			UpperCamelCase     (					self)       ->   List[str]:




           """simple docstring"""

           return self.hidden_size // self.num_attention_heads




       @property
       def 			UpperCamelCase     (					self)       ->   int:




           """simple docstring"""

           return not self.alibi










'''simple docstring'''







from typing import TYPE_CHECKING

from ...utils import (
    OptionalDependencyNotAvailable,
    _LazyModule,
    is_torch_available,
)


_A	:			Union[str, Any]         ={
    '''configuration_swiftformer''': [
        '''SWIFTFORMER_PRETRAINED_CONFIG_ARCHIVE_MAP''',
        '''SwiftFormerConfig''',
        '''SwiftFormerOnnxConfig''',
    ]
}

try:
			if not is_torch_available():
						raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
			pass
else:
			_A	:			Optional[Any]         =[
			    '''SWIFTFORMER_PRETRAINED_MODEL_ARCHIVE_LIST''',
			    '''SwiftFormerForImageClassification''',
			    '''SwiftFormerModel''',
			    '''SwiftFormerPreTrainedModel''',
			]

if TYPE_CHECKING:
			from .configuration_swiftformer import (
			    SWIFTFORMER_PRETRAINED_CONFIG_ARCHIVE_MAP,
			    SwiftFormerConfig,
			    SwiftFormerOnnxConfig,
			)

			try:
						if not is_torch_available():
									raise OptionalDependencyNotAvailable()
			except OptionalDependencyNotAvailable:
						pass
			else:
						from .modeling_swiftformer import (
						    SWIFTFORMER_PRETRAINED_MODEL_ARCHIVE_LIST,
						    SwiftFormerForImageClassification,
						    SwiftFormerModel,
						    SwiftFormerPreTrainedModel,
						)

else:
			import sys

			_A	:			Tuple         =_LazyModule(__name__, globals()['''__file__'''], _import_structure, module_spec=__spec__)

