
"""simple docstring"""


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


_lowercase							      = logging.get_logger(__name__)

_lowercase							      = {
    '''google/vivit-b-16x2-kinetics400''': (
        '''https://huggingface.co/google/vivit-b-16x2-kinetics400/resolve/main/config.json'''
    ),
    # See all Vivit models at https://huggingface.co/models?filter=vivit
}







class  lowerCAmelCase_ (					_lowercase			):



						'''simple docstring'''


						_lowerCamelCase:			Dict					=			'''vivit'''


						def __init__(       self   :					str     ,A_   :					List[str]=224     ,A_   :					Union[str, Any]=32     ,A_   :					List[str]=[2, 16, 16]     ,A_   :					Any=3     ,A_   :					int=768     ,A_   :					Optional[int]=12     ,A_   :					int=12     ,A_   :					Any=3072     ,A_   :					Union[str, Any]="gelu_fast"     ,A_   :					Any=0.0     ,A_   :					Dict=0.0     ,A_   :					Optional[int]=0.02     ,A_   :					Union[str, Any]=1e-06     ,A_   :					Union[str, Any]=True     ,**A_   :					List[Any]     ,)   ->      Dict:
							A        =      hidden_size
							A        =      num_hidden_layers
							A        =      num_attention_heads
							A        =      intermediate_size
							A        =      hidden_act
							A        =      hidden_dropout_prob
							A        =      attention_probs_dropout_prob
							A        =      initializer_range
							A        =      layer_norm_eps

							A        =      image_size
							A        =      num_frames
							A        =      tubelet_size
							A        =      num_channels
							A        =      qkv_bias

							super().__init__(**A_					)


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,
)


lowerCAmelCase_       	=	{'''configuration_xglm''': ['''XGLM_PRETRAINED_CONFIG_ARCHIVE_MAP''', '''XGLMConfig''']}

try:
					if not is_sentencepiece_available():
										raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
					pass
else:
					lowerCAmelCase_       	=	['''XGLMTokenizer''']

try:
					if not is_tokenizers_available():
										raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
					pass
else:
					lowerCAmelCase_       	=	['''XGLMTokenizerFast''']

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


try:
					if not is_flax_available():
										raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
					pass
else:
					lowerCAmelCase_       	=	[
					    '''FlaxXGLMForCausalLM''',
					    '''FlaxXGLMModel''',
					    '''FlaxXGLMPreTrainedModel''',
					]


try:
					if not is_tf_available():
										raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
					pass
else:
					lowerCAmelCase_       	=	[
					    '''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

					lowerCAmelCase_       	=	_LazyModule(__name__, globals()['''__file__'''], _import_structure)