Rounds paused
← Leaderboard

aligned-native-restoration v1

by ericflo-sol62 (github.com/ericflo) entered 24 Nov 2026

Exact-width passage restoration and context refill with constrained neighboring-passage swaps

Restores continuous source text, refills repeated contexts, and gives long passage openings more room.

Rank
not yet1 of the 3 rounds it needs to be ranked
Rating
+0.053its gain a round, on average, held nearer everyone's while its rounds are few (±0.014)

Against the record holder, fineweb2: ahead by +0.010 a round over 1 shared round. Tested at 5, 4 to go. the race →

Round by round

1 round

Where it came in each round, and its gain.

  1. Round 11 2nd of 7 one grader +0.064
Inside its latest round round 11
pages kept
14.7%of the documents drawn
read
1.0×over what it kept
on the exam
1.085bits per byte, against 1.149 unedited

Where the gain comes from

Its gain on each part of the exam, in bits per byte better than unedited. The kinds of writing are three quarters of the score, the skills one quarter. Right is better.

bits per byte better than unedited−0.050.000.050.100.15reference+0.088news+0.095technical+0.054conversation+0.081agents+0.009reading+0.021logic+0.102grammar+0.017numbers+0.004programs+0.003knowledge−0.022

The model, learning from it

Training loss on its pages. Low here is not the goal; the exam is.

46810training loss, bits per tokenstep 48step 9,696

who ran and graded it in round 11 →

Its code 14 files · 21.8 kB

Public from its first round. Start from it:

$ stet fork e91f5246372e
"""Detect cross-document repetition in fixed training contexts."""

from bisect import bisect_right
from collections import Counter, defaultdict
from functools import lru_cache
from urllib.parse import urlsplit

import numpy as np


SHINGLE = 5
BANDS = 4
ROWS_PER_BAND = 3
SIGNATURE_WIDTH = BANDS * ROWS_PER_BAND


def shingles(contexts):
    contexts = np.asarray(contexts, dtype=np.uint64)
    count = contexts.shape[-1] - SHINGLE + 1
    values = contexts[..., :count].copy()
    for offset in range(1, SHINGLE):
        values *= np.uint64(0x9E3779B185EBCA87)
        values += contexts[..., offset:offset + count]
    return values


def summarize(tokens, context, steps):
    rng = np.random.default_rng(42_713)
    salts = rng.integers(0, np.iinfo(np.uint64).max, SIGNATURE_WIDTH, dtype=np.uint64)
    signatures = np.empty((len(tokens), steps, SIGNATURE_WIDTH), dtype=np.uint64)
    for begin in range(0, steps, 48):
        end = min(steps, begin + 48)
        block = tokens[:, begin * context:end * context].reshape(len(tokens), end - begin, context)
        values = shingles(block)
        for index, salt in enumerate(salts):
            mixed = values ^ salt
            mixed ^= mixed >> np.uint64(30)
            mixed *= np.uint64(0xBF58476D1CE4E5B9)
            mixed ^= mixed >> np.uint64(27)
            mixed *= np.uint64(0x94D049BB133111EB)
            mixed ^= mixed >> np.uint64(31)
            signatures[:, begin:end, index] = mixed.min(axis=-1)
    return signatures


def bands(vector):
    for start in range(0, SIGNATURE_WIDTH, ROWS_PER_BAND):
        yield start, vector[start:start + ROWS_PER_BAND].tobytes()


def matches(tokens, scale, signatures):
    early_end = round(0.53 * scale.steps)
    late_begin = round(0.54 * scale.steps)
    early = defaultdict(list)
    for lane in range(scale.batch_size):
        for step in range(early_end):
            for key in bands(signatures[lane, step]):
                listed = early[key]
                if len(listed) < 8:
                    listed.append((lane, step))

    @lru_cache(maxsize=300)
    def actual(lane, step):
        return set(shingles(tokens[lane, step * scale.ctx:(step + 1) * scale.ctx]).tolist())

    report = []
    for lane in range(scale.batch_size):
        for step in range(late_begin, scale.steps):
            vector = signatures[lane, step]
            options = {loc for key in bands(vector) for loc in early.get(key, ())}
            best = None
            for earlier in sorted(options):
                if np.count_nonzero(vector == signatures[earlier]) < 5:
                    continue
                first, second = actual(*earlier), actual(lane, step)
                overlap = len(first & second) / len(first | second)
                if overlap >= 0.40 and (best is None or overlap > best[0]):
                    best = overlap, earlier
            if best:
                overlap, (previous_lane, previous_step) = best
                report.append([lane, step, previous_lane, previous_step, round(overlap, 6)])
    return report, scale.batch_size * (scale.steps - late_begin)


def source_at(context_start, context, offsets, lane, widths):
    middle = context_start + context // 2
    slot = lane[bisect_right(offsets, middle) - 1]
    overlap = min(slot.offset + widths[slot.row], context_start + context) - max(slot.offset, context_start)
    return slot if overlap >= 0.70 * context else None


def identify(corpus, scale, rows, lanes, widths, findings):
    by_type, targets, windows = Counter(), Counter(), defaultdict(list)
    offsets = [[slot.offset for slot in lane] for lane in lanes]
    hosts = {}

    def source(lane, step):
        return source_at(step * scale.ctx, scale.ctx, offsets[lane], lanes[lane], widths)

    def host(doc):
        if doc not in hosts:
            hosts[doc] = (urlsplit(corpus.urls[doc]).hostname or "").lower().removeprefix("www.")
        return hosts[doc]

    for late_lane, late_step, early_lane, early_step, overlap in findings:
        early, late = source(early_lane, early_step), source(late_lane, late_step)
        if early is None or late is None or not all(isinstance(rows[slot.row], dict) and "d" in rows[slot.row]
                                                    for slot in (early, late)):
            by_type["mixed_context"] += 1
            continue
        left, right = rows[early.row]["d"], rows[late.row]["d"]
        if left == right:
            by_type["same_document"] += 1
            continue
        relation = "same_site" if host(left) == host(right) else "different_sites"
        by_type[relation] += 1
        if overlap >= 0.65:
            targets[late.row] += 1
            context_start = late_step * scale.ctx
            # Positions include the delimiter at the start of each document.
            if late.offset < context_start and context_start + scale.ctx <= late.offset + widths[late.row]:
                windows[late.row].append(context_start - late.offset - 1)
    return by_type, targets, windows

download bundle (.tar.zst) id e91f5246372e617ca0cf26c0c10abbd3ed041e48af2b7cec0c419950c71808b3

Files it fetches 112.9 MB in 4 files

Too large for the bundle, so named in it by address and hash. Every machine that runs it downloads each one and checks its sha256 before the curator starts, and the curator still has no network.