code: def __init__(
      self,
      vocab_size=32128,
      d_model=768,
      d_kv=64,
      d_ff=2048,
      expert_capacity=64,
      num_layers=12,
      num_sparse_encoder_layers=3,
      num_decoder_layers=12,
      num_sparse_decoder_layers=3,
      num_heads=12,
      num_experts=8,
      router_bias=False,
      router_jitter_noise=0.01,
      router_dtype="float32",
      router_ignore_padding_tokens=False,
      relative_attention_num_buckets=32,
      relative_attention_max_distance=128,
      dropout_rate=0.1,
      layer_norm_epsilon=1e-6,
      router_z_loss_coef=0.001,
      router_aux_loss_coef=0.001,
      initializer_factor=1.0,
      dense_act_fn="relu",
      is_encoder_decoder=True,
      add_router_probs=False,
      use_cache=True,
      pad_token_id=0,
      eos_token_id=1,
      **kwargs,
  ):
      self.vocab_size = vocab_size
      self.d_model = d_model
      self.d_kv = d_kv
      self.d_ff = d_ff
  
      self.num_sparse_encoder_layers = num_sparse_encoder_layers
  
      self.num_layers = num_layers
      self.num_decoder_layers = (
          num_decoder_layers
          if num_decoder_layers is not None
          else self.num_layers
      )  # default = symmetry
      self.num_sparse_decoder_layers = num_sparse_decoder_layers
  
      # This tells us, each how many encoder layer we'll have to set a sparse layer.
      if self.num_sparse_encoder_layers > 0:
          self.encoder_sparse_step = (
              self.num_layers // self.num_sparse_encoder_layers
          )
      else:
          self.encoder_sparse_step = (
              self.num_layers
          )  # HACK: this will create 0 sparse layers
  
      # This tells us, each how many encoder layer we'll have to set a sparse layer.
      if self.num_sparse_decoder_layers > 0:
          self.decoder_sparse_step = (
              self.num_decoder_layers // self.num_sparse_decoder_layers
          )
      else:
          self.decoder_sparse_step = (
              self.num_decoder_layers
          )  # HACK: this will create 0 sparse layers
  
      self.num_heads = num_heads
      self.num_experts = num_experts
      self.expert_capacity = expert_capacity
      self.router_bias = router_bias
      self.router_jitter_noise = router_jitter_noise
      if router_dtype not in ["float32", "float16", "bfloat16"]:
          raise ValueError(
              f"`router_dtype` must be one of 'float32', 'float16' or 'bfloat16', got {router_dtype}"
          )
      self.router_dtype = router_dtype
  
      self.router_ignore_padding_tokens = router_ignore_padding_tokens
      self.relative_attention_num_buckets = (
          relative_attention_num_buckets
      )
      self.relative_attention_max_distance = (
          relative_attention_max_distance
      )
  
      self.dropout_rate = dropout_rate
      self.layer_norm_epsilon = layer_norm_epsilon
      self.initializer_factor = initializer_factor
      self.use_cache = use_cache
      self.add_router_probs = add_router_probs
  
      self.router_z_loss_coef = router_z_loss_coef
      self.router_aux_loss_coef = router_aux_loss_coef
      self.dense_act_fn = dense_act_fn
  
      super().__init__(
          pad_token_id=pad_token_id,
          eos_token_id=eos_token_id,
          is_encoder_decoder=is_encoder_decoder,
          **kwargs,
      )
  
imports: from ...configuration_utils import PretrainedConfig
  from ...utils import logging
label_desc: Use image node_id 1 to create a new SwitchTransformersConfig object from inherited base classes: PretrainedConfig with example: obj = SwitchTransformersConfig(vocab_size, d_model, d_kv, d_ff, expert_capacity, num_layers, num_sparse_encoder_layers, num_decoder_layers, num_sparse_decoder_layers, num_heads, num_experts, router_bias, router_jitter_noise, router_dtype, router_ignore_padding_tokens, relative_attention_num_buckets, relative_attention_max_distance, dropout_rate, layer_norm_epsilon, router_z_loss_coef, router_aux_loss_coef, initializer_factor, dense_act_fn, is_encoder_decoder, add_router_probs, use_cache, pad_token_id, eos_token_id)