code: 
  
  
  
  
  
  
  import copy
  from typing import Dict
  
  from ...configuration_utils import PretrainedConfig
  from ...utils import logging
  from ..auto.configuration_auto import CONFIG_MAPPING
  from ..bit import BitConfig
  
  
  lowerCamelCase										=  logging.get_logger(__name__)
  
  lowerCamelCase										=  {
      '''google/vit-hybrid-base-bit-384''': '''https://huggingface.co/vit-hybrid-base-bit-384/resolve/main/config.json''',
      # See all ViT hybrid models at https://huggingface.co/models?filter=vit
  }
  
  class 					snake_case_							(       lowercase_      ):
  
  
  
  
  
  
  
     """simple docstring"""
  
  
  
     __lowerCAmelCase      =						"""vit-hybrid"""
  
     def __init__(    self:	int   ,       snake_case__:	List[str]=None   ,       snake_case__:	Optional[Any]=768   ,       snake_case__:	Dict=12   ,       snake_case__:	Union[str, Any]=12   ,       snake_case__:	Optional[int]=3_072   ,       snake_case__:	int="gelu"   ,       snake_case__:	Any=0.0   ,       snake_case__:	List[str]=0.0   ,       snake_case__:	str=0.02   ,       snake_case__:	str=1E-12   ,       snake_case__:	List[Any]=224   ,       snake_case__:	Tuple=1   ,       snake_case__:	Tuple=3   ,       snake_case__:	Optional[Any]=[1, 1_024, 24, 24]   ,       snake_case__:	Union[str, Any]=True   ,       **snake_case__:	Optional[Any]   ,       )  ->		List[str]:
  
  
         """simple docstring"""
  
  
  
         super().__init__(**snake_case__	)
  
         if backbone_config is None:
             logger.info('`backbone_config` is `None`. Initializing the config with a `BiT` backbone.'	)
             _lowercase     =	{
                 'global_padding': 'same',
                 'layer_type': 'bottleneck',
                 'depths': [3, 4, 9],
                 'out_features': ['stage3'],
                 'embedding_dynamic_padding': True,
             }
  
         if isinstance(snake_case__   ,       snake_case__	):
             if "model_type" in backbone_config:
                 _lowercase     =	CONFIG_MAPPING[backbone_config['model_type']]
             else:
                 logger.info(
                     '`model_type` is not found in `backbone_config`. Use `Bit` as the backbone configuration class.'	)
                 _lowercase     =	BitConfig
             _lowercase     =	backbone_config_class(**snake_case__	)
  
         _lowercase     =	backbone_featmap_shape
         _lowercase     =	backbone_config
         _lowercase     =	hidden_size
         _lowercase     =	num_hidden_layers
         _lowercase     =	num_attention_heads
         _lowercase     =	intermediate_size
         _lowercase     =	hidden_act
         _lowercase     =	hidden_dropout_prob
         _lowercase     =	attention_probs_dropout_prob
         _lowercase     =	initializer_range
         _lowercase     =	layer_norm_eps
         _lowercase     =	image_size
         _lowercase     =	patch_size
         _lowercase     =	num_channels
         _lowercase     =	qkv_bias
  
     def 			SCREAMING_SNAKE_CASE__				(    self:	List[Any]	)  ->		Dict[str, any]:
  
  
         """simple docstring"""
  
  
  
         _lowercase     =	copy.deepcopy(self.__dict__	)
         _lowercase     =	self.backbone_config.to_dict()
         _lowercase     =	self.__class__.model_type
         return output
  
  
  
  
style_context: 
  
  
  
  
  
  
  from typing import List, Union
  
  from ...configuration_utils import PretrainedConfig
  from ...utils import logging
  
  
  lowerCamelCase										=  logging.get_logger(__name__)
  
  lowerCamelCase										=  {
      '''allenai/led-base-16384''': '''https://huggingface.co/allenai/led-base-16384/resolve/main/config.json''',
      # See all LED models at https://huggingface.co/models?filter=led
  }
  
  class 					snake_case_							(       lowercase_      ):
  
  
  
  
  
  
  
     """simple docstring"""
  
  
  
     __lowerCAmelCase      =						"""led"""
     __lowerCAmelCase      =						{
         """num_attention_heads""": """encoder_attention_heads""",
         """hidden_size""": """d_model""",
         """attention_probs_dropout_prob""": """attention_dropout""",
         """initializer_range""": """init_std""",
     }
  
     def __init__(    self:	int   ,       snake_case__:	str=50_265   ,       snake_case__:	Dict=16_384   ,       snake_case__:	str=1_024   ,       snake_case__:	Tuple=12   ,       snake_case__:	int=4_096   ,       snake_case__:	Union[str, Any]=16   ,       snake_case__:	int=12   ,       snake_case__:	Union[str, Any]=4_096   ,       snake_case__:	Optional[Any]=16   ,       snake_case__:	str=0.0   ,       snake_case__:	Optional[Any]=0.0   ,       snake_case__:	List[Any]=True   ,       snake_case__:	List[Any]=True   ,       snake_case__:	List[Any]="gelu"   ,       snake_case__:	Optional[int]=1_024   ,       snake_case__:	List[Any]=0.1   ,       snake_case__:	int=0.0   ,       snake_case__:	List[str]=0.0   ,       snake_case__:	List[str]=0.02   ,       snake_case__:	Dict=2   ,       snake_case__:	int=0.0   ,       snake_case__:	Optional[int]=1   ,       snake_case__:	Tuple=0   ,       snake_case__:	Union[str, Any]=2   ,       snake_case__:	Union[List[int], int] = 512   ,       **snake_case__:	int   ,       )  ->		List[Any]:
  
  
         """simple docstring"""
  
  
  
         _lowercase     =	vocab_size
         _lowercase     =	max_encoder_position_embeddings
         _lowercase     =	max_decoder_position_embeddings
         _lowercase     =	d_model
         _lowercase     =	encoder_ffn_dim
         _lowercase     =	encoder_layers
         _lowercase     =	encoder_attention_heads
         _lowercase     =	decoder_ffn_dim
         _lowercase     =	decoder_layers
         _lowercase     =	decoder_attention_heads
         _lowercase     =	dropout
         _lowercase     =	attention_dropout
         _lowercase     =	activation_dropout
         _lowercase     =	activation_function
         _lowercase     =	init_std
         _lowercase     =	encoder_layerdrop
         _lowercase     =	decoder_layerdrop
         _lowercase     =	classifier_dropout
         _lowercase     =	use_cache
         _lowercase     =	encoder_layers
         _lowercase     =	attention_window
  
         super().__init__(
             pad_token_id=snake_case__   ,       bos_token_id=snake_case__   ,       eos_token_id=snake_case__   ,       is_encoder_decoder=snake_case__   ,       decoder_start_token_id=snake_case__   ,       **snake_case__   ,       )
  