passkey : apply kv cache updates explicitly
ggml-ci
This commit is contained in:
parent
8f9fe6dd7f
commit
79e276175e
1 changed files with 3 additions and 0 deletions
|
@ -148,6 +148,7 @@ int main(int argc, char ** argv) {
|
|||
|
||||
llama_kv_cache_seq_add(ctx, 0, n_past - n_batch, n_past, ib*bd);
|
||||
llama_kv_cache_seq_div(ctx, 0, n_past - n_batch + ib*bd, n_past + ib*bd, n_grp);
|
||||
llama_kv_cache_apply (ctx);
|
||||
|
||||
n_past -= bd;
|
||||
}
|
||||
|
@ -181,6 +182,7 @@ int main(int argc, char ** argv) {
|
|||
|
||||
llama_kv_cache_seq_rm (ctx, 0, n_keep , n_keep + n_discard);
|
||||
llama_kv_cache_seq_add(ctx, 0, n_keep + n_discard, n_ctx, -n_discard);
|
||||
llama_kv_cache_apply (ctx);
|
||||
|
||||
n_past -= n_discard;
|
||||
|
||||
|
@ -210,6 +212,7 @@ int main(int argc, char ** argv) {
|
|||
|
||||
llama_kv_cache_seq_rm (ctx, 0, n_keep , n_keep + n_discard);
|
||||
llama_kv_cache_seq_add(ctx, 0, n_keep + n_discard, n_ctx, -n_discard);
|
||||
llama_kv_cache_apply (ctx);
|
||||
|
||||
n_past -= n_discard;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue