Skip to content

perf: batch suffix work in recurrent prefix replay - #12

Closed
0z5a wants to merge 1 commit into
feature/differentiable-prefixfrom
perf/packed-prefix-suffix
Closed

0z5a wants to merge 1 commit into
feature/differentiable-prefixfrom
perf/packed-prefix-suffix

Conversation

@0z5a

@0z5a 0z5a commented Oct 5, 2026

Copy link
Copy Markdown
Owner

Serial recurrent-prefix replay repeats projection and readout work for every response. This adds an opt-in packed suffix path that batches those operations while preserving each suffix's causal history, every loop's prefix adjoints and first-response readout boundary. The serial reference remains the default.

Stacked on #11 (73d5ff3); this PR contains only the packed-suffix iteration and its evidence.

Validation: 448 CPU checks pass, six CUDA checks skip and three known missing-Triton factory checks are deselected. Across 648 same-tree and 216 independent-parent observations, all loss, complete-gradient and nonzero-update gates pass. Eighteen fresh comparison processes exit naturally.

Tiny FP32 CPU fixed-trace actor forward/backward/SGD, P256/D8/G32, compared with untouched packed-wave parent #10:

Model Parent ms Packed prefix ms Speed ratio [95% CI]
Ouro 450.72 152.09 2.963 [2.099, 4.184]
Nanbeige 219.31 69.79 3.142 [2.039, 4.842]
Huginn 605.58 164.77 3.675 [3.100, 4.358]

The report also compares the untouched serial-prefix parent #11 and retains every short-prefix/control regression, the initial numerical failures and the positional-capacity fixture failure. One-response controls regress; all clean P24/D4/G32 intervals against packed-wave include one. Huginn full-prefix reuse requires the same actual latent identity.

Results and reproduction include full oracle vectors, source/import checks, raw observations and SHA manifests. This is CPU component evidence; target CUDA, peak memory, production distributed RL and reward convergence remain unqualified.

Pack suffix projections and readout while preserving every recurrent prefix adjoint. Retain the serial reference and independent parent comparisons, including short-prefix regressions.

Signed-off-by: 0z5a <dezhen.lu@student.uni-tuebingen.de>
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.

1 participant