


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


_SCREAMING_SNAKE_CASE :					int			=	logging.get_logger(__name__)

_SCREAMING_SNAKE_CASE :					Union[str, Any]			=	{
    """bert-base-uncased""": """https://huggingface.co/bert-base-uncased/resolve/main/config.json""",
    # QDQBERT models can be loaded from any BERT checkpoint, available at https://huggingface.co/models?filter=bert
}

class  UpperCamelCase__ ( __lowerCamelCase			):
      a__   :     Union[str, Any]								=						'qdqbert'






      def __init__(     self					:   Optional[int],		__lowerCamelCase					:   List[str]=3_05_22,		__lowerCamelCase					:   str=7_68,		__lowerCamelCase					:   Optional[int]=12,		__lowerCamelCase					:   List[str]=12,		__lowerCamelCase					:   List[Any]=30_72,		__lowerCamelCase					:   List[str]="gelu",		__lowerCamelCase					:   int=0.1,		__lowerCamelCase					:   Any=0.1,		__lowerCamelCase					:   str=5_12,		__lowerCamelCase					:   Union[str, Any]=2,		__lowerCamelCase					:   List[Any]=0.02,		__lowerCamelCase					:   int=1e-12,		__lowerCamelCase					:   Union[str, Any]=True,		__lowerCamelCase					:   List[str]=1,		__lowerCamelCase					:   Tuple=0,		__lowerCamelCase					:   Any=2,		**__lowerCamelCase					:   List[Any],		)  -> List[Any]:
           super().__init__(pad_token_id=__lowerCamelCase,		bos_token_id=__lowerCamelCase,		eos_token_id=__lowerCamelCase,		**__lowerCamelCase   )

           UpperCamelCase__							:  Any								=     vocab_size
           UpperCamelCase__							:  str								=     max_position_embeddings
           UpperCamelCase__							:  List[str]								=     hidden_size
           UpperCamelCase__							:  List[Any]								=     num_hidden_layers
           UpperCamelCase__							:  str								=     num_attention_heads
           UpperCamelCase__							:  str								=     intermediate_size
           UpperCamelCase__							:  List[str]								=     hidden_act
           UpperCamelCase__							:  Any								=     hidden_dropout_prob
           UpperCamelCase__							:  str								=     attention_probs_dropout_prob
           UpperCamelCase__							:  List[str]								=     initializer_range
           UpperCamelCase__							:  Optional[int]								=     type_vocab_size
           UpperCamelCase__							:  List[str]								=     layer_norm_eps
           UpperCamelCase__							:  Optional[Any]								=     use_cache








from typing import TYPE_CHECKING

from ...utils import OptionalDependencyNotAvailable, _LazyModule, is_torch_available, is_vision_available


_SCREAMING_SNAKE_CASE :					str			=	{
    """configuration_donut_swin""": ["""DONUT_SWIN_PRETRAINED_CONFIG_ARCHIVE_MAP""", """DonutSwinConfig"""],
    """processing_donut""": ["""DonutProcessor"""],
}

try:
   if not is_torch_available():
      raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
   pass
else:
   _SCREAMING_SNAKE_CASE :					List[Any]			=	[
       """DONUT_SWIN_PRETRAINED_MODEL_ARCHIVE_LIST""",
       """DonutSwinModel""",
       """DonutSwinPreTrainedModel""",
   ]

try:
   if not is_vision_available():
      raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
   pass
else:
   _SCREAMING_SNAKE_CASE :					List[Any]			=	["""DonutFeatureExtractor"""]
   _SCREAMING_SNAKE_CASE :					Tuple			=	["""DonutImageProcessor"""]


if TYPE_CHECKING:
   from .configuration_donut_swin import DONUT_SWIN_PRETRAINED_CONFIG_ARCHIVE_MAP, DonutSwinConfig
   from .processing_donut import DonutProcessor

   try:
      if not is_torch_available():
         raise OptionalDependencyNotAvailable()
   except OptionalDependencyNotAvailable:
      pass
   else:
      from .modeling_donut_swin import (
          DONUT_SWIN_PRETRAINED_MODEL_ARCHIVE_LIST,
          DonutSwinModel,
          DonutSwinPreTrainedModel,
      )

   try:
      if not is_vision_available():
         raise OptionalDependencyNotAvailable()
   except OptionalDependencyNotAvailable:
      pass
   else:
      from .feature_extraction_donut import DonutFeatureExtractor
      from .image_processing_donut import DonutImageProcessor

else:
   import sys

   _SCREAMING_SNAKE_CASE :					Optional[Any]			=	_LazyModule(__name__, globals()["""__file__"""], _import_structure, module_spec=__spec__)




