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


lowerCamelCase__  =					logging.get_logger(__name__)

lowerCamelCase__  =					{
    '''alibaba-damo/mgp-str-base''': '''https://huggingface.co/alibaba-damo/mgp-str-base/resolve/main/config.json''',
}




class 					_UpperCAmelCase			(     lowerCAmelCase  ):



 '''simple docstring'''




 __A			       =					'''mgp-str'''







 def __init__(		self				:   Dict							, lowercase_				:   Any=[32, 128]							, lowercase_				:   Any=4							, lowercase_				:   Optional[int]=3							, lowercase_				:   List[str]=27							, lowercase_				:   int=38							, lowercase_				:   List[Any]=50257							, lowercase_				:   List[str]=30522							, lowercase_				:   Union[str, Any]=768							, lowercase_				:   Union[str, Any]=12							, lowercase_				:   Optional[Any]=12							, lowercase_				:   Union[str, Any]=4.0							, lowercase_				:   Dict=True							, lowercase_				:   List[Any]=False							, lowercase_				:   Dict=1e-5							, lowercase_				:   str=0.0							, lowercase_				:   Union[str, Any]=0.0							, lowercase_				:   Tuple=0.0							, lowercase_				:   Tuple=False							, lowercase_				:   Union[str, Any]=0.02							, **lowercase_				:   Tuple							, )						->	Dict:


   """simple docstring"""







   super().__init__(**lowercase_)

   _UpperCamelCase           =    image_size
   _UpperCamelCase           =    patch_size
   _UpperCamelCase           =    num_channels
   _UpperCamelCase           =    max_token_length
   _UpperCamelCase           =    num_character_labels
   _UpperCamelCase           =    num_bpe_labels
   _UpperCamelCase           =    num_wordpiece_labels
   _UpperCamelCase           =    hidden_size
   _UpperCamelCase           =    num_hidden_layers
   _UpperCamelCase           =    num_attention_heads
   _UpperCamelCase           =    mlp_ratio
   _UpperCamelCase           =    distilled
   _UpperCamelCase           =    layer_norm_eps
   _UpperCamelCase           =    drop_rate
   _UpperCamelCase           =    qkv_bias
   _UpperCamelCase           =    attn_drop_rate
   _UpperCamelCase           =    drop_path_rate
   _UpperCamelCase           =    output_aa_attentions
   _UpperCamelCase           =    initializer_range





from typing import TYPE_CHECKING

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


lowerCamelCase__  =					{
    '''configuration_longformer''': [
        '''LONGFORMER_PRETRAINED_CONFIG_ARCHIVE_MAP''',
        '''LongformerConfig''',
        '''LongformerOnnxConfig''',
    ],
    '''tokenization_longformer''': ['''LongformerTokenizer'''],
}

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

try:
   if not is_torch_available():
      raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
   pass
else:
   lowerCamelCase__  =					[
       '''LONGFORMER_PRETRAINED_MODEL_ARCHIVE_LIST''',
       '''LongformerForMaskedLM''',
       '''LongformerForMultipleChoice''',
       '''LongformerForQuestionAnswering''',
       '''LongformerForSequenceClassification''',
       '''LongformerForTokenClassification''',
       '''LongformerModel''',
       '''LongformerPreTrainedModel''',
       '''LongformerSelfAttention''',
   ]

try:
   if not is_tf_available():
      raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
   pass
else:
   lowerCamelCase__  =					[
       '''TF_LONGFORMER_PRETRAINED_MODEL_ARCHIVE_LIST''',
       '''TFLongformerForMaskedLM''',
       '''TFLongformerForMultipleChoice''',
       '''TFLongformerForQuestionAnswering''',
       '''TFLongformerForSequenceClassification''',
       '''TFLongformerForTokenClassification''',
       '''TFLongformerModel''',
       '''TFLongformerPreTrainedModel''',
       '''TFLongformerSelfAttention''',
   ]


if TYPE_CHECKING:
   from .configuration_longformer import (
       LONGFORMER_PRETRAINED_CONFIG_ARCHIVE_MAP,
       LongformerConfig,
       LongformerOnnxConfig,
   )
   from .tokenization_longformer import LongformerTokenizer

   try:
      if not is_tokenizers_available():
         raise OptionalDependencyNotAvailable()
   except OptionalDependencyNotAvailable:
      pass
   else:
      from .tokenization_longformer_fast import LongformerTokenizerFast

   try:
      if not is_torch_available():
         raise OptionalDependencyNotAvailable()
   except OptionalDependencyNotAvailable:
      pass
   else:
      from .modeling_longformer import (
          LONGFORMER_PRETRAINED_MODEL_ARCHIVE_LIST,
          LongformerForMaskedLM,
          LongformerForMultipleChoice,
          LongformerForQuestionAnswering,
          LongformerForSequenceClassification,
          LongformerForTokenClassification,
          LongformerModel,
          LongformerPreTrainedModel,
          LongformerSelfAttention,
      )

   try:
      if not is_tf_available():
         raise OptionalDependencyNotAvailable()
   except OptionalDependencyNotAvailable:
      pass
   else:
      from .modeling_tf_longformer import (
          TF_LONGFORMER_PRETRAINED_MODEL_ARCHIVE_LIST,
          TFLongformerForMaskedLM,
          TFLongformerForMultipleChoice,
          TFLongformerForQuestionAnswering,
          TFLongformerForSequenceClassification,
          TFLongformerForTokenClassification,
          TFLongformerModel,
          TFLongformerPreTrainedModel,
          TFLongformerSelfAttention,
      )

else:
   import sys

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




