| 2650 | } |
| 2651 | |
| 2652 | size_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 | |
| 2663 | size_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(); |
no test coverage detected