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've been playing with the code since few days. I'm trying to find a way to save the internal state of the model (or its context) that can be reused later. But until now it still doesn't work. I don't know if I'm missing something (I'm not good at all when talking about machine learning, I'm working more on system development.)
Here what I tried (inspired from code of main.cpp)
Load the model using llama_init_from_file
Call llama_eval on a prompt, for example " Below is an instruction that describes a task. Write a response that appropriately completes the request.\n\n"
Call llama_eval on a instruction, for example "### Instruction: Hi, I'm Xuan Son."
Save the kv_self buffer using llama_get_kv_cache => Expected: the saved data contains information about my name
Ask for what is my name?, the model correctly response that my name is Xuan Son
Exit the program
Re-run the program
Reload llama_init_from_file then kv_cache using llama_set_kv_cache => Expected: the loaded data contains information about my name
Ask for what is my name?, the model responses with nonsense words just love with 12 want some you, he saids
The text was updated successfully, but these errors were encountered:
Hi,
Thanks for your hard work on this project.
I've been playing with the code since few days. I'm trying to find a way to save the internal state of the model (or its context) that can be reused later. But until now it still doesn't work. I don't know if I'm missing something (I'm not good at all when talking about machine learning, I'm working more on system development.)
Here what I tried (inspired from code of
main.cpp
)llama_init_from_file
llama_eval
on a prompt, for example" Below is an instruction that describes a task. Write a response that appropriately completes the request.\n\n"
llama_eval
on a instruction, for example"### Instruction: Hi, I'm Xuan Son."
kv_self
buffer usingllama_get_kv_cache
=> Expected: the saved data contains information about my namewhat is my name?
, the model correctly response that my name is Xuan Sonllama_init_from_file
thenkv_cache
usingllama_set_kv_cache
=> Expected: the loaded data contains information about my namewhat is my name?
, the model responses with nonsense wordsjust love with 12 want some you, he saids
The text was updated successfully, but these errors were encountered: