


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


_UpperCAmelCase     =logging.get_logger(__name__)

_UpperCAmelCase     ={
    """microsoft/beit-base-patch16-224-pt22k""": (
        """https://huggingface.co/microsoft/beit-base-patch16-224-pt22k/resolve/main/config.json"""
    ),
    # See all BEiT models at https://huggingface.co/models?filter=beit
}







class 				snake_case__(							UpperCAmelCase__							):







						'''simple docstring'''




						SCREAMING_SNAKE_CASE__      :  Dict					=							"beit"




						def __init__(				self   ,						__lowercase=8_1_9_2   ,						__lowercase=7_6_8   ,						__lowercase=1_2   ,						__lowercase=1_2   ,						__lowercase=3_0_7_2   ,						__lowercase="gelu"   ,						__lowercase=0.0   ,						__lowercase=0.0   ,						__lowercase=0.02   ,						__lowercase=1e-12   ,						__lowercase=2_2_4   ,						__lowercase=1_6   ,						__lowercase=3   ,						__lowercase=False   ,						__lowercase=False   ,						__lowercase=False   ,						__lowercase=False   ,						__lowercase=0.1   ,						__lowercase=0.1   ,						__lowercase=True   ,						__lowercase=[3, 5, 7, 1_1]   ,						__lowercase=[1, 2, 3, 6]   ,						__lowercase=True   ,						__lowercase=0.4   ,						__lowercase=2_5_6   ,						__lowercase=1   ,						__lowercase=False   ,						__lowercase=2_5_5   ,						**__lowercase   ,						)					->    Optional[Any]:
										super().__init__(**__lowercase							)

										lowerCAmelCase_ :      List[str]    				=				vocab_size
										lowerCAmelCase_ :      Any    				=				hidden_size
										lowerCAmelCase_ :      Any    				=				num_hidden_layers
										lowerCAmelCase_ :      Optional[Any]    				=				num_attention_heads
										lowerCAmelCase_ :      List[str]    				=				intermediate_size
										lowerCAmelCase_ :      int    				=				hidden_act
										lowerCAmelCase_ :      Dict    				=				hidden_dropout_prob
										lowerCAmelCase_ :      Union[str, Any]    				=				attention_probs_dropout_prob
										lowerCAmelCase_ :      Tuple    				=				initializer_range
										lowerCAmelCase_ :      str    				=				layer_norm_eps

										lowerCAmelCase_ :      Union[str, Any]    				=				image_size
										lowerCAmelCase_ :      Union[str, Any]    				=				patch_size
										lowerCAmelCase_ :      Dict    				=				num_channels
										lowerCAmelCase_ :      Dict    				=				use_mask_token
										lowerCAmelCase_ :      Union[str, Any]    				=				use_absolute_position_embeddings
										lowerCAmelCase_ :      List[Any]    				=				use_relative_position_bias
										lowerCAmelCase_ :      Optional[Any]    				=				use_shared_relative_position_bias
										lowerCAmelCase_ :      Dict    				=				layer_scale_init_value
										lowerCAmelCase_ :      Optional[Any]    				=				drop_path_rate
										lowerCAmelCase_ :      Optional[Any]    				=				use_mean_pooling
										# decode head attributes (semantic segmentation)
										lowerCAmelCase_ :      Union[str, Any]    				=				out_indices
										lowerCAmelCase_ :      Any    				=				pool_scales
										# auxiliary head attributes (semantic segmentation)
										lowerCAmelCase_ :      Tuple    				=				use_auxiliary_head
										lowerCAmelCase_ :      Union[str, Any]    				=				auxiliary_loss_weight
										lowerCAmelCase_ :      str    				=				auxiliary_channels
										lowerCAmelCase_ :      str    				=				auxiliary_num_convs
										lowerCAmelCase_ :      Optional[int]    				=				auxiliary_concat_input
										lowerCAmelCase_ :      Union[str, Any]    				=				semantic_loss_ignore_index







class 				snake_case__(							UpperCAmelCase__							):







						'''simple docstring'''




						SCREAMING_SNAKE_CASE__      :  Dict					=							version.parse("""1.11"""							)




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




						@property
						def 						lowercase_ (				self							)					->    float:
										return 1e-4



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


_UpperCAmelCase			:  Optional[int]     =logging.get_logger(__name__)

_UpperCAmelCase			:  Union[str, Any]     ={
    """abeja/gpt-neox-japanese-2.7b""": """https://huggingface.co/abeja/gpt-neox-japanese-2.7b/resolve/main/config.json""",
}







class 				snake_case__(							UpperCAmelCase__							):







						'''simple docstring'''




						SCREAMING_SNAKE_CASE__      :  str					=							"""gpt_neox_japanese"""




						def __init__(				self   ,						__lowercase=3_2_0_0_0   ,						__lowercase=2_5_6_0   ,						__lowercase=3_2   ,						__lowercase=3_2   ,						__lowercase=4   ,						__lowercase="gelu"   ,						__lowercase=1.00   ,						__lowercase=1_0_0_0_0   ,						__lowercase=2_0_4_8   ,						__lowercase=0.02   ,						__lowercase=1e-5   ,						__lowercase=True   ,						__lowercase=3_1_9_9_6   ,						__lowercase=3_1_9_9_9   ,						__lowercase=0.1   ,						__lowercase=0.0   ,						**__lowercase   ,						)					->    str:
										super().__init__(bos_token_id=__lowercase   ,						eos_token_id=__lowercase   ,						**__lowercase							)
										lowerCAmelCase_ :      Optional[Any]    				=				vocab_size
										lowerCAmelCase_ :      Tuple    				=				max_position_embeddings
										lowerCAmelCase_ :      Optional[Any]    				=				hidden_size
										lowerCAmelCase_ :      Optional[Any]    				=				num_hidden_layers
										lowerCAmelCase_ :      str    				=				num_attention_heads
										lowerCAmelCase_ :      str    				=				intermediate_multiple_size
										lowerCAmelCase_ :      str    				=				hidden_act
										lowerCAmelCase_ :      Dict    				=				rotary_pct
										lowerCAmelCase_ :      Union[str, Any]    				=				rotary_emb_base
										lowerCAmelCase_ :      int    				=				initializer_range
										lowerCAmelCase_ :      Any    				=				layer_norm_eps
										lowerCAmelCase_ :      Optional[Any]    				=				use_cache
										lowerCAmelCase_ :      Tuple    				=				attention_dropout
										lowerCAmelCase_ :      Dict    				=				hidden_dropout