                                      CateKV: On Sequential Consistency for Long-Context LLM Inference Acceleration




                       Needle in A Haystack Llama-3.1-8B-Instruct     1.0                              Needle in A Haystack Llama-3.1-8B-Instruct w/ CateKV     1.0
                  0                                                                                0
                 11                                                                               11
                                                                      0.8                                                                                       0.8
                 22                                                                               22
Depth Percent (%)




                                                                                 Depth Percent (%)
                 33                                                                               33
                                                                      0.6                                                                                       0.6
                 44                                                                               44
                 56                                                                               56
                                                                      0.4                                                                                       0.4
                 67                                                                               67
                 78                                                                               78
                                                                      0.2                                                                                       0.2
                 89                                                                               89
                100                                                                              100
                                                                      0.0                                                                                       0.0
                     20K
                     20K
                     30K
                     40K
                     50K
                     60K
                     60K
                     70K
                     80K
                     90K
                        K
                        K
                        K
                        K
                        K




                                                                                                      20K
                                                                                                      20K
                                                                                                      30K
                                                                                                      40K
                                                                                                      50K
                                                                                                      60K
                                                                                                      60K
                                                                                                      70K
                                                                                                      80K
                                                                                                      90K
                                                                                                         K
                                                                                                         K
                                                                                                         K
                                                                                                         K
                                                                                                         K
                    100
                    100
                    110
                    120
                    128




                                                                                                     100
                                                                                                     100
                                                                                                     110
                                                                                                     120
                                                                                                     128
                                     Context Length                                                                       Context Length
                                (a) Llama-3.1-8B-Instruct                                                     (b) Llama-3.1-8B-Instruct w/ CateKV

                      Needle in A Haystack Phi-3-mini-128k-instruct   1.0                              Needle in A Haystack Phi-3-mini-128k-instruct w/CateKV   1.0
                  0                                                                                0
                 11                                                                               11
                                                                      0.8                                                                                       0.8
                 22                                                                               22
Depth Percent (%)




                                                                                 Depth Percent (%)


                 33                                                                               33
                                                                      0.6                                                                                       0.6
                 44                                                                               44
                 56                                                                               56
                                                                      0.4                                                                                       0.4
                 67                                                                               67
                 78                                                                               78
                                                                      0.2                                                                                       0.2
                 89                                                                               89
                100                                                                              100
                                                                      0.0                                                                                       0.0
                     16K
                     24K
                     32K
                     39K
                     47K
                     55K
                     63K
                     70K
                     78K
                     86K
                     94K
                        K
                        K
                        K
                        K




                                                                                                      16K
                                                                                                      24K
                                                                                                      32K
                                                                                                      39K
                                                                                                      47K
                                                                                                      55K
                                                                                                      63K
                                                                                                      70K
                                                                                                      78K
                                                                                                      86K
                                                                                                      94K
                                                                                                         K
                                                                                                         K
                                                                                                         K
                                                                                                         K
                    102
                    109
                    117
                    125




                                                                                                     102
                                                                                                     109
                                                                                                     117
                                                                                                     125
                                     Context Length                                                                       Context Length
                              (c) Phi-3-mini-128k-instruct                                                  (d) Phi-3-mini-128k-instruct w/ CateKV

                            Needle in A Haystack Yi-9B-200K           1.0                                    Needle in A Haystack Yi-9B-200K w/CateKV           1.0
                  0                                                                                0
                 11                                                                               11
                                                                      0.8                                                                                       0.8
                 22                                                                               22
Depth Percent (%)




                                                                                 Depth Percent (%)




                 33                                                                               33
                                                                      0.6                                                                                       0.6
                 44                                                                               44
                 56                                                                               56
                                                                      0.4                                                                                       0.4
                 67                                                                               67
                 78                                                                               78
                                                                      0.2                                                                                       0.2
                 89                                                                               89
                100                                                                              100
                                                                      0.0                                                                                       0.0
                     20K
                     30K
                     40K
                     60K
                     70K
                     80K
                        K
                        K
                        K
                        K
                        K
                        K
                        K
                        K
                        K




                                                                                                      20K
                                                                                                      30K
                                                                                                      40K
                                                                                                      60K
                                                                                                      70K
                                                                                                      80K
                                                                                                         K
                                                                                                         K
                                                                                                         K
                                                                                                         K
                                                                                                         K
                                                                                                         K
                                                                                                         K
                                                                                                         K
                                                                                                         K
                    100
                    110
                    120
                    130
                    150
                    160
                    170
                    190
                    200




                                                                                                     100
                                                                                                     110
                                                                                                     120
                                                                                                     130
                                                                                                     150
                                                                                                     160
                                                                                                     170
                                                                                                     190
                                                                                                     200




                                     Context Length                                                                       Context Length
                                       (e) Yi-9B-200k                                                                (f) Yi-9B-200k w/ CateKV

Figure 10: NIAH Results on Llama-3.1-8B-Instruct(Meta AI, 2024), Phi-3-mini-128k-instruct (Abdin et al., 2024) and
Yi-9B-200k (AI et al., 2024)




                                                                            17
