[PR #2094] [CLOSED] Draft: immutable branching contexts with validated restore and serial benchmarks #3858

Closed
opened 2026-11-07 15:31:15 +07:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/Niko1221/Strata/pull/2094
Author: @CC-David-CC
Created: 10/12/2026
Status: ❌ Closed

Base: main ← Head: feat/branching-context-validated-prototype


📝 Commits (10+)

  • ee96335 Add immutable branching context foundation on upstream main
  • ed5c455 Port optional-draft cold snapshots to current main
  • 6dd5f9d Record bounded CUDA validation and issue scope for the upstream draft
  • 15fb044 Add resumable Luna branching-context handoff harness
  • 6e651a1 Preserve Luna checkpoint and host-buffer implementation work
  • 3f77d95 Repair idle feeds and host view lifetime with executed regression evidence
  • b6dc6fc Repair native cache admission and validate exact consumed-history lookup
  • 0b96187 Preserve canonical input identity through cold-to-hot checkpoint restore
  • e10e78e Implement native RAM-cache capture and exact consumed-frontier restore
  • 8aa223a Route canonical cache misses through native RAM and replace duplicate checkpoints

📊 Changes

248 files changed (+62852 additions, -68 deletions)

View changed files

📝 CMakeLists.txt (+65 -0)
➕ experimental/branching_context/.gitattributes (+2 -0)
➕ experimental/branching_context/.gitignore (+4 -0)
➕ experimental/branching_context/AGENTS.md (+58 -0)
➕ experimental/branching_context/README.md (+185 -0)
➕ experimental/branching_context/docs/acceptance.json (+517 -0)
➕ experimental/branching_context/docs/architecture.md (+96 -0)
➕ experimental/branching_context/docs/backend-adapter.md (+71 -0)
➕ experimental/branching_context/docs/certification.md (+81 -0)
➕ experimental/branching_context/docs/locked-references.json (+7 -0)
➕ experimental/branching_context/docs/support-matrix.json (+76 -0)
➕ experimental/branching_context/docs/test-matrix.md (+133 -0)
➕ experimental/branching_context/evidence/DECISIONS.md (+517 -0)
➕ experimental/branching_context/evidence/STATUS.md (+704 -0)
➕ experimental/branching_context/evidence/authorization-prework.json (+105 -0)
➕ experimental/branching_context/evidence/automatic-ram-validation.json (+810 -0)
➕ experimental/branching_context/evidence/calibration-finalization-check.json (+80 -0)
➕ experimental/branching_context/evidence/checkpoint-upgrade-prework.json (+84 -0)
➕ experimental/branching_context/evidence/cold-identity-validation.json (+442 -0)
➕ experimental/branching_context/evidence/corrected-prefill-validation.json (+1246 -0)

...and 80 more files

📄 Description

Supersedes #2015. Foundation for #1938 and #1962; neither issue is closed by this draft.

Adds immutable histories and controllers, movable branch references, shared checkpoints, rewind/retry, evaluation and recovery. Fixes omitted GPU expert contributions in the experimental branch/fresh drivers.

Measured on RTX PRO 6000 Blackwell, Q8_0 weights / FP16 KV, one request at a time:

Eight serial calls Request time sum
Untouched Strata (7695859a) 42.12s
Modified ordinary serving 42.18s
Branching API 50.35s

All paths produced identical tokens. All eight API frontiers matched an independent fresh oracle at zero logit error. Disk reload and complete checkpoint eviction/replay passed. Reused API calls took 2.4-3.4s; initial prefix creation took 12.6s and return to the prefix took 10.9s. The complete mixed hot/cold sequence was slower.

These are single-run whole-path measurements, excluding startup and oracle checks. Prefill operators and cache budgets differ: no isolated cache-speedup claim. Separate 11-operation GPU smoke passed 14 fresh comparisons at zero error; G0 passed 51/51.

Batched-prefill equivalence remains unresolved; help diagnosing it is welcome. Full G1-G5 certification, Windows and HIP/SYCL validation remain incomplete.

Measurements, fingerprints and limitations. Reproduce with experimental/branching_context/scripts/serial_speed.py --help and a pinned frozen profile.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/Niko1221/Strata/pull/2094 **Author:** [@CC-David-CC](https://github.com/CC-David-CC) **Created:** 10/12/2026 **Status:** ❌ Closed **Base:** `main` ← **Head:** `feat/branching-context-validated-prototype` --- ### 📝 Commits (10+) - [`ee96335`](https://github.com/Niko1221/Strata/commit/ee9633569abba68433f5c1797b0048a7f2f3624b) Add immutable branching context foundation on upstream main - [`ed5c455`](https://github.com/Niko1221/Strata/commit/ed5c45574877ccb17f791ccf394bc3103717ee6f) Port optional-draft cold snapshots to current main - [`6dd5f9d`](https://github.com/Niko1221/Strata/commit/6dd5f9df7e1aa7f00045cf72e997fd8595175847) Record bounded CUDA validation and issue scope for the upstream draft - [`15fb044`](https://github.com/Niko1221/Strata/commit/15fb044e523cb0097ba13829f1a867edf1a02af4) Add resumable Luna branching-context handoff harness - [`6e651a1`](https://github.com/Niko1221/Strata/commit/6e651a151e3fcea484ccdacb0a8a1482bc129b2c) Preserve Luna checkpoint and host-buffer implementation work - [`3f77d95`](https://github.com/Niko1221/Strata/commit/3f77d95eb1eecfcd70d2659683124fbfdda617d3) Repair idle feeds and host view lifetime with executed regression evidence - [`b6dc6fc`](https://github.com/Niko1221/Strata/commit/b6dc6fc5e72e19cd6f729403f0d163a49fff098c) Repair native cache admission and validate exact consumed-history lookup - [`0b96187`](https://github.com/Niko1221/Strata/commit/0b961870ab4343061994afe608206ad8c012e313) Preserve canonical input identity through cold-to-hot checkpoint restore - [`e10e78e`](https://github.com/Niko1221/Strata/commit/e10e78e9dac9d1ced4adfbf21e227ba88bd50f90) Implement native RAM-cache capture and exact consumed-frontier restore - [`8aa223a`](https://github.com/Niko1221/Strata/commit/8aa223ab4a0904bd8d8a2cfb42ebc0a2241e7f51) Route canonical cache misses through native RAM and replace duplicate checkpoints ### 📊 Changes **248 files changed** (+62852 additions, -68 deletions) <details> <summary>View changed files</summary> 📝 `CMakeLists.txt` (+65 -0) ➕ `experimental/branching_context/.gitattributes` (+2 -0) ➕ `experimental/branching_context/.gitignore` (+4 -0) ➕ `experimental/branching_context/AGENTS.md` (+58 -0) ➕ `experimental/branching_context/README.md` (+185 -0) ➕ `experimental/branching_context/docs/acceptance.json` (+517 -0) ➕ `experimental/branching_context/docs/architecture.md` (+96 -0) ➕ `experimental/branching_context/docs/backend-adapter.md` (+71 -0) ➕ `experimental/branching_context/docs/certification.md` (+81 -0) ➕ `experimental/branching_context/docs/locked-references.json` (+7 -0) ➕ `experimental/branching_context/docs/support-matrix.json` (+76 -0) ➕ `experimental/branching_context/docs/test-matrix.md` (+133 -0) ➕ `experimental/branching_context/evidence/DECISIONS.md` (+517 -0) ➕ `experimental/branching_context/evidence/STATUS.md` (+704 -0) ➕ `experimental/branching_context/evidence/authorization-prework.json` (+105 -0) ➕ `experimental/branching_context/evidence/automatic-ram-validation.json` (+810 -0) ➕ `experimental/branching_context/evidence/calibration-finalization-check.json` (+80 -0) ➕ `experimental/branching_context/evidence/checkpoint-upgrade-prework.json` (+84 -0) ➕ `experimental/branching_context/evidence/cold-identity-validation.json` (+442 -0) ➕ `experimental/branching_context/evidence/corrected-prefill-validation.json` (+1246 -0) _...and 80 more files_ </details> ### 📄 Description Supersedes #2015. Foundation for #1938 and #1962; neither issue is closed by this draft. Adds immutable histories and controllers, movable branch references, shared checkpoints, rewind/retry, evaluation and recovery. Fixes omitted GPU expert contributions in the experimental branch/fresh drivers. Measured on RTX PRO 6000 Blackwell, Q8_0 weights / FP16 KV, one request at a time: | Eight serial calls | Request time sum | |---|---:| | Untouched Strata (7695859a) | 42.12s | | Modified ordinary serving | 42.18s | | Branching API | 50.35s | All paths produced identical tokens. All eight API frontiers matched an independent fresh oracle at zero logit error. Disk reload and complete checkpoint eviction/replay passed. Reused API calls took 2.4-3.4s; initial prefix creation took 12.6s and return to the prefix took 10.9s. The complete mixed hot/cold sequence was slower. These are single-run whole-path measurements, excluding startup and oracle checks. Prefill operators and cache budgets differ: no isolated cache-speedup claim. Separate 11-operation GPU smoke passed 14 fresh comparisons at zero error; G0 passed 51/51. Batched-prefill equivalence remains unresolved; help diagnosing it is welcome. Full G1-G5 certification, Windows and HIP/SYCL validation remain incomplete. [Measurements, fingerprints and limitations](https://github.com/CC-David-CC/Strata-a5500/blob/3445371f6b127575c44fd6e108c2b6683fea4ffa/experimental/branching_context/evidence/llm60-serial-speed.json). Reproduce with `experimental/branching_context/scripts/serial_speed.py --help` and a pinned frozen profile. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-11-07 15:31:15 +07:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
Niko1221/Strata#3858
No description provided.