MCPcopy Create free account
hub / github.com/Tiiny-AI/PowerInfer / llama_state_seq_save_file

Function llama_state_seq_save_file

smallthinker/src/llama-context.cpp:2652–2661  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2650}
2651
2652size_t llama_state_seq_save_file(llama_context * ctx, const char * filepath, llama_seq_id seq_id, const llama_token * tokens, size_t n_token_count) {
2653 ctx->synchronize();
2654
2655 try {
2656 return ctx->state_seq_save_file(seq_id, filepath, tokens, n_token_count);
2657 } catch (const std::exception & err) {
2658 LLAMA_LOG_ERROR("%s: error saving sequence state file: %s\n", __func__, err.what());
2659 return 0;
2660 }
2661}
2662
2663size_t llama_state_seq_load_file(llama_context * ctx, const char * filepath, llama_seq_id dest_seq_id, llama_token * tokens_out, size_t n_token_capacity, size_t * n_token_count_out) {
2664 ctx->synchronize();

Callers 1

process_single_taskMethod · 0.85

Calls 3

synchronizeMethod · 0.80
state_seq_save_fileMethod · 0.80
whatMethod · 0.45

Tested by

no test coverage detected