save and load state upgraded to 3 available states

This commit is contained in:
Concedo 2025-06-04 22:09:40 +08:00
parent 06d2bc3404
commit 736030bb9f
7 changed files with 206 additions and 82 deletions

View file

@ -380,21 +380,21 @@ extern "C"
{
return gpttype_calc_new_state_tokencount();
}
size_t calc_old_state_kv() //returns how much memory current savestate is using
size_t calc_old_state_kv(int slot) //returns how much memory current savestate is using
{
return gpttype_calc_old_state_kv();
return gpttype_calc_old_state_kv(slot);
}
size_t calc_old_state_tokencount()
size_t calc_old_state_tokencount(int slot)
{
return gpttype_calc_old_state_tokencount();
return gpttype_calc_old_state_tokencount(slot);
}
size_t save_state_kv() //triggers the save kv state of current ctx to memory
size_t save_state_kv(int slot) //triggers the save kv state of current ctx to memory
{
return gpttype_save_state_kv();
return gpttype_save_state_kv(slot);
}
bool load_state_kv() //triggers the load kv state of current ctx to memory
bool load_state_kv(int slot) //triggers the load kv state of current ctx to memory
{
return gpttype_load_state_kv();
return gpttype_load_state_kv(slot);
}
bool clear_state_kv()
{