File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -2438,6 +2438,8 @@ struct server_context_impl {
24382438 slot.n_prompt_tokens_cache = 0 ;
24392439 }
24402440
2441+ bool do_checkpoint = params_base.n_ctx_checkpoints > 0 ;
2442+
24412443 // check if we should process the image
24422444 if (slot.prompt .n_tokens () < slot.task ->n_tokens () && input_tokens[slot.prompt .n_tokens ()] == LLAMA_TOKEN_NULL) {
24432445 // process the image
@@ -2457,6 +2459,8 @@ struct server_context_impl {
24572459 const auto & chunk = input_tokens.find_chunk (slot.prompt .n_tokens ());
24582460 slot.prompt .tokens .push_back (chunk.get ()); // copy
24592461 }
2462+
2463+ do_checkpoint = false ; // do not checkpoint right after an image chunk
24602464 }
24612465
24622466 // If using an alora, there may be uncached tokens that come
@@ -2473,8 +2477,6 @@ struct server_context_impl {
24732477 alora_disabled_id = enabled_loras[0 ];
24742478 }
24752479
2476- bool do_checkpoint = params_base.n_ctx_checkpoints > 0 ;
2477-
24782480 // make checkpoints only for completion tasks
24792481 do_checkpoint = do_checkpoint && slot.task ->type == SERVER_TASK_TYPE_COMPLETION;
24802482
You can’t perform that action at this time.
0 commit comments