class_docstr: Base MixIn for all Post-Normalization modules. The interface represented by this
  module is:
  
  residual, hidden_out = norm(residual + hidden_in)
  
  If residual and hidden_out are the same data type, then they may alias each other.
  Furthermore, residual should be updated in-place.
class_docstr_tok: ["Base","MixIn","for","all","Post-Normalization","modules",".","The","interface","represented","by","this","module","is",":","residual",",","hidden_out","=","norm","(","residual","+","hidden_in",")","If","residual","and","hidden_out","are","the","same","data","type",",","then","they","may","alias","each","other",".","Furthermore",",","residual","should","be","updated","in-place","."]
docstr: Parameters:
      residual (torch.Tensor): Residual tensor.
      hidden_states (torch.Tensor): Hidden states tensor.
  
  Returns:
      (torch.Tensor, torch.Tensor): Tuple of residual and hidden states.
          Hidden states may alias with residual.
docstr_tok: ["Parameters",":","residual","(","torch.Tensor",")",":","Residual","tensor",".","hidden_states","(","torch.Tensor",")",":","Hidden","states","tensor",".","Returns",":","(","torch.Tensor",",","torch.Tensor",")",":","Tuple","of","residual","and","hidden","states",".","Hidden","states","may","alias","with","residual","."]
code: def forward(
      self,
      residual: torch.Tensor,
      hidden_states: torch.Tensor,
      gamma: torch.Tensor,
      beta: Optional[torch.Tensor] = None,
  ) -> Tuple[torch.Tensor, torch.Tensor]:
      """
      Parameters:
          residual (torch.Tensor): Residual tensor.
          hidden_states (torch.Tensor): Hidden states tensor.
  
      Returns:
          (torch.Tensor, torch.Tensor): Tuple of residual and hidden states.
              Hidden states may alias with residual.
      """
      raise NotImplementedError()
  
file_path: DeepSpeed/deepspeed/inference/v2/modules/interfaces/post_norm_base.py
imports: from abc import abstractmethod
  from typing import Any, Dict, Optional, Tuple, Type
  import torch
  from deepspeed.runtime.config_utils import DeepSpeedConfigModel
  from ..ds_module import DSModuleBase
  from ..configs.norm_config import DSNormConfig
  from ..module_registry import DSModuleRegistryBase
  from ...inference_parameter import InferenceParameter
label_desc: Use image node_id 4 for calling the DSPostNormBase obj's underlying member method code with example usage: obj.forward(residual, hidden_states, gamma, beta) without return types