


"""simple docstring"""






from ...configuration_utils import PretrainedConfig
from ...utils import logging
from ...utils.backbone_utils import BackboneConfigMixin, get_aligned_output_features_output_indices


UpperCamelCase__				:List[str]			   =	logging.get_logger(__name__)

UpperCamelCase__				:Union[str, Any]			   =	{
    """google/bit-50""": """https://huggingface.co/google/bit-50/resolve/main/config.json""",
}






class      A(  lowerCamelCase__				,							lowerCamelCase__		):

		"""simple docstring"""





		A    =							"bit"
		A    =							["preactivation", "bottleneck"]
		A    =							["SAME", "VALID"]
		def __init__( self					,				SCREAMING_SNAKE_CASE__=3					,				SCREAMING_SNAKE_CASE__=64					,				SCREAMING_SNAKE_CASE__=[2_56, 5_12, 10_24, 20_48]					,				SCREAMING_SNAKE_CASE__=[3, 4, 6, 3]					,				SCREAMING_SNAKE_CASE__="preactivation"					,				SCREAMING_SNAKE_CASE__="relu"					,				SCREAMING_SNAKE_CASE__=None					,				SCREAMING_SNAKE_CASE__=32					,				SCREAMING_SNAKE_CASE__=0.0					,				SCREAMING_SNAKE_CASE__=False					,				SCREAMING_SNAKE_CASE__=32					,				SCREAMING_SNAKE_CASE__=1					,				SCREAMING_SNAKE_CASE__=None					,				SCREAMING_SNAKE_CASE__=None					,				**SCREAMING_SNAKE_CASE__					,				)      ->	Union[str, Any]:

					"""simple docstring"""



					super().__init__(**SCREAMING_SNAKE_CASE__   )
					if layer_type not in self.layer_types:
								raise ValueError(f"layer_type={layer_type} is not one of {','.join(self.layer_types   )}"   )
					if global_padding is not None:
								if global_padding.upper() in self.supported_padding:
											_UpperCamelCase					:List[str]					     =	global_padding.upper()
								else:
											raise ValueError(f"Padding strategy {global_padding} not supported"   )
					_UpperCamelCase					:List[Any]					     =	num_channels
					_UpperCamelCase					:Optional[int]					     =	embedding_size
					_UpperCamelCase					:str					     =	hidden_sizes
					_UpperCamelCase					:List[Any]					     =	depths
					_UpperCamelCase					:int					     =	layer_type
					_UpperCamelCase					:Optional[int]					     =	hidden_act
					_UpperCamelCase					:List[str]					     =	global_padding
					_UpperCamelCase					:Tuple					     =	num_groups
					_UpperCamelCase					:Optional[Any]					     =	drop_path_rate
					_UpperCamelCase					:Any					     =	embedding_dynamic_padding
					_UpperCamelCase					:Optional[Any]					     =	output_stride
					_UpperCamelCase					:List[Any]					     =	width_factor

					_UpperCamelCase					:List[Any]					     =	['''stem'''] + [f"stage{idx}" for idx in range(1					,				len(SCREAMING_SNAKE_CASE__   ) + 1   )]
					_UpperCamelCase     ,      _UpperCamelCase					:List[Any]					     =	get_aligned_output_features_output_indices(
					    out_features=SCREAMING_SNAKE_CASE__					,				out_indices=SCREAMING_SNAKE_CASE__					,				stage_names=self.stage_names   )





"""simple docstring"""






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


UpperCamelCase__				:str			   =	logging.get_logger(__name__)

UpperCamelCase__				:Optional[int]			   =	{
    """microsoft/markuplm-base""": """https://huggingface.co/microsoft/markuplm-base/resolve/main/config.json""",
    """microsoft/markuplm-large""": """https://huggingface.co/microsoft/markuplm-large/resolve/main/config.json""",
}






class      A(  lowerCamelCase__		):

		"""simple docstring"""





		A    =							"markuplm"
		def __init__( self					,				SCREAMING_SNAKE_CASE__=3_05_22					,				SCREAMING_SNAKE_CASE__=7_68					,				SCREAMING_SNAKE_CASE__=12					,				SCREAMING_SNAKE_CASE__=12					,				SCREAMING_SNAKE_CASE__=30_72					,				SCREAMING_SNAKE_CASE__="gelu"					,				SCREAMING_SNAKE_CASE__=0.1					,				SCREAMING_SNAKE_CASE__=0.1					,				SCREAMING_SNAKE_CASE__=5_12					,				SCREAMING_SNAKE_CASE__=2					,				SCREAMING_SNAKE_CASE__=0.0_2					,				SCREAMING_SNAKE_CASE__=1E-12					,				SCREAMING_SNAKE_CASE__=0					,				SCREAMING_SNAKE_CASE__=0					,				SCREAMING_SNAKE_CASE__=2					,				SCREAMING_SNAKE_CASE__=2_56					,				SCREAMING_SNAKE_CASE__=10_24					,				SCREAMING_SNAKE_CASE__=2_16					,				SCREAMING_SNAKE_CASE__=10_01					,				SCREAMING_SNAKE_CASE__=32					,				SCREAMING_SNAKE_CASE__=50					,				SCREAMING_SNAKE_CASE__="absolute"					,				SCREAMING_SNAKE_CASE__=True					,				SCREAMING_SNAKE_CASE__=None					,				**SCREAMING_SNAKE_CASE__					,				)      ->	Optional[Any]:

					"""simple docstring"""



					super().__init__(
					    pad_token_id=SCREAMING_SNAKE_CASE__					,				bos_token_id=SCREAMING_SNAKE_CASE__					,				eos_token_id=SCREAMING_SNAKE_CASE__					,				**SCREAMING_SNAKE_CASE__					,				)
					_UpperCamelCase					:Any					     =	vocab_size
					_UpperCamelCase					:Union[str, Any]					     =	hidden_size
					_UpperCamelCase					:List[Any]					     =	num_hidden_layers
					_UpperCamelCase					:int					     =	num_attention_heads
					_UpperCamelCase					:Tuple					     =	hidden_act
					_UpperCamelCase					:str					     =	intermediate_size
					_UpperCamelCase					:Optional[int]					     =	hidden_dropout_prob
					_UpperCamelCase					:Any					     =	attention_probs_dropout_prob
					_UpperCamelCase					:Union[str, Any]					     =	max_position_embeddings
					_UpperCamelCase					:Dict					     =	type_vocab_size
					_UpperCamelCase					:int					     =	initializer_range
					_UpperCamelCase					:Optional[int]					     =	layer_norm_eps
					_UpperCamelCase					:Any					     =	position_embedding_type
					_UpperCamelCase					:Any					     =	use_cache
					_UpperCamelCase					:List[str]					     =	classifier_dropout
					# additional properties
					_UpperCamelCase					:Union[str, Any]					     =	max_depth
					_UpperCamelCase					:Union[str, Any]					     =	max_xpath_tag_unit_embeddings
					_UpperCamelCase					:Optional[Any]					     =	max_xpath_subs_unit_embeddings
					_UpperCamelCase					:int					     =	tag_pad_id
					_UpperCamelCase					:str					     =	subs_pad_id
					_UpperCamelCase					:List[str]					     =	xpath_unit_hidden_size

