
'''simple docstring'''







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


_snake_case				:   List[Any]     =				logging.get_logger(__name__)

_snake_case				:   List[Any]     =				{
    """alibaba-damo/mgp-str-base""": """https://huggingface.co/alibaba-damo/mgp-str-base/resolve/main/config.json""",
}


class 			lowerCAmelCase (				__UpperCAmelCase			):
		a							:					Optional[Any]       =					"mgp-str"




		def __init__(				self					,						UpperCamelCase=[32, 128]					,						UpperCamelCase=4					,						UpperCamelCase=3					,						UpperCamelCase=27					,						UpperCamelCase=38					,						UpperCamelCase=50_257					,						UpperCamelCase=30_522					,						UpperCamelCase=768					,						UpperCamelCase=12					,						UpperCamelCase=12					,						UpperCamelCase=4.0					,						UpperCamelCase=True					,						UpperCamelCase=False					,						UpperCamelCase=1e-5					,						UpperCamelCase=0.0					,						UpperCamelCase=0.0					,						UpperCamelCase=0.0					,						UpperCamelCase=False					,						UpperCamelCase=0.02					,						**UpperCamelCase					,						):
								super().__init__(**UpperCamelCase      )

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

'''simple docstring'''







from transformers import DistilBertTokenizer, DistilBertTokenizerFast
from transformers.testing_utils import require_tokenizers, slow

from ..bert.test_tokenization_bert import BertTokenizationTest


@require_tokenizers
class 			lowerCAmelCase (				__UpperCAmelCase			):
		a							:					Dict       =					DistilBertTokenizer
		a							:					Tuple       =					DistilBertTokenizerFast
		a							:					List[str]       =					True




		@slow
		def     lowercase       (				self      ):
								_SCREAMING_SNAKE_CASE				= DistilBertTokenizer.from_pretrained("distilbert-base-uncased"      )

								_SCREAMING_SNAKE_CASE				= tokenizer.encode("sequence builders"					,						add_special_tokens=UpperCamelCase      )
								_SCREAMING_SNAKE_CASE				= tokenizer.encode("multi-sequence build"					,						add_special_tokens=UpperCamelCase      )

								_SCREAMING_SNAKE_CASE				= tokenizer.build_inputs_with_special_tokens(UpperCamelCase      )
								_SCREAMING_SNAKE_CASE				= tokenizer.build_inputs_with_special_tokens(UpperCamelCase					,						UpperCamelCase      )

								assert encoded_sentence == [tokenizer.cls_token_id] + text + [tokenizer.sep_token_id]
								assert encoded_pair == [tokenizer.cls_token_id] + text + [tokenizer.sep_token_id] + text_a + [
								    tokenizer.sep_token_id
								]