docstr: Number of free KV blocks. This is a tensor of shape [n_kv_cache_groups] where each
  element is the number of free blocks in the corresponding KV cache group.
docstr_tok: ["Number","of","free","KV","blocks",".","This","is","a","tensor","of","shape","[","n_kv_cache_groups","]","where","each","element","is","the","number","of","free","blocks","in","the","corresponding","KV","cache","group","."]
code: def free_blocks(self) -> torch.Tensor:
      """
      Number of free KV blocks. This is a tensor of shape [n_kv_cache_groups] where each
      element is the number of free blocks in the corresponding KV cache group.
      """
      return self._state_manager.free_blocks
  
imports: import os
  import json
  import pickle
  from typing import Iterable, Tuple
  import torch
  import deepspeed.comm
  from deepspeed.accelerator import get_accelerator
  from deepspeed.comm.comm import init_distributed
  from .model_implementations import InferenceV2Policy
  from .logging import inference_logger
  from .ragged import DSStateManager, RaggedBatchWrapper, PlaceholderSequenceDescriptor
  from .scheduling_utils import SchedulingError, SchedulingResult
  from .model_implementations.flat_model_helpers import make_param_filename, make_metadata_filename
  from .model_implementations.inference_model_base import DSInferenceModelBase
  from .config_v2 import RaggedInferenceEngineConfig
label_desc: Use image node_id 1 for calling the InferenceEngineV2 obj's underlying member method code with example usage: obj.free_blocks() and returns: self