def __init__(
        self,
        past_names: list[str],
        present_names: list[str],
        batch_size: int,
        num_kv_heads: int,
        head_dim: int,
        dtype: str = "float32",
    ):
        """Initialize the cache.

        :param past_names: List of past key and value names.
        :param present_names: List of present key and value names.
            Names must be in the same order as past_names.
        :param batch_size: Batch size.
        :param num_kv_heads: Number of key-value heads.
        :param head_dim: Dimension of each key-value head.
        :param dtype: Data type of the key-value tensors.
        """
        self.past_names = past_names
        self.present_names = present_names
        self.batch_size = batch_size
        self.num_kv_heads = num_kv_heads
        self.head_dim = head_dim
        self.dtype = dtype
Initialize the cache.

        :param past_names: List of past key and value names.
        :param present_names: List of present key and value names.
            Names must be in the same order as past_names.
        :param batch_size: Batch size.
        :param num_kv_heads: Number of key-value heads.
        :param head_dim: Dimension of each key-value head.
        :param dtype: Data type of the key-value tensors.
        
examples/utils/kv_cache_utils.py