

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


lowercase_								=     logging.get_logger(__name__)

lowercase_								=     {
    """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 				_snake_case			(					lowercase__):
				UpperCamelCase__				:					Dict     		="""falcon"""
				UpperCamelCase__				:					Any     		=["""past_key_values"""]




				def __init__(						self					:						Any,					__lowercase					:						Tuple=6_5024,					__lowercase					:						Optional[Any]=4544,					__lowercase					:						Optional[Any]=32,					__lowercase					:						str=71,					__lowercase					:						Any=1e-5,					__lowercase					:						int=0.02,					__lowercase					:						Optional[int]=True,					__lowercase					:						List[str]=0.0,					__lowercase					:						Optional[int]=0.0,					__lowercase					:						Optional[Any]=None,					__lowercase					:						str=False,					__lowercase					:						Tuple=False,					__lowercase					:						List[str]=True,					__lowercase					:						Optional[Any]=True,					__lowercase					:						int=False,					__lowercase					:						Optional[Any]=11,					__lowercase					:						List[str]=11,					**__lowercase					:						Tuple,					):
							lowercase__					  =				vocab_size
							# Backward compatibility with n_embed kwarg
							lowercase__					  =				kwargs.pop("n_embed",					__lowercase						)
							lowercase__					  =				hidden_size if n_embed is None else n_embed
							lowercase__					  =				num_hidden_layers
							lowercase__					  =				num_attention_heads
							lowercase__					  =				layer_norm_epsilon
							lowercase__					  =				initializer_range
							lowercase__					  =				use_cache
							lowercase__					  =				hidden_dropout
							lowercase__					  =				attention_dropout

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

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




				@property
				def 							A__      (						self					:						int						):
							return self.hidden_size // self.num_attention_heads




				@property
				def 							A__      (						self					:						str						):
							return not self.alibi









from typing import TYPE_CHECKING

from ...utils import OptionalDependencyNotAvailable, _LazyModule, is_torch_available


lowercase_								=     {
    """configuration_timesformer""": ["""TIMESFORMER_PRETRAINED_CONFIG_ARCHIVE_MAP""", """TimesformerConfig"""],
}

try:
							if not is_torch_available():
														raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
							pass
else:
							lowercase_								=     [
							    """TIMESFORMER_PRETRAINED_MODEL_ARCHIVE_LIST""",
							    """TimesformerModel""",
							    """TimesformerForVideoClassification""",
							    """TimesformerPreTrainedModel""",
							]

if TYPE_CHECKING:
							from .configuration_timesformer import TIMESFORMER_PRETRAINED_CONFIG_ARCHIVE_MAP, TimesformerConfig

							try:
														if not is_torch_available():
																					raise OptionalDependencyNotAvailable()
							except OptionalDependencyNotAvailable:
														pass
							else:
														from .modeling_timesformer import (
														    TIMESFORMER_PRETRAINED_MODEL_ARCHIVE_LIST,
														    TimesformerForVideoClassification,
														    TimesformerModel,
														    TimesformerPreTrainedModel,
														)

else:
							import sys

							lowercase_								=     _LazyModule(__name__, globals()["""__file__"""], _import_structure, module_spec=__spec__)




