






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


UpperCAmelCase_ :						str      =      logging.get_logger(__name__)

UpperCAmelCase_ :						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     _SCREAMING_SNAKE_CASE       (			_a      ):
	snake_case__							:     Tuple     	=  """markuplm"""





	def __init__(		self				:					Union[str, Any] ,  __lowerCamelCase				:					List[Any]=30_522 ,  __lowerCamelCase				:					Union[str, Any]=768 ,  __lowerCamelCase				:					Dict=12 ,  __lowerCamelCase				:					Optional[int]=12 ,  __lowerCamelCase				:					Optional[int]=3_072 ,  __lowerCamelCase				:					Optional[int]="gelu" ,  __lowerCamelCase				:					Tuple=0.1 ,  __lowerCamelCase				:					str=0.1 ,  __lowerCamelCase				:					Any=512 ,  __lowerCamelCase				:					int=2 ,  __lowerCamelCase				:					Tuple=0.02 ,  __lowerCamelCase				:					Any=1E-12 ,  __lowerCamelCase				:					Any=0 ,  __lowerCamelCase				:					Union[str, Any]=0 ,  __lowerCamelCase				:					Union[str, Any]=2 ,  __lowerCamelCase				:					List[str]=256 ,  __lowerCamelCase				:					Union[str, Any]=1_024 ,  __lowerCamelCase				:					Any=216 ,  __lowerCamelCase				:					Optional[Any]=1_001 ,  __lowerCamelCase				:					Tuple=32 ,  __lowerCamelCase				:					Dict=50 ,  __lowerCamelCase				:					Optional[int]="absolute" ,  __lowerCamelCase				:					Optional[int]=True ,  __lowerCamelCase				:					int=None ,  **__lowerCamelCase				:					str ,  ):
		super().__init__(
		    pad_token_id=__lowerCamelCase ,  bos_token_id=__lowerCamelCase ,  eos_token_id=__lowerCamelCase ,  **__lowerCamelCase ,  )
		UpperCamelCase     :str          =	vocab_size
		UpperCamelCase     :List[str]          =	hidden_size
		UpperCamelCase     :int          =	num_hidden_layers
		UpperCamelCase     :Dict          =	num_attention_heads
		UpperCamelCase     :int          =	hidden_act
		UpperCamelCase     :Optional[int]          =	intermediate_size
		UpperCamelCase     :List[Any]          =	hidden_dropout_prob
		UpperCamelCase     :Any          =	attention_probs_dropout_prob
		UpperCamelCase     :Union[str, Any]          =	max_position_embeddings
		UpperCamelCase     :Optional[Any]          =	type_vocab_size
		UpperCamelCase     :Union[str, Any]          =	initializer_range
		UpperCamelCase     :List[str]          =	layer_norm_eps
		UpperCamelCase     :Optional[Any]          =	position_embedding_type
		UpperCamelCase     :Optional[Any]          =	use_cache
		UpperCamelCase     :Any          =	classifier_dropout
		# additional properties
		UpperCamelCase     :Dict          =	max_depth
		UpperCamelCase     :List[Any]          =	max_xpath_tag_unit_embeddings
		UpperCamelCase     :List[Any]          =	max_xpath_subs_unit_embeddings
		UpperCamelCase     :Dict          =	tag_pad_id
		UpperCamelCase     :Optional[Any]          =	subs_pad_id
		UpperCamelCase     :Any          =	xpath_unit_hidden_size








from typing import TYPE_CHECKING

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


UpperCAmelCase_ :						str      =      {'''configuration_opt''': ['''OPT_PRETRAINED_CONFIG_ARCHIVE_MAP''', '''OPTConfig''']}

try:
	if not is_torch_available():
		raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
	pass
else:
	UpperCAmelCase_ :						Tuple      =      [
	    '''OPT_PRETRAINED_MODEL_ARCHIVE_LIST''',
	    '''OPTForCausalLM''',
	    '''OPTModel''',
	    '''OPTPreTrainedModel''',
	    '''OPTForSequenceClassification''',
	    '''OPTForQuestionAnswering''',
	]

try:
	if not is_tf_available():
		raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
	pass
else:
	UpperCAmelCase_ :						Any      =      ['''TFOPTForCausalLM''', '''TFOPTModel''', '''TFOPTPreTrainedModel''']

try:
	if not is_flax_available():
		raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
	pass
else:
	UpperCAmelCase_ :						Optional[Any]      =      [
	    '''FlaxOPTForCausalLM''',
	    '''FlaxOPTModel''',
	    '''FlaxOPTPreTrainedModel''',
	]


if TYPE_CHECKING:
	from .configuration_opt import OPT_PRETRAINED_CONFIG_ARCHIVE_MAP, OPTConfig

	try:
		if not is_torch_available():
			raise OptionalDependencyNotAvailable()
	except OptionalDependencyNotAvailable:
		pass
	else:
		from .modeling_opt import (
		    OPT_PRETRAINED_MODEL_ARCHIVE_LIST,
		    OPTForCausalLM,
		    OPTForQuestionAnswering,
		    OPTForSequenceClassification,
		    OPTModel,
		    OPTPreTrainedModel,
		)

	try:
		if not is_tf_available():
			raise OptionalDependencyNotAvailable()
	except OptionalDependencyNotAvailable:
		pass
	else:
		from .modeling_tf_opt import TFOPTForCausalLM, TFOPTModel, TFOPTPreTrainedModel

	try:
		if not is_flax_available():
			raise OptionalDependencyNotAvailable()
	except OptionalDependencyNotAvailable:
		pass
	else:
		from .modeling_flax_opt import FlaxOPTForCausalLM, FlaxOPTModel, FlaxOPTPreTrainedModel

else:
	import sys

	UpperCAmelCase_ :						List[Any]      =      _LazyModule(__name__, globals()['''__file__'''], _import_structure, module_spec=__spec__)
