



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


UpperCAmelCase						:		Tuple			= logging.get_logger(__name__)

UpperCAmelCase						:		Union[str, Any]			= {
    "facebook/timesformer": "https://huggingface.co/facebook/timesformer/resolve/main/config.json",
}


class    SCREAMING_SNAKE_CASE__ (							lowerCAmelCase__   ):
    lowercase__      =   "timesformer"

    def __init__(				self			:				Dict ,  lowerCAmelCase_			:				Optional[Any]=2_2_4 ,  lowerCAmelCase_			:				List[str]=1_6 ,  lowerCAmelCase_			:				Tuple=3 ,  lowerCAmelCase_			:				Dict=8 ,  lowerCAmelCase_			:				Any=7_6_8 ,  lowerCAmelCase_			:				str=1_2 ,  lowerCAmelCase_			:				Dict=1_2 ,  lowerCAmelCase_			:				Dict=3_0_7_2 ,  lowerCAmelCase_			:				List[Any]="gelu" ,  lowerCAmelCase_			:				Tuple=0.0 ,  lowerCAmelCase_			:				Any=0.0 ,  lowerCAmelCase_			:				str=0.02 ,  lowerCAmelCase_			:				Dict=1E-6 ,  lowerCAmelCase_			:				List[Any]=True ,  lowerCAmelCase_			:				Tuple="divided_space_time" ,  lowerCAmelCase_			:				Optional[int]=0 ,  **lowerCAmelCase_			:				Optional[Any] ,  ):







      """simple docstring"""







      super().__init__(**_lowerCamelCase)

      lowercase_								= image_size
      lowercase_								= patch_size
      lowercase_								= num_channels
      lowercase_								= num_frames

      lowercase_								= hidden_size
      lowercase_								= num_hidden_layers
      lowercase_								= num_attention_heads
      lowercase_								= intermediate_size
      lowercase_								= hidden_act
      lowercase_								= hidden_dropout_prob
      lowercase_								= attention_probs_dropout_prob
      lowercase_								= initializer_range
      lowercase_								= layer_norm_eps
      lowercase_								= qkv_bias

      lowercase_								= attention_type
      lowercase_								= drop_path_rate






"""simple docstring"""
from typing import TYPE_CHECKING

from ...utils import (
    OptionalDependencyNotAvailable,
    _LazyModule,
    is_flax_available,
    is_sentencepiece_available,
    is_tf_available,
    is_tokenizers_available,
    is_torch_available,
)


UpperCAmelCase						:		Any			= {"configuration_xglm": ["XGLM_PRETRAINED_CONFIG_ARCHIVE_MAP", "XGLMConfig"]}

try:
       if not is_sentencepiece_available():
              raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
       pass
else:
       UpperCAmelCase						:		List[str]			= ["XGLMTokenizer"]

try:
       if not is_tokenizers_available():
              raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
       pass
else:
       UpperCAmelCase						:		Dict			= ["XGLMTokenizerFast"]

try:
       if not is_torch_available():
              raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
       pass
else:
       UpperCAmelCase						:		Tuple			= [
           "XGLM_PRETRAINED_MODEL_ARCHIVE_LIST",
           "XGLMForCausalLM",
           "XGLMModel",
           "XGLMPreTrainedModel",
       ]


try:
       if not is_flax_available():
              raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
       pass
else:
       UpperCAmelCase						:		int			= [
           "FlaxXGLMForCausalLM",
           "FlaxXGLMModel",
           "FlaxXGLMPreTrainedModel",
       ]


try:
       if not is_tf_available():
              raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
       pass
else:
       UpperCAmelCase						:		List[str]			= [
           "TF_XGLM_PRETRAINED_MODEL_ARCHIVE_LIST",
           "TFXGLMForCausalLM",
           "TFXGLMModel",
           "TFXGLMPreTrainedModel",
       ]


if TYPE_CHECKING:
       from .configuration_xglm import XGLM_PRETRAINED_CONFIG_ARCHIVE_MAP, XGLMConfig

       try:
              if not is_sentencepiece_available():
                     raise OptionalDependencyNotAvailable()
       except OptionalDependencyNotAvailable:
              pass
       else:
              from .tokenization_xglm import XGLMTokenizer

       try:
              if not is_tokenizers_available():
                     raise OptionalDependencyNotAvailable()
       except OptionalDependencyNotAvailable:
              pass
       else:
              from .tokenization_xglm_fast import XGLMTokenizerFast

       try:
              if not is_torch_available():
                     raise OptionalDependencyNotAvailable()
       except OptionalDependencyNotAvailable:
              pass
       else:
              from .modeling_xglm import XGLM_PRETRAINED_MODEL_ARCHIVE_LIST, XGLMForCausalLM, XGLMModel, XGLMPreTrainedModel

       try:
              if not is_flax_available():
                     raise OptionalDependencyNotAvailable()
       except OptionalDependencyNotAvailable:
              pass
       else:
              from .modeling_flax_xglm import FlaxXGLMForCausalLM, FlaxXGLMModel, FlaxXGLMPreTrainedModel

       try:
              if not is_tf_available():
                     raise OptionalDependencyNotAvailable()
       except OptionalDependencyNotAvailable:
              pass
       else:
              from .modeling_tf_xglm import (
                  TF_XGLM_PRETRAINED_MODEL_ARCHIVE_LIST,
                  TFXGLMForCausalLM,
                  TFXGLMModel,
                  TFXGLMPreTrainedModel,
              )


else:
       import sys

       UpperCAmelCase						:		Any			= _LazyModule(__name__, globals()["__file__"], _import_structure)

