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 activation_dtype(self) -> DtypeEnum:
      if self._config.torch_dtype == torch.float16:
          return DtypeEnum.fp16
      elif self._config.torch_dtype == torch.bfloat16:
          return DtypeEnum.bf16
      else:
          raise NotImplementedError("Only fp16 and bf16 are 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 9 for calling the MistralInferenceModel obj's underlying member method code with example usage: obj.activation_dtype() and returns: DtypeEnum, DtypeEnum