

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


lowercase_									=   logging.get_logger(__name__)

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





class  __lowerCAmelCase     (					SCREAMING_SNAKE_CASE							):
  _a									=  """mgp-str"""




  def __init__(				self							,   lowerCAmelCase=[32, 128]							,   lowerCAmelCase=4							,   lowerCAmelCase=3							,   lowerCAmelCase=27							,   lowerCAmelCase=38							,   lowerCAmelCase=50_257							,   lowerCAmelCase=30_522							,   lowerCAmelCase=768							,   lowerCAmelCase=12							,   lowerCAmelCase=12							,   lowerCAmelCase=4.0							,   lowerCAmelCase=True							,   lowerCAmelCase=False							,   lowerCAmelCase=1e-5							,   lowerCAmelCase=0.0							,   lowerCAmelCase=0.0							,   lowerCAmelCase=0.0							,   lowerCAmelCase=False							,   lowerCAmelCase=0.02							,   **lowerCAmelCase							,   )  -> Any:
        '''simple docstring'''






        super().__init__(**lowerCAmelCase					)

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





from .imports import is_tqdm_available


if is_tqdm_available():
  from tqdm.auto import tqdm as _tqdm

from ..state import PartialState
def      a      (			A__	:   bool = True      ,   *A__	:   int      ,   **A__	:   Union[str, Any]     )    ->      List[str]:





      """simple docstring"""



      if not is_tqdm_available():
            raise ImportError('Accelerate\'s `tqdm` module requires `tqdm` to be installed. Please run `pip install tqdm`.'     )
      _lowercase	       =False
      if main_process_only:
            _lowercase	       =PartialState().local_process_index == 0
      return _tqdm(*A__      ,   **A__      ,   disable=A__     )


