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
import math
import random
import re
from array import array
from collections import defaultdict

from xxhash import xxh3_64_intdigest as digest


WORDS = re.compile(r"[^\W\d_]{2,}")
UNSEGMENTED = re.compile(r"[\u0e00-\u0eff\u1000-\u109f\u1780-\u17ff\u3040-\u30ff\u3400-\u9fff]")
BUCKET_BITS = 20
BUCKET_MASK = (1 << BUCKET_BITS) - 1


def words(text):
    for match in WORDS.finditer(text):
        word = match.group()
        # Long unsegmented scripts still have recurring local characters.
        if len(word) > 3 and not word.isascii() and UNSEGMENTED.search(word):
            for start in range(len(word) - 2):
                yield word[start:start + 3]
        elif len(word) >= 3:
            yield word


def build_frequencies(task):
    corpus = task.corpus
    sample = random.Random(499).sample(range(len(corpus)), min(len(corpus), 16_000))
    first = array("I", [0]) * (1 << BUCKET_BITS)
    second = array("I", [0]) * (1 << BUCKET_BITS)
    observed = 0
    for doc in sample:
        if observed % 128 == 0 and task.time_left() < 65:
            break
        raw = corpus.raw(doc)
        offset = len(raw) // 3
        excerpt = raw[:1200] + b" " + raw[offset:offset + 1200]
        text = excerpt.decode("utf-8", errors="ignore").lower()
        for word in set(words(text)):
            key = digest(word.encode())
            first[key & BUCKET_MASK] += 1
            second[key >> 32 & BUCKET_MASK] += 1
        observed += 1
    print(f"Estimated topic frequencies from {observed:,} source pages", flush=True)
    return first, second, observed


def continuity(clean, frequencies):
    if len(clean) < 550:
        return None
    if len(clean) > 5400:
        middle = len(clean) // 2
        clean = b" ".join((clean[:1800], clean[middle - 900:middle + 900], clean[-1800:]))
    terms = list(words(clean.decode("utf-8", errors="ignore").lower()))
    if len(terms) < 72:
        return None
    segments = min(6, len(terms) // 26)
    width = (len(terms) + segments - 1) // segments
    by_term = {}
    contexts = set()
    repeated = 0
    for index in range(1, len(terms) - 1):
        word = terms[index]
        before, after = terms[index - 1], terms[index + 1]
        context = before, word, after
        if context in contexts:
            repeated += 1
            continue
        contexts.add(context)
        segment = index // width
        by_term[word] = by_term.get(word, 0) | (1 << segment)

    first, second, observed = frequencies
    common = max(12, observed * 0.012)
    anchor_weight = 0.0
    linked = 0
    for word, occurrences in by_term.items():
        count = occurrences.bit_count()
        if count < 2:
            continue
        key = digest(word.encode())
        frequency = min(first[key & BUCKET_MASK], second[key >> 32 & BUCKET_MASK])
        if frequency >= common:
            continue
        anchor_weight += min(2, count - 1) / math.sqrt(1 + frequency / 5)
        linked |= occurrences
    revisit = math.sqrt(anchor_weight / width) * linked.bit_count() / segments
    return revisit - 1.75 * repeated / len(terms)


def rescore(candidates):
    groups = defaultdict(list)
    for page in candidates:
        if page.continuity is not None:
            key = page.language, page.genre, page.tokens.bit_length()
            groups[key].append(page)
    changed = 0
    for pages in groups.values():
        if len(pages) < 45:
            continue
        values = sorted(page.continuity for page in pages)
        median = values[len(values) // 2]
        iqr = max(0.09, values[3 * len(values) // 4] - values[len(values) // 4])
        for page in pages:
            shift = max(-1.15, min(1.15, (page.continuity - median) / iqr))
            page.score += 0.34 * shift
        changed += len(pages)
    print(f"Topical continuity reranked {changed:,} pages across {len(groups):,} language, form and length groups", flush=True)

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.