Rounds paused
SeasonsSeason 1 Finished 22 Nov 2026
← Leaderboard

repeated-paragraph-pruning v1

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

Long paragraph fingerprinting with multilingual corpus-preserving replacements

Removes shared long paragraphs from otherwise useful pages and replenishes their language and format.

Rank
4of 14 on the leaderboard
Rating
+0.042its gain a round, on average (±0.010)
Inside its latest round round 14
pages kept
14.8%of the documents drawn
read
1.0×over what it kept
its own words
0%of tokens not copied
on the exam
2.785bits per byte, against 2.829 unedited

Where the gain comes from

Its gain on each thing the exam tests, in bits per byte better than unedited. Each counts the same. Right is better.

bits per byte better than unedited−0.2−0.10.00.10.2knowledge−0.104reading+0.079reasoning+0.113code−0.101agents+0.140writing+0.065conversation+0.076

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 14 →

Its code 3 files · 7.2 kB

Public from its first round. Start from it:

import re
from collections import Counter, defaultdict

from xxhash import xxh3_64_intdigest as digest


EDITABLE = {"prose", "news", "reference"}
LINES = re.compile(rb"[^\n]+\n?")
STRETCH = re.compile(rb"[ \t\r]+")


def paragraphs(task, page):
    body = task.corpus.raw(page.doc)
    for left, right in page.ranges:
        for match in LINES.finditer(body, left, right):
            start, end = match.span()
            if 180 <= end - start <= 4_600:
                line = match.group().strip()
                if b" " in line and line.count(b"|") < 3:
                    yield start, end, digest(STRETCH.sub(b" ", line))


def remaining_ranges(ranges, cuts):
    output = []
    index = 0
    for left, right in ranges:
        start = left
        while index < len(cuts) and cuts[index][0] < right:
            before, after = cuts[index]
            if before - start >= 64 or before == start:
                if before > start:
                    output.append((start, before))
                start = after
            index += 1
        if right > start:
            if right - start < 64:
                return ranges
            output.append((start, right))
    return output or ranges


def rows(task, selected, candidates, target):
    occurrences = Counter()
    best = {}
    documents = []
    for index, page in enumerate(selected):
        if page.genre not in EDITABLE or task.time_left() < 25:
            continue
        blocks = list(paragraphs(task, page))
        if blocks:
            documents.append((index, page, blocks))
            rank = (page.score, -page.doc)
            for key in {key for _, _, key in blocks}:
                occurrences[key] += 1
                if rank > best.get(key, (-100, 0)):
                    best[key] = rank
    gaps = Counter()
    replaced = {}
    removed = 0
    for index, page, blocks in documents:
        if removed >= 0.019 * target or task.time_left() < 16:
            break
        cuts = [(left, right) for left, right, key in blocks if occurrences[key] >= 3 and best[key][1] != -page.doc]
        if not cuts:
            continue
        total = sum(right - left for left, right in page.ranges)
        reduced = remaining_ranges(page.ranges, cuts)
        kept = sum(right - left for left, right in reduced)
        if 0.62 * total <= kept < total:
            delta = round(page.tokens * (total - kept) / total)
            key = page.language, page.genre
            gaps[key] += delta
            replaced[index] = reduced, key, delta
            removed += delta
    reserves = defaultdict(list)
    existing = {page.doc for page in selected}
    seen = {key for page in selected for key in page.fingerprints}
    for page in sorted(candidates, key=lambda item: (item.score, -item.doc), reverse=True):
        if task.time_left() < 8 or not gaps:
            break
        key = page.language, page.genre
        if page.doc in existing or gaps.get(key, 0) <= 0 or page.tokens > max(350, 1.22 * gaps[key]):
            continue
        if sum(fp in seen for fp in set(page.fingerprints)) >= min(2, len(page.fingerprints)):
            continue
        reserves[key].append(page)
        seen.update(page.fingerprints)
        gaps[key] -= page.tokens
        if gaps[key] <= 0:
            del gaps[key]
    restored = sum(page.tokens for pages in reserves.values() for page in pages)
    print(f"Paragraph pruning trimmed {len(replaced):,} pages, removed {removed:,} estimated tokens and refilled {restored:,}", flush=True)
    credits = Counter()
    for index, page in enumerate(selected):
        edit = replaced.get(index)
        yield {"d": page.doc, "k": edit[0] if edit else page.ranges}
        if not edit:
            continue
        _, key, delta = edit
        credits[key] += delta
        while reserves[key] and reserves[key][-1].tokens <= credits[key]:
            extra = reserves[key].pop()
            credits[key] -= extra.tokens
            yield {"d": extra.doc, "k": extra.ranges}
    for pages in reserves.values():
        for extra in pages:
            yield {"d": extra.doc, "k": extra.ranges}

download bundle (.tar.zst) id 810ceb184fc5707e764d2d9bd4bbc5ce9bebc3f84f4244baba6ec76db0720373

Files it fetches 916.0 kB in 1 file

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.

PathSizesha256From
language/lid.176.ftz 916.0 kB 8f3472cfe873 https://huggingface.co/julien-c/fasttext-language-id/resolve/9f2e94d2fd6b2615d26f5ec5b34cf7e2f38cb86e/lid.176.ftz
total916.0 kB