class_docstr: Inference model implementation for ragged batching for Llama-2 models.
class_docstr_tok: ["Inference","model","implementation","for","ragged","batching","for","Llama-2","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 ..None import *
  from ...modules.configs import *
  from ...modules.interfaces import *
  from ...ragged import RaggedBatchWrapper
  from .containers import PhiNonTransformerContainer, PhiTransformerContainer
label_desc: Use image node_id 9 for calling the PhiInferenceModel obj's underlying member method code with example usage: obj.activation_dtype() and returns: DtypeEnum, DtypeEnum