

from collections import OrderedDict
from typing import Mapping

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


UpperCamelCase__					: Dict								=      logging.get_logger(__name__)

UpperCamelCase__					: Dict								=      {
    "squeezebert/squeezebert-uncased": (
        "https://huggingface.co/squeezebert/squeezebert-uncased/resolve/main/config.json"
    ),
    "squeezebert/squeezebert-mnli": "https://huggingface.co/squeezebert/squeezebert-mnli/resolve/main/config.json",
    "squeezebert/squeezebert-mnli-headless": (
        "https://huggingface.co/squeezebert/squeezebert-mnli-headless/resolve/main/config.json"
    ),
}



class  __snake_case					(      __A    ):
		__lowerCAmelCase       :		Union[str, Any]  	=					SQUEEZEBERT_PRETRAINED_CONFIG_ARCHIVE_MAP
		__lowerCAmelCase       :		int  	=					'squeezebert'

		def __init__(   self  ,						_A=30522  ,						_A=768  ,						_A=12  ,						_A=12  ,						_A=3072  ,						_A="gelu"  ,						_A=0.1  ,						_A=0.1  ,						_A=512  ,						_A=2  ,						_A=0.0_2  ,						_A=1E-12  ,						_A=0  ,						_A=768  ,						_A=4  ,						_A=4  ,						_A=4  ,						_A=1  ,						_A=4  ,						_A=4  ,						**_A  ,						):
						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_													=  embedding_size
						SCREAMING_SNAKE_CASE_													=  q_groups
						SCREAMING_SNAKE_CASE_													=  k_groups
						SCREAMING_SNAKE_CASE_													=  v_groups
						SCREAMING_SNAKE_CASE_													=  post_attention_groups
						SCREAMING_SNAKE_CASE_													=  intermediate_groups
						SCREAMING_SNAKE_CASE_													=  output_groups






class  __snake_case					(      __A    ):

		@property
		def   lowerCAmelCase__       (   self):

						if self.task == "multiple-choice":
										SCREAMING_SNAKE_CASE_													=  {0: "batch", 1: "choice", 2: "sequence"}
						else:
										SCREAMING_SNAKE_CASE_													=  {0: "batch", 1: "sequence"}
						return OrderedDict(
						    [
						        ('input_ids', dynamic_axis),
						        ('attention_mask', dynamic_axis),
						        ('token_type_ids', dynamic_axis),
						    ])





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


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

UpperCamelCase__					: int								=      {
    "google/pegasus-x-base": "https://huggingface.co/google/pegasus-x-base/resolve/main/config.json",
    "google/pegasus-x-large": "https://huggingface.co/google/pegasus-x-large/resolve/main/config.json",
    # See all PEGASUS-X models at https://huggingface.co/models?filter=pegasus-x
}



class  __snake_case					(      lowerCAmelCase__    ):
  __lowerCAmelCase       :		List[Any]  	=					'pegasus_x'
  __lowerCAmelCase       :		Optional[int]  	=					['past_key_values']
  __lowerCAmelCase       :		List[str]  	=					{'num_attention_heads': 'encoder_attention_heads', 'hidden_size': 'd_model'}

  def __init__(   self  ,						_A=96103  ,						_A=16384  ,						_A=16  ,						_A=4096  ,						_A=16  ,						_A=16  ,						_A=4096  ,						_A=16  ,						_A=0.0  ,						_A=0.0  ,						_A=True  ,						_A=True  ,						_A="gelu"  ,						_A=1024  ,						_A=0.1  ,						_A=0.0  ,						_A=0.0  ,						_A=0.0_2  ,						_A=0  ,						_A=True  ,						_A=0  ,						_A=1  ,						_A=1  ,						_A=32  ,						_A=512  ,						_A=True  ,						**_A  ,						):
      SCREAMING_SNAKE_CASE_													=  vocab_size
      SCREAMING_SNAKE_CASE_													=  max_position_embeddings
      SCREAMING_SNAKE_CASE_													=  d_model
      SCREAMING_SNAKE_CASE_													=  encoder_ffn_dim
      SCREAMING_SNAKE_CASE_													=  encoder_layers
      SCREAMING_SNAKE_CASE_													=  encoder_attention_heads
      SCREAMING_SNAKE_CASE_													=  decoder_ffn_dim
      SCREAMING_SNAKE_CASE_													=  decoder_layers
      SCREAMING_SNAKE_CASE_													=  decoder_attention_heads
      SCREAMING_SNAKE_CASE_													=  dropout
      SCREAMING_SNAKE_CASE_													=  attention_dropout
      SCREAMING_SNAKE_CASE_													=  activation_dropout
      SCREAMING_SNAKE_CASE_													=  activation_function
      SCREAMING_SNAKE_CASE_													=  init_std
      SCREAMING_SNAKE_CASE_													=  encoder_layerdrop
      SCREAMING_SNAKE_CASE_													=  decoder_layerdrop
      SCREAMING_SNAKE_CASE_													=  use_cache
      SCREAMING_SNAKE_CASE_													=  encoder_layers
      SCREAMING_SNAKE_CASE_													=  scale_embedding  # scale factor will be sqrt(d_model) if True

      SCREAMING_SNAKE_CASE_													=  num_global_tokens
      SCREAMING_SNAKE_CASE_													=  block_size
      SCREAMING_SNAKE_CASE_													=  stagger_local_blocks

      super().__init__(
          pad_token_id=_A  ,						eos_token_id=_A  ,						is_encoder_decoder=_A  ,						decoder_start_token_id=_A  ,						forced_eos_token_id=_A  ,						**_A  ,						)

  @property
  def   lowerCAmelCase__       (   self):
      return self.encoder_attention_heads


  @property
  def   lowerCAmelCase__       (   self):
      return self.d_model


