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

Function llama_state_load_file

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

Source from the content-addressed store, hash-verified

2612}
2613
2614bool llama_state_load_file(llama_context * ctx, const char * path_session, llama_token * tokens_out, size_t n_token_capacity, size_t * n_token_count_out) {
2615 ctx->synchronize();
2616
2617 try {
2618 return ctx->state_load_file(path_session, tokens_out, n_token_capacity, n_token_count_out);
2619 } catch (const std::exception & err) {
2620 LLAMA_LOG_ERROR("%s: error loading session file: %s\n", __func__, err.what());
2621 return false;
2622 }
2623}
2624
2625bool llama_state_save_file(llama_context * ctx, const char * path_session, const llama_token * tokens, size_t n_token_count) {
2626 ctx->synchronize();

Callers 2

mainFunction · 0.85
llama_load_session_fileFunction · 0.85

Calls 3

synchronizeMethod · 0.80
state_load_fileMethod · 0.80
whatMethod · 0.45

Tested by

no test coverage detected