class_docstr: Inference model implementation for ragged batching for Mistral models.
class_docstr_tok: ["Inference","model","implementation","for","ragged","batching","for","Mistral","models","."]
code: def mlp_activation_fn(self) -> ActivationType:
      activation = self._config.hidden_act.lower()
      if activation == "gelu":
          return ActivationType.GEGLU
      elif activation == "relu":
          return ActivationType.ReGLU
      elif activation == "gegelu":
          return ActivationType.GEGLU
      elif activation == "silu":
          return ActivationType.SiGLU
      else:
          raise NotImplementedError(
              f"Activation {activation} not supported"
          )
  
imports: from typing import Iterable, Optional, Tuple
  import torch
  import deepspeed.comm
  from ...allocator import empty_from
  from ...inference_utils import ActivationType, DtypeEnum
  from ...model_implementations import *
  from ...modules.configs import *
  from ...modules.interfaces import *
  from ...modules import heuristics
  from ...ragged import RaggedBatchWrapper
  from .container import MistralNonTransformerContainer, MistralTransformerContainer
label_desc: Use image node_id 10 for calling the MistralInferenceModel obj's underlying member method code with example usage: obj.mlp_activation_fn() and returns: ActivationType, ActivationType, ActivationType, ActivationType