




from collections import OrderedDict
from typing import Mapping

from packaging import version

from ...configuration_utils import PretrainedConfig
from ...onnx import OnnxConfig
from ...utils import logging


__A						:							Tuple							=  logging.get_logger(__name__)

__A						:							List[Any]							=  {
    """hustvl/yolos-small""": """https://huggingface.co/hustvl/yolos-small/resolve/main/config.json""",
    # See all YOLOS models at https://huggingface.co/models?filter=yolos
}




class 			UpperCAmelCase_      (   A       ):




							'''simple docstring'''



							a__						  =     '''yolos'''





							def __init__(					self       :	Tuple       ,     a       :	int=768       ,     a       :	List[Any]=12       ,     a       :	List[str]=12       ,     a       :	Tuple=3_072       ,     a       :	int="gelu"       ,     a       :	Optional[int]=0.0       ,     a       :	List[str]=0.0       ,     a       :	Optional[Any]=0.02       ,     a       :	Dict=1E-1_2       ,     a       :	Tuple=[512, 864]       ,     a       :	List[str]=16       ,     a       :	Any=3       ,     a       :	Optional[Any]=True       ,     a       :	Any=100       ,     a       :	str=True       ,     a       :	Optional[Any]=False       ,     a       :	int=1       ,     a       :	Optional[int]=5       ,     a       :	Dict=2       ,     a       :	Optional[int]=5       ,     a       :	List[Any]=2       ,     a       :	List[Any]=0.1       ,     **a       :	List[Any]       ,     )			->					int:
										super().__init__(**a			)

										SCREAMING_SNAKE_CASE           =					hidden_size
										SCREAMING_SNAKE_CASE           =					num_hidden_layers
										SCREAMING_SNAKE_CASE           =					num_attention_heads
										SCREAMING_SNAKE_CASE           =					intermediate_size
										SCREAMING_SNAKE_CASE           =					hidden_act
										SCREAMING_SNAKE_CASE           =					hidden_dropout_prob
										SCREAMING_SNAKE_CASE           =					attention_probs_dropout_prob
										SCREAMING_SNAKE_CASE           =					initializer_range
										SCREAMING_SNAKE_CASE           =					layer_norm_eps
										SCREAMING_SNAKE_CASE           =					image_size
										SCREAMING_SNAKE_CASE           =					patch_size
										SCREAMING_SNAKE_CASE           =					num_channels
										SCREAMING_SNAKE_CASE           =					qkv_bias
										SCREAMING_SNAKE_CASE           =					num_detection_tokens
										SCREAMING_SNAKE_CASE           =					use_mid_position_embeddings
										SCREAMING_SNAKE_CASE           =					auxiliary_loss
										# Hungarian matcher
										SCREAMING_SNAKE_CASE           =					class_cost
										SCREAMING_SNAKE_CASE           =					bbox_cost
										SCREAMING_SNAKE_CASE           =					giou_cost
										# Loss coefficients
										SCREAMING_SNAKE_CASE           =					bbox_loss_coefficient
										SCREAMING_SNAKE_CASE           =					giou_loss_coefficient
										SCREAMING_SNAKE_CASE           =					eos_coefficient





class 			UpperCAmelCase_      (   A       ):




							'''simple docstring'''



							a__						  =     version.parse('''1.11'''       )





							@property
							def    _UpperCAmelCase     (					self       :	Union[str, Any]			)			->					Mapping[str, Mapping[int, str]]:
										return OrderedDict(
										    [
										        ("""pixel_values""", {0: """batch""", 1: """num_channels""", 2: """height""", 3: """width"""}),
										    ]			)





							@property
							def    _UpperCAmelCase     (					self       :	Dict			)			->					float:
										return 1E-4







							@property
							def    _UpperCAmelCase     (					self       :	Any			)			->					int:
										return 12












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


__A						:							Any							=  logging.get_logger(__name__)

__A						:							int							=  {
    # See all MEGATRON_BERT models at https://huggingface.co/models?filter=bert
}




class 			UpperCAmelCase_      (   A       ):




							'''simple docstring'''



							a__						  =     '''megatron-bert'''





							def __init__(					self       :	str       ,     a       :	Union[str, Any]=29_056       ,     a       :	Optional[int]=1_024       ,     a       :	str=24       ,     a       :	str=16       ,     a       :	str=4_096       ,     a       :	Any="gelu"       ,     a       :	Any=0.1       ,     a       :	Optional[int]=0.1       ,     a       :	Optional[int]=512       ,     a       :	Optional[Any]=2       ,     a       :	List[str]=0.02       ,     a       :	List[Any]=1E-1_2       ,     a       :	Any=0       ,     a       :	List[Any]="absolute"       ,     a       :	List[str]=True       ,     **a       :	Optional[Any]       ,     )			->					List[str]:
										super().__init__(pad_token_id=a       ,     **a			)

										SCREAMING_SNAKE_CASE           =					vocab_size
										SCREAMING_SNAKE_CASE           =					hidden_size
										SCREAMING_SNAKE_CASE           =					num_hidden_layers
										SCREAMING_SNAKE_CASE           =					num_attention_heads
										SCREAMING_SNAKE_CASE           =					hidden_act
										SCREAMING_SNAKE_CASE           =					intermediate_size
										SCREAMING_SNAKE_CASE           =					hidden_dropout_prob
										SCREAMING_SNAKE_CASE           =					attention_probs_dropout_prob
										SCREAMING_SNAKE_CASE           =					max_position_embeddings
										SCREAMING_SNAKE_CASE           =					type_vocab_size
										SCREAMING_SNAKE_CASE           =					initializer_range
										SCREAMING_SNAKE_CASE           =					layer_norm_eps
										SCREAMING_SNAKE_CASE           =					position_embedding_type
										SCREAMING_SNAKE_CASE           =					use_cache






