You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have been trying to test the new kv cache loading and ran into an issue, it seems to segfault when running llama_eval.
To save the current cache i do:
@abetlen i've used some of the functions like "llama_cpp.llama_get_kv_cache_size" and "llama.last_n_tokens_data.copy()" but it turns out that these functions do not exist. how does this happen?
I'm trying to do the same, how can I get and reuse the KV cache in llama-cpp-python, or at least how can I use the KV cache in llama-cpp that I can generate from model in its standard format? @abetlen
Activity
abetlen commentedon Apr 3, 2023
Unfortunately it looks like the
kv_stateAPI is still not enough to restore the model state see issue.This is something I'm following so once it's possible I'll drop an example.
abetlen commentedon Apr 8, 2023
@SagsMug well this is emberrasing, so my c++ example from that thread apparently was correct haha. Here is the general structure.
liyanbo2 commentedon May 21, 2024
@abetlen i've used some of the functions like "llama_cpp.llama_get_kv_cache_size" and "llama.last_n_tokens_data.copy()" but it turns out that these functions do not exist. how does this happen?
KaiLv69 commentedon Sep 2, 2024
same question. how can i manipulate KV cache in lastest version?
asdkazmi commentedon Dec 30, 2024
I'm trying to do the same, how can I get and reuse the KV cache in llama-cpp-python, or at least how can I use the KV cache in llama-cpp that I can generate from model in its standard format? @abetlen