Skip to content

Misc. bug: Context checkpoints not working #396

Open

Description

@jankais3r

Name and Version

.\llama-cli.exe --version
version: 1 (bcb85fc)
built with MSVC 19.44.35229.0 for Windows AMD64

Operating systems

Windows

Which llama.cpp modules do you know to be affected?

llama-server

Command line

.\llama-server.exe --host 0.0.0.0 -m Swift-Qwen3.8-27B-NVFP4-Q8mix.gguf --ctx-size 115000 --gpu-layers all --cache-ram 8192 --ctx-checkpoints 64 --checkpoint-min-step 512 -ctk turbo4 -ctv turbo3 -lm none -fa on -np 4 --kv-unified --spec-type draft-mtp --spec-draft-n-max 3 --spec-draft-ngl all -fit off --no-mmproj --ubatch-size 1024 --batch-size 4096 --temperature 0.7 --top_k 20 --top_p 0.8 --min_p 0.00 --repeat-penalty 1.0 --presence-penalty 1.5 --jinja --reasoning-preserve --reasoning-effort medium --reasoning-budget-message " ... I am thinking too long. I will proceed with the final answer now." --chat-template-kwargs '{\"preserve_thinking\": true, \"reasoning_effort\": \"medium\"}'

Problem description & steps to reproduce

Using the upstream version of llama.cpp I rely on kv cache checkpoints stored in RAM to accelerate agentic coding, which often discards the latest output and returns to a previous context. I use the following launch arguments: --cache-ram 8192 --ctx-checkpoints 64 --checkpoint-min-step 512.

Typical behavior I observe when invalidating some of the current kv cache is that llama-server prints a cache-related message (don't have the exact wording available), I see the system RAM usage to jump down a little (as the cache is moved back into the VRAM), and the decode phase starts immediately.

Now on llama.cpp-turboquant, this does not happen. If I forcefully invalidate part of the current cache by retracting my last chat message, the whole previous conversation (can be 80k tokens or similar) gets invalidated and the GPU starts pre-fill from scratch. I also see no change is system RAM, and the llama-server CLI does not print any message regarding context cache.

This leads me to believe that this fork actually does not have a functional context checkpointing.

First Bad Commit

No response

Relevant log output

No response

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions