Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions tools/server/server-context.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2344,7 +2344,7 @@ struct server_context_impl {
const auto n_swa = std::max(0, llama_model_n_swa(model));

// the largest pos_min required for a checkpoint to be useful
const auto pos_min_thold = std::max(0, pos_next - n_swa);
const auto pos_min_thold = params_base.swa_full ? 0 : std::max(0, pos_next - n_swa);

if (n_past > 0 && n_past < slot.prompt.n_tokens()) {
const auto pos_min = llama_memory_seq_pos_min(llama_get_memory(ctx), slot.id);
Expand Down Expand Up @@ -2396,7 +2396,7 @@ struct server_context_impl {
SLT_WRN(slot, "%s\n", st1.str().c_str());
}

if (pos_min >= pos_min_thold) {
if (pos_min >= pos_min_thold && !params_base.swa_full) {
SLT_WRN(slot, "n_past = %d, slot.prompt.tokens.size() = %d, seq_id = %d, pos_min = %d, n_swa = %d\n", n_past, (int) slot.prompt.tokens.size(), slot.id, pos_min, n_swa);

// search for a context checkpoint
Expand Down