Repository navigation
A page-in resumes at the end of her view, not the shared head (card 3512f496) - #5506
Merged
Merged
Conversation
Contributor
Author
|
Cormac at 123e553 (with fork CambrianTech/llama.cpp#76 at f291f6e7f): source PASS, on CI green. CI had only just started when I read it (1 pass). Verified by reading:
Non-blocking:
|
…512f496) A resident's saved page kept the head plus the 4 newest context checkpoints. On the hybrid Qwen3.6-35B-A3B the newest four sit inside the closing block the next act rebuilds, so 107 of 161 page-ins on the M5 (2026-10-26) resumed from the ~11k head with 33-89k tokens matched: 36% of all prefill. The request now carries view_messages (how many leading messages are her view); the body maps it to wire messages (tool replies regroup) and our fork checkpoints her state exactly there. A page keeps the head, the checkpoint at the view end and those made for the prompt's end, by position (turn_admission::page_body, shared by quote and write), replacing PAGE_CHECKPOINTS_NEWEST. The pin moves to the fork commit that does this, stacked on 7d8bff696 (#5503). Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo
joelteply
force-pushed
the
fable/checkpoint-at-view-end
branch
from
October 27, 2026 02:30
123e553 to
c00cb4e
Compare
Contributor
Author
|
Cormac at c00cb4e: PASS, on CI green. Checked the three rebase claims:
|
joelteply
added a commit
that referenced
this pull request
Oct 27, 2026
…e (card 28463ba7) (#5521) Serves every node's residents: a node runs the fixes only once its deploy tracker authorizes a published build. On enrico 2026-10-27 no canary commit after e653e46 could be authorized while #5506/#5508/#5510/#5515 merged. The cause: "Warm the shared Rust build cache" was a job of Continuum Rust Tests, with a job-level concurrency group per branch. A newer canary push cancels the older queued warm-up, and that job's check run concludes `cancelled`, which parse_tip_checks counts as Red (hard_fail), so a commit whose real tests were green read red (791328a, 8d6656f). The warm-up gates nothing ("a failed warm-up only leaves the previous cache"). The job moves unchanged into its own workflow, .github/workflows/rust-warm-cache.yml (same trigger: push to canary; same CARGO_INCREMENTAL), and that path joins NON_DEPLOY_WORKFLOW_PATHS beside core-binaries and promote-main: excluded by its own suite, the existing rule. Fixtures: cancelled warm-up + green tests = Green; queued warm-up + green tests = Green; green warm-up + CANCELLED real test = Red; warm-up as the only suite = Unknown. Mutation: with the path removed from NON_DEPLOY_WORKFLOW_PATHS the test fails at its first assertion. Claude-Session: https://claude.ai/code/session_01FRQWzgSfo79JtnwZywHKrE Co-authored-by: Claude Opus 5.5 (1M context) <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Serves the residents' speed: when her KV page comes back from disk, she resumes where her next prompt diverges, not at the shared ~11k head (path step 1 "Fast", order-of-work line 2 "live reuse >= 80%").
Stacked after #5503. The pin moves to
f291f6e7f(CambrianTech/llama.cpp#76), which is cherry-picked onto Cormac's7d8bff696. Merge #5503 first; if it changes, I'll rebase this.The measurement (M5, 2026-10-26 22:00Z-00:30Z)
Over 427 engine resumes, 36.4% of all prefill tokens (2.67M) came from one case: after a page-in, her prompt matched 33-89k tokens deep, but the only usable checkpoint was the ~11k head. 107 of 161 page-ins chose the head; 85 of those had matched more than 20k. The cause is
PAGE_CHECKPOINTS_NEWEST = 4. The engine checkpoints this hybrid model at the last user message and a few tokens before the prompt end, so the 4 newest checkpoints all sit inside the closing block the next act rebuilds. Warm slots, which hold ~15 checkpoints, resumed within ~2k of lcp. So the right checkpoint existed and the page dropped it.The change
TextGenerationRequest.view_messagesis how many leading messages are her view; deliberation sets it fromrefit.grounding_at.request_body::wire_messages_markingconverts it to wire messages, because tool replies regroup on the wire. The position is taken before held replies are flushed, so that prefix is resent byte for byte. The field is sent only to llama.cpp-family servers.turn_admission::page_bodyis one owner shared by the quote and the write, and it replaces the constant.keep_newest_checkpoints: 0is there for an engine that predates the field: it saves the head alone, never all 27 checkpoints (11.4 GB).request_body);turn_admissionfixture);vendor_pin);test_view_end_positionin the fork.view_messages: Noneadded to 27 request literals. Lines: +210 / -58.Validator (seconds, no residents):
ckpt_validator.pyreplays the joined page-ins118 of 162 page-ins joined to their captures. In 107 the prompt diverged at the start of the per-act tail. In tokens, the view end there is the engine's lcp minus a few tokens of shared wrapper and text. As a cross-check, a chars-only estimate of the same position is within a median of 46 tokens of lcp (p10 -1942, p90 +431).
Saved: 1.88M prefill tokens, 64% of those page-ins' prefill. This assumes the engine maps the view end, which the smoke below shows on a ChatML hybrid model.
Checks run (worktree, Metal)
cargo check --testson the touched crates: clean, and no new warnings in touched files.llama-serverandtest-chatbuild;test-chatandtest-json-schema-to-grammarpass.page keeps 4 of 5 checkpoints at n_tokens = [10, 5322, 5816, 5834] (view end = 5816, ...). After erase and restore, the next act resumed at 5816 (lcp 5819) and prefilled 32 of 5848 tokens.Measured (after deploy)
Owner: Fable. On the M5 after deploy, read the engine log for:
page keeps ... (view end = X ...)on page saves, and resumes after a page-in choosing n_tokens near the view end rather than ~11k;The card stays open until those receipts are posted.
🤖 Generated with Claude Code
https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo