code: def append_fp8_kv_cache(k_cache, v_cache, key, value):
      batch_size, num_heads, cur_length, head_dim = k_cache.shape
      new_length = cur_length + key.size(2)
      new_size = (batch_size, num_heads, new_length, head_dim)
  
      new_k_cache = k_cache.as_strided(
          new_size, k_cache.stride(), storage_offset=0
      )
      new_v_cache = v_cache.as_strided(
          new_size, v_cache.stride(), storage_offset=0
      )
  
      fp8_key = key.half().view(torch.uint8)[:, :, :, 1::2]
      new_k_cache[:, :, cur_length:new_length, :] = fp8_key
      fp8_value = value.half().view(torch.uint8)[:, :, :, 1::2]
      new_v_cache[:, :, cur_length:new_length, :] = fp8_value
  
      return new_k_cache, new_v_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 7 for calling a global function with example usage: append_fp8_kv_cache(k_cache, v_cache, key, value) and returns: new_k_cache,  new_v_cache