Skip to content

server : fix ctx checkpoint restore logic - #19924

Merged
ggerganov merged 1 commit into
masterfrom
gg/server-ctx-chkpt-fix
Feb 26, 2026
Merged

ggerganov merged 1 commit into
masterfrom
gg/server-ctx-chkpt-fix

Conversation

@ggerganov

Copy link
Copy Markdown
Member

cont #19849
fix #19901

Prevent n_past from exceeding the available tokens in the checkpoint.

@yshui

yshui commented Feb 26, 2026

Copy link
Copy Markdown

this feels wrong? pos_next is one past the last token, but size_up_to_pos treats max_pos as inclusive.

@ggerganov

ggerganov commented Feb 26, 2026 •

Copy link
Copy Markdown
Member Author

@yshui Can you clarify a bit more? I think the logic is correct, though indeed it's a bit convoluted and I could have miss something.

@yshui

yshui commented Feb 26, 2026

Copy link
Copy Markdown

in that case, i must've misunderstood something. please ignore me.

@ggerganov
ggerganov merged commit 01cd448 into master Feb 26, 2026
77 of 78 checks passed
@ggerganov
ggerganov deleted the gg/server-ctx-chkpt-fix branch February 26, 2026 16:20
Seunghhon pushed a commit to Seunghhon/llama.cpp that referenced this pull request Apr 26, 2026
my-other-github-account pushed a commit to my-other-github-account/llama.cpp that referenced this pull request May 15, 2026
fukuro-kun pushed a commit to fukuro-kun/fukuro-llama-cpp-turboquant that referenced this pull request Jul 5, 2026
MrLordCat referenced this pull request in MrLordCat/llama.cpp-rdna-lab Jul 16, 2026
zommiommy pushed a commit to zommiommy/llama.cpp that referenced this pull request Aug 18, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Misc. bug: PR19849 causes inconsistent sequence positions

3 participants