@@ -4981,63 +4981,46 @@ void llama_context_enc_dec::perf_reset() {
4981
4981
4982
4982
//
4983
4983
// state save/load
4984
+ // TODO: for now dump just the decoder state, in the future dump both
4984
4985
//
4985
4986
4986
4987
size_t llama_context_enc_dec::state_get_size () {
4987
- GGML_ABORT ( " TODO: implement " );
4988
+ return ctx_dec-> state_get_size ( );
4988
4989
}
4989
4990
4990
4991
size_t llama_context_enc_dec::state_get_data ( uint8_t * dst, size_t size) {
4991
- GGML_UNUSED (dst);
4992
- GGML_UNUSED (size);
4993
- GGML_ABORT (" TODO: implement" );
4992
+ return ctx_dec->state_get_data (dst, size);
4994
4993
}
4995
4994
4996
4995
size_t llama_context_enc_dec::state_set_data (const uint8_t * src, size_t size) {
4997
- GGML_UNUSED (src);
4998
- GGML_UNUSED (size);
4999
- GGML_ABORT (" TODO: implement" );
4996
+ return ctx_dec->state_set_data (src, size);
5000
4997
}
5001
4998
5002
4999
size_t llama_context_enc_dec::state_seq_get_size (llama_seq_id seq_id) {
5003
- GGML_UNUSED (seq_id);
5004
- GGML_ABORT (" TODO: implement" );
5000
+ return ctx_dec->state_seq_get_size (seq_id);
5005
5001
}
5006
5002
5007
5003
size_t llama_context_enc_dec::state_seq_get_data (llama_seq_id seq_id, uint8_t * dst, size_t size) {
5008
- GGML_UNUSED (seq_id);
5009
- GGML_UNUSED (dst);
5010
- GGML_UNUSED (size);
5011
- GGML_ABORT (" TODO: implement" );
5004
+ return ctx_dec->state_seq_get_data (seq_id, dst, size);
5012
5005
}
5013
5006
5014
5007
size_t llama_context_enc_dec::state_seq_set_data (llama_seq_id seq_id, const uint8_t * src, size_t size) {
5015
- GGML_UNUSED (seq_id);
5016
- GGML_UNUSED (src);
5017
- GGML_UNUSED (size);
5018
- GGML_ABORT (" TODO: implement" );
5008
+ return ctx_dec->state_seq_set_data (seq_id, src, size);
5019
5009
}
5020
5010
5021
5011
bool llama_context_enc_dec::state_load_file (
5022
5012
const char * filepath,
5023
5013
llama_token * tokens_out,
5024
5014
size_t n_token_capacity,
5025
5015
size_t * n_token_count_out) {
5026
- GGML_UNUSED (filepath);
5027
- GGML_UNUSED (tokens_out);
5028
- GGML_UNUSED (n_token_capacity);
5029
- GGML_UNUSED (n_token_count_out);
5030
- GGML_ABORT (" TODO: implement" );
5016
+ return ctx_dec->state_load_file (filepath, tokens_out, n_token_capacity, n_token_count_out);
5031
5017
}
5032
5018
5033
5019
bool llama_context_enc_dec::state_save_file (
5034
5020
const char * filepath,
5035
5021
const llama_token * tokens,
5036
5022
size_t n_token_count) {
5037
- GGML_UNUSED (filepath);
5038
- GGML_UNUSED (tokens);
5039
- GGML_UNUSED (n_token_count);
5040
- GGML_ABORT (" TODO: implement" );
5023
+ return ctx_dec->state_save_file (filepath, tokens, n_token_count);
5041
5024
}
5042
5025
5043
5026
size_t llama_context_enc_dec::state_seq_load_file (
@@ -5046,24 +5029,15 @@ size_t llama_context_enc_dec::state_seq_load_file(
5046
5029
llama_token * tokens_out,
5047
5030
size_t n_token_capacity,
5048
5031
size_t * n_token_count_out) {
5049
- GGML_UNUSED (seq_id);
5050
- GGML_UNUSED (filepath);
5051
- GGML_UNUSED (tokens_out);
5052
- GGML_UNUSED (n_token_capacity);
5053
- GGML_UNUSED (n_token_count_out);
5054
- GGML_ABORT (" TODO: implement" );
5032
+ return ctx_dec->state_seq_load_file (seq_id, filepath, tokens_out, n_token_capacity, n_token_count_out);
5055
5033
}
5056
5034
5057
5035
size_t llama_context_enc_dec::state_seq_save_file (
5058
5036
llama_seq_id seq_id,
5059
5037
const char * filepath,
5060
5038
const llama_token * tokens,
5061
5039
size_t n_token_count) {
5062
- GGML_UNUSED (seq_id);
5063
- GGML_UNUSED (filepath);
5064
- GGML_UNUSED (tokens);
5065
- GGML_UNUSED (n_token_count);
5066
- GGML_ABORT (" TODO: implement" );
5040
+ return ctx_dec->state_seq_save_file (seq_id, filepath, tokens, n_token_count);
5067
5041
}
5068
5042
5069
5043
//
0 commit comments