code: def init_kv_cache(
      batch_size,
      num_heads,
      head_dim,
      current_length,
      max_length,
      dtype,
      device,
  ):
      key_cache_storage = torch.empty(
          batch_size,
          num_heads,
          max_length,
          head_dim,
          dtype=dtype,
          device=device,
      )
      value_cache_storage = torch.empty(
          batch_size,
          num_heads,
          max_length,
          head_dim,
          dtype=dtype,
          device=device,
      )
  
      key_cache = key_cache_storage.as_strided(
          (batch_size, num_heads, current_length, head_dim),
          key_cache_storage.stride(),
          storage_offset=0,
      )
      value_cache = value_cache_storage.as_strided(
          (batch_size, num_heads, current_length, head_dim),
          value_cache_storage.stride(),
          storage_offset=0,
      )
      return key_cache, value_cache
  
imports: import os
  import torch
  from bigdl.llm.utils.common import invalidInputError
  from bigdl.llm.ggml.quantize import ggml_tensor_qtype
  from bigdl.llm.transformers.utils import get_ipex_version, get_xpu_device_type
label_desc: Use image node_id 1 for calling a global function with example usage: init_kv_cache(batch_size, num_heads, head_dim, current_length, max_length, dtype, device) and returns: key_cache,  value_cache