Skip to content

test(deepseek): check CED replay against a linear window oracle - #1118

Closed
cwschroeder wants to merge 1 commit into
ashhart:mainfrom
cwschroeder:test/ced-linear-oracle-20261020
Closed

cwschroeder wants to merge 1 commit into
ashhart:mainfrom
cwschroeder:test/ced-linear-oracle-20261020

Conversation

@cwschroeder

@cwschroeder cwschroeder commented Oct 20, 2026 •

Copy link
Copy Markdown
Contributor

CED replay tests now compare the retained token IDs and ring-copy spans against a linear scan of the configured sliding window. This catches truncation and ring-offset errors without using tailOf or modulo arithmetic to choose the reference keys. A second test rejects old history after backward restores and forward gaps.

Coverage: nine chunk sizes (including 127/128/129), origins at 0, near 64K and ending at 1M, plus five restart positions. Three local fault controls fail as intended: shortened tail, shifted ring-copy origin and stale history after restart. Production code is unchanged.

Inspired by DeepInfer's mask/compact equivalence checks. These tests are independently written for TensorFold's existing CED contract. They do not compare model logits, compressed attention keys or actual device buffers; the ring buffer here is a CPU simulation.

Validation on base d1018b318fb51981c4a18f12e40269a4d3ee9713, Zig 0.17.0:

  • Direct CED tests: 7/7 in Debug and Fast.
  • Whole-tree zig fmt --check build.zig zig and git diff --check: pass.
  • zig build test-dsv41-forward -j2 --summary all: 6/6 steps, 102/102 tests pass.
  • The completed local test-cuda-host log reports 129/129 steps succeeded and 2,175/2,183 tests passed (8 skipped).
  • Current-head CI: fmt, desktop and mobile passed; zig and zig-windows failed. The Linux failure names the Cortheon long-input timing test (toText: 1 ms at 16 KiB, 35 ms at 128 KiB). Windows reports compilation/link errors, including unsupported dynamic-library handling and unresolved mmap/munmap. These failures have not been reproduced on the unchanged pinned base, so they remain unresolved rather than classified as inherited.
  • This remains a draft. No GPU or served-model qualification.

Status corrected on 2026-10-23 after reading the completed local log and current-head CI logs.

@ashhart

ashhart commented Oct 23, 2026

Copy link
Copy Markdown
Owner

Thanks @cwschroeder. This is on main as 7938815: your test, with your name and date kept and your address in GitHub's numeric noreply form. It compares the CED stash and replay spans against a linear window oracle. The DeepSeek-V4.1 forward host suite passes with it (102 tests, the two new ones included). Closing as landed; it ships in the next release.

- Synthema, Ash's AI Assistant.

@ashhart ashhart closed this Oct 23, 2026
@ashhart

ashhart commented Oct 24, 2026

Copy link
Copy Markdown
Owner

This shipped in TensorFold 1.1.4: https://github.com/ashhart/TensorFold/releases/tag/v1.1.4

Thank you @cwschroeder for the contribution.

- Synthema, Ash's AI Assistant.

@ashhart ashhart added the landed Landed on main by the maintainers; the commits keep the contributor's authorship label Oct 28, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

landed Landed on main by the maintainers; the commits keep the contributor's authorship

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants