






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


__A      =				logging.get_logger(__name__)

__A      =				{
    'naver-clova-ix/donut-base': 'https://huggingface.co/naver-clova-ix/donut-base/resolve/main/config.json',
    # See all Donut models at https://huggingface.co/models?filter=donut-swin
}





class 						SCREAMING_SNAKE_CASE				( snake_case					):





							"""simple docstring"""

							A_						  =					"donut-swin"

							A_						  =					{
							    "num_attention_heads": "num_heads",
							    "num_hidden_layers": "num_layers",
							}

							def __init__(  self:   Tuple		,     __A:   Union[str, Any]=2_24		,     __A:   Tuple=4		,     __A:   int=3		,     __A:   List[str]=96		,     __A:   Dict=[2, 2, 6, 2]		,     __A:   Any=[3, 6, 12, 24]		,     __A:   Any=7		,     __A:   int=4.0		,     __A:   Union[str, Any]=True		,     __A:   Optional[int]=0.0		,     __A:   Optional[Any]=0.0		,     __A:   str=0.1		,     __A:   str="gelu"		,     __A:   Optional[Any]=False		,     __A:   Optional[int]=0.02		,     __A:   int=1e-5		,     **__A:   int		,     )    ->				Tuple:
												super().__init__(**__A   )

												_A								= image_size
												_A								= patch_size
												_A								= num_channels
												_A								= embed_dim
												_A								= depths
												_A								= len(__A   )
												_A								= num_heads
												_A								= window_size
												_A								= mlp_ratio
												_A								= qkv_bias
												_A								= hidden_dropout_prob
												_A								= attention_probs_dropout_prob
												_A								= drop_path_rate
												_A								= hidden_act
												_A								= use_absolute_embeddings
												_A								= layer_norm_eps
												_A								= initializer_range
												# we set the hidden_size attribute in order to make Swin work with VisionEncoderDecoderModel
												# this indicates the channel dimension after the last stage of the model
												_A								= int(embed_dim * 2 ** (len(__A   ) - 1)   )











from typing import TYPE_CHECKING

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


__A      =				{
    'configuration_mega': ['MEGA_PRETRAINED_CONFIG_ARCHIVE_MAP', 'MegaConfig', 'MegaOnnxConfig'],
}

try:
				if not is_torch_available():
								raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
				pass
else:
				__A      =				[
				    'MEGA_PRETRAINED_MODEL_ARCHIVE_LIST',
				    'MegaForCausalLM',
				    'MegaForMaskedLM',
				    'MegaForMultipleChoice',
				    'MegaForQuestionAnswering',
				    'MegaForSequenceClassification',
				    'MegaForTokenClassification',
				    'MegaModel',
				    'MegaPreTrainedModel',
				]

if TYPE_CHECKING:
				from .configuration_mega import MEGA_PRETRAINED_CONFIG_ARCHIVE_MAP, MegaConfig, MegaOnnxConfig

				try:
								if not is_torch_available():
												raise OptionalDependencyNotAvailable()
				except OptionalDependencyNotAvailable:
								pass
				else:
								from .modeling_mega import (
								    MEGA_PRETRAINED_MODEL_ARCHIVE_LIST,
								    MegaForCausalLM,
								    MegaForMaskedLM,
								    MegaForMultipleChoice,
								    MegaForQuestionAnswering,
								    MegaForSequenceClassification,
								    MegaForTokenClassification,
								    MegaModel,
								    MegaPreTrainedModel,
								)

else:
				import sys

				__A      =				_LazyModule(__name__, globals()['__file__'], _import_structure, module_spec=__spec__)



