Response to additional questions (Part 1)
Thanks to the reviewer for the valuable comments.
**Q1: The KV compression can be useful for longer context based evaluation.**
Firstly, in alignment with prior literature [1-4], we have evaluated our method on three challenging and widely-recognized benchmarks, including the long context Line Retrieval task. As highlighted in Table 3, our approach consistently surpasses previous state-of-the-art methods, underscoring its effectiveness. Secondly, as mentioned in lines 36-38 of our paper, during **batch inference**, the KV cache with an input length of approximately 4K is already a significant bottleneck in the storage system. For example, the KV cache can occupy 1.2TB of memory space with a batch size of 64 and an input length of 4096. Moreover, to further address your point, we have also evaluated the performance of ZipCache on LongBench using the longchat-7b-v1.5-32k model, as shown below. Due to the limited time slot of the rebuttal, we will conduct experiments on more long-context tasks and add the results to the revised version.
Table: Performance comparisons on LongBench with LongChat-v1.5-7B-32k. The saliency ratio is 60% for ZipCache.
| Model | Method | TREC↑ | SAMSum↑ | LCC↑ | RepoBench-P↑ |
|------------------------|---------|-------|--------|-------|-------------|
| **LongChat-v1.5-7B-32k**| FP16 | 66.06 | 41.19 | 52.96 | 56.8 |
| | KIVI-2 | **66.0** | 40.57 | 47.99 | 52.6 |
| | ZipCache| **66.0** | **40.64** | **51.25** | **52.87** |
**Q2: Similar idea of normalized attention scores has been proposed.**
Thank you for sharing this literature [5] and we will include it in the references in the revised version.
However, we would like to emphasize that our proposed saliency metric can be applied universally to all tokens without exception, whereas the approach in [5] excludes certain tokens from the eviction scope based on their standard deviation. Additionally, our work provides a comprehensive analysis of the limitations of using accumulated attention scores as a saliency metric, as discussed in lines 200-210 and illustrated in Figure 3 of the paper.
**Q3: The generation efficiency is compared with only MiKV and the comparison is unfair.**
As referred to Figure 1 in the paper, Table A in the Appendix and Table A in the rebuttal PDF, we have compared the generation efficiency with H2O, GEAR and KIVI. Moreover, the previous adaptive KV cache compression methods [1-2] are not compatible with FlashAttention, which is a major drawback of them. By contrast, our method integrates seamlessly with FlashAttention, enhancing generation speed.
**Q4: How do probe tokens help perform flashattention or flashdecoding efficiently?**
Firstly, as referred to lines 230-232 and Equation (9) of the paper, we select a small set of probe tokens and compute attention scores using their queries, which allows us to approximate the saliency for all tokens. Once we have determined the token saliency, we can efficiently compute the attention output using FlashAttention. For a more detailed explanation of our method, please refer to Algorithm 2 and Algorithm 3 in the Appendix.
**Q5: Do you implement flashattention or flashdecoding during decoding phase?**
Yes. As mentioned in lines 267-268, 304-307, and detailed in Algorithm 3 in the Appendix, we implement FlashDecoding during the decoding phase. Similar to the prefill phase, we explicitly compute attention scores for a small set of probe tokens to approximate the saliency of all tokens, enabling the majority of tokens to be computed using FlashDecoding.
**Q6: How does the selection of probe tokens help guide the bit width assignment of salient tokens if a token does not have any representative in the probe token set.**
As mentioned in lines 254-255 of the paper, our approach to selecting probe tokens involves a **hybrid** strategy, where 5% of the tokens are the **latest** ones, and 5% are randomly selected. All previous tokens are attended when computing attention scores for the latest token.
**Q7: The algorithm of decode stage seems ambiguous. For example, what is the precision of the KV cache for new tokens.**
As referred to lines 267-268 of the paper, we implement a streaming strategy during the decoding phase, where the new KV cache is quantized every 100 new tokens generated. This approach is consistent with the strategy used in GEAR [3] and is designed to enhance decoding speed. Consequently, before reaching the 100-token threshold, the new KV cache is maintained in full precision. After 100 new tokens are generated, all KV cache will be quantized based on their estimated saliency.
**Q8: Attention and softmax need to be computed at high precision to have numerical stability.**
Indeed. The KV cache will be dequantized to full-precision when calculating attention. This is consistent with previous KV cache quantization work [2-4].