class_docstr: The HybridGatedMLPContainer supports models for which the first MLP layer
  is represented with two separate weights, one for the activation function
  and one for the gating function.
class_docstr_tok: ["The","HybridGatedMLPContainer","supports","models","for","which","the","first","MLP","layer","is","represented","with","two","separate","weights",",","one","for","the","activation","function","and","one","for","the","gating","function","."]
code: def mlp_inter_mp(self, mp_replace, reversed_dim=False):
      # Only need to alter behavior if we can't do the normal destructive copy
      if self.module.mlp.inter_w is None:
          params = [
              (self.module.mlp.inter_up_w, self.inter_up_w),
              (self.module.mlp.inter_up_b, self.inter_up_b),
              (self.module.mlp.inter_gate_w, self.inter_gate_w),
              (self.module.mlp.inter_gate_b, self.inter_gate_b),
          ]
          for dst, src in params:
              dst = (
                  mp_replace.copy(
                      dst[
                          : self.inter_up_w.shape[0]
                          // mp_replace.mp_size
                      ],
                      src,
                      int8=reversed_dim,
                      allocate_tensor=reversed_dim,
                  )
                  if src is not None
                  else None
              )
      else:
          self.module.mlp.inter_w = mp_replace.strided_copy(
              self.module.mlp.inter_w,
              self._h4h_w,
              num_splits=2,
              int8=reversed_dim,
          )
          self.module.mlp.inter_b = mp_replace.strided_copy(
              self.module.mlp.inter_b,
              self._h4h_b,
              num_splits=2,
              int8=reversed_dim,
          )
  
file_path: DeepSpeed/deepspeed/module_inject/containers/features/gated_mlp.py
imports: from abc import abstractmethod
  from .hybrid_engine import HybridEngineContainer
label_desc: Use image node_id 3 for calling the HybridGatedMLPContainer obj's underlying member method code with example usage: obj.mlp_inter_mp(mp_replace, reversed_dim) without return types