save_load_state

Demonstrate context-state save and load for reproducible generation.

Encodes a prompt into context 1, saves the state to a file, then restores it in context 2 and generates the same token sequence — verifying that both runs match.

Usage: `save-load-state -m model.gguf [-n n_predict] [-ngl n_gpu_layers] [-s state_file] prompt`

Members

Functions

main
int main(string[] args)
Undocumented in source. Be warned that the author may not have intended to support it.
printUsage
int printUsage(string prog)
Undocumented in source. Be warned that the author may not have intended to support it.

Meta