code: def __init__(self, config: MptConfig):
      super().__init__()
      hidden_size = config.hidden_size
  
      self.norm_1 = LayerNorm(
          hidden_size, eps=config.layer_norm_epsilon
      )
      # backward compatibility with weights on the Hub
      self.norm_1.bias = None
  
      self.num_heads = config.n_heads
      self.attn = MptAttention(config)
  
      self.norm_2 = LayerNorm(
          hidden_size, eps=config.layer_norm_epsilon
      )
      # backward compatibility with weights on the Hub
      self.norm_2.bias = None
  
      self.ffn = MptMLP(config)
  
      self.dropout_rate = config.attn_config.attn_pdrop
      self.resid_attn_dropout = nn.Dropout(self.dropout_rate)
  
imports: import math
  from typing import Optional, Tuple, Union
  import torch
  import torch.utils.checkpoint
  from torch import nn
  from torch.nn import BCEWithLogitsLoss, CrossEntropyLoss, LayerNorm, MSELoss
  from torch.nn import functional
  from ...file_utils import add_code_sample_docstrings, add_start_docstrings, add_start_docstrings_to_model_forward
  from ...modeling_attn_mask_utils import _prepare_4d_causal_attention_mask
  from ...modeling_outputs import BaseModelOutputWithPastAndCrossAttentions, CausalLMOutputWithCrossAttentions, QuestionAnsweringModelOutput, SequenceClassifierOutputWithPast, TokenClassifierOutput
  from ...modeling_utils import PreTrainedModel
  from ...utils import logging
  from .configuration_mpt import MptConfig
label_desc: Use image node_id 1 to create a new MptBlock object from inherited base classes: nn with example: obj = MptBlock(config)