Skip to content

kept states: saved prompt states bind the running binary and the checkpoint's current stamps - #2163

Merged
ashhart merged 3 commits into
mainfrom
lead/persistence-keys
Nov 7, 2026
Merged

ashhart merged 3 commits into
mainfrom
lead/persistence-keys

Conversation

@ashhart

@ashhart ashhart commented Nov 4, 2026

Copy link
Copy Markdown
Owner

Closes #2131.

An audit of what each family's saved prompt states are keyed on, with the gaps fixed. A saved state now misses safely when the code or the checkpoint it was made with has changed.

What was wrong, shown on the host:

  • GLM and Flash Next checkpoints: rewriting a weight's payload with the config, index, header and size unchanged still hit the old state. They now also bind the current safetensors stamps.
  • Compiled code and layout: family source hashes missed some of what matters (Nemotron's shared and paged shaders, Flash Next's runtime glue). The native disk owners now bind the SHA-256 of the running binary, which covers every host operator, embedded shader, compiler option and snapshot layout.

What changes for people: any new build, including every release, starts its disk states cold, so the first long prompt after an upgrade prefills again. That's the cost of never resuming from a state an older build made. Replies don't change, and a stale state is a miss rather than an error.

The audit table is in persisted-serving-keys.md, and tests show a stale state misses.

Host tests only, with no device run and no whole-model test of a stale state. A witness on the host isn't a report of real corruption in the field.

@ashhart

ashhart commented Nov 5, 2026

Copy link
Copy Markdown
Owner Author

GB10 run, main against this PR, Qwen3.8-27B, on the head before the 05:15 GMT rebase: verdict GREEN. No token differences across runs in the 20 prompt rows I checked. 32K prompts read +0.1 to +0.6%, decode after them +0.2 to +0.7%, and the 1- and 4-stream sweeps -0.7 to +0.2%. The -0.7% is one sampled chat cell at one stream, on a 14.9 base. The restart runs on Metal and on a GB10 are still queued, and they're what this PR needs. The branch now conflicts with main, so it needs a rebase before it can land.

@ashhart
ashhart force-pushed the lead/persistence-keys branch from 915a935 to 5960fe2 Compare November 5, 2026 17:39
@ashhart
ashhart force-pushed the lead/persistence-keys branch from 5960fe2 to 9d9348b Compare November 6, 2026 07:08
ashhart added a commit that referenced this pull request Nov 6, 2026
Key resolved Metal policies and CUDA Qwen rotary inputs independently of
startup probes. Include Flash Next's opened pack stamps and loaded metadata
in its namespace. Keep snapshot payloads and layouts unchanged, and cover
stale misses and matching disk reads with host regressions.

Refs #2131. Stacked on #2163.
ashhart added a commit that referenced this pull request Nov 6, 2026
Stamp validated weight-map paths, including nested shards and files with
other suffixes, while retaining auxiliary top-level safetensors. Use the
same reader for Nemotron on Metal. Share the existing index validation
bodies across modules without changing filename admission.

Cover all eight native disk owners with same-probe stale misses and
matching reads of planted conversation states.

Refs #2131. Stacked on #2163.
@ashhart
ashhart marked this pull request as ready for review November 6, 2026 07:08
@ashhart

ashhart commented Nov 6, 2026

Copy link
Copy Markdown
Owner Author

/atc exchange 6762ff15bdf37d9edf6a6bba50b984a4ffcff66d398c03c00ba7b1a9840415f7

@ashhart
ashhart force-pushed the lead/persistence-keys branch from f92a3b7 to 30858b1 Compare November 7, 2026 07:58
@ashhart
ashhart merged commit d9df109 into main Nov 7, 2026
6 of 11 checks passed
ashhart added a commit that referenced this pull request Nov 7, 2026
ashhart added a commit that referenced this pull request Nov 9, 2026
Key resolved Metal policies and CUDA Qwen rotary inputs independently of
startup probes. Include Flash Next's opened pack stamps and loaded metadata
in its namespace. Keep snapshot payloads and layouts unchanged, and cover
stale misses and matching disk reads with host regressions.

Refs #2131. Stacked on #2163.
ashhart added a commit that referenced this pull request Nov 9, 2026
Stamp validated weight-map paths, including nested shards and files with
other suffixes, while retaining auxiliary top-level safetensors. Use the
same reader for Nemotron on Metal. Share the existing index validation
bodies across modules without changing filename admission.

Cover all eight native disk owners with same-probe stale misses and
matching reads of planted conversation states.

Refs #2131. Stacked on #2163.
ashhart added a commit that referenced this pull request Nov 9, 2026
Key resolved Metal policies and CUDA Qwen rotary inputs independently of
startup probes. Include Flash Next's opened pack stamps and loaded metadata
in its namespace. Keep snapshot payloads and layouts unchanged, and cover
stale misses and matching disk reads with host regressions.

Refs #2131. Stacked on #2163.
ashhart added a commit that referenced this pull request Nov 9, 2026
Stamp validated weight-map paths, including nested shards and files with
other suffixes, while retaining auxiliary top-level safetensors. Use the
same reader for Nemotron on Metal. Share the existing index validation
bodies across modules without changing filename admission.

Cover all eight native disk owners with same-probe stale misses and
matching reads of planted conversation states.

Refs #2131. Stacked on #2163.
ashhart added a commit that referenced this pull request Nov 9, 2026
Key resolved Metal policies and CUDA Qwen rotary inputs independently of
startup probes. Include Flash Next's opened pack stamps and loaded metadata
in its namespace. Keep snapshot payloads and layouts unchanged, and cover
stale misses and matching disk reads with host regressions.

Refs #2131. Stacked on #2163.
ashhart added a commit that referenced this pull request Nov 9, 2026
Stamp validated weight-map paths, including nested shards and files with
other suffixes, while retaining auxiliary top-level safetensors. Use the
same reader for Nemotron on Metal. Share the existing index validation
bodies across modules without changing filename admission.

Cover all eight native disk owners with same-probe stale misses and
matching reads of planted conversation states.

Refs #2131. Stacked on #2163.
ashhart added a commit that referenced this pull request Nov 9, 2026
Key resolved Metal policies and CUDA Qwen rotary inputs independently of
startup probes. Include Flash Next's opened pack stamps and loaded metadata
in its namespace. Keep snapshot payloads and layouts unchanged, and cover
stale misses and matching disk reads with host regressions.

Refs #2131. Stacked on #2163.
ashhart added a commit that referenced this pull request Nov 9, 2026
Stamp validated weight-map paths, including nested shards and files with
other suffixes, while retaining auxiliary top-level safetensors. Use the
same reader for Nemotron on Metal. Share the existing index validation
bodies across modules without changing filename admission.

Cover all eight native disk owners with same-probe stale misses and
matching reads of planted conversation states.

Refs #2131. Stacked on #2163.
ashhart added a commit that referenced this pull request Nov 9, 2026
Key resolved Metal policies and CUDA Qwen rotary inputs independently of
startup probes. Include Flash Next's opened pack stamps and loaded metadata
in its namespace. Keep snapshot payloads and layouts unchanged, and cover
stale misses and matching disk reads with host regressions.

Refs #2131. Stacked on #2163.
ashhart added a commit that referenced this pull request Nov 9, 2026
Stamp validated weight-map paths, including nested shards and files with
other suffixes, while retaining auxiliary top-level safetensors. Use the
same reader for Nemotron on Metal. Share the existing index validation
bodies across modules without changing filename admission.

Cover all eight native disk owners with same-probe stale misses and
matching reads of planted conversation states.

Refs #2131. Stacked on #2163.
@ashhart
ashhart deleted the lead/persistence-keys branch November 10, 2026 16:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Audit each family's persistence keys

1 participant