kv_cache management
This commit is contained in:
parent
1665ad8bf1
commit
21431197a1
1 changed files with 4 additions and 0 deletions
|
@ -130,6 +130,10 @@ int main(int argc, char ** argv){
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// KV cache management
|
||||||
|
// clean the cache of draft tokens that weren't accepted
|
||||||
|
llama_kv_cache_seq_rm(ctx, 0, n_past, -1);
|
||||||
|
|
||||||
llama_batch_clear(batch_tgt);
|
llama_batch_clear(batch_tgt);
|
||||||
llama_batch_add(batch_tgt, draft[0], n_past, { 0 }, true);
|
llama_batch_add(batch_tgt, draft[0], n_past, { 0 }, true);
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue