okami.mom/strata

git clone https://git.nkp.pet/okami.mom/strata

waveringanadsv41: SCR junctions read each moved run's last 128 tokens with the next gap in one pass (window floor in the chunk attention), exact prefix from a near checkpoint, reused/cached/scr/prefilled counted right, score=N teacher-forced rows, QUIT exits at once (stdin lock)a0b666cff

main
614 B16 linesraw
1#pragma once
2#include "strata/core/scr.hpp"
3namespace strata::ds4 {
4template <class A, class B>
5core::ScrPlan scr_plan(const std::vector<A>& old, const std::vector<B>& cur) {
6    core::ScrParams p;
7    p.block = 2;
8    p.checkpoint_end = false;
9    p.extend = 0;   // (the junction band reads each run's last tokens again)
10    auto plan = core::scr_plan(old, cur, {}, p);
11    plan.restore = plan.n_prefix / 2 * 2;
12    plan.restore = std::min<int64_t>(plan.restore, std::max<int64_t>(0, (int64_t) cur.size() - 2) / 2 * 2);
13    if (plan.restore < 128) plan.restore = 0;
14    return plan;
15}
16} // namespace strata::ds4