Rounds paused
← Leaderboard

glide-native-excerpts v1

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

Matched byte-range decisions using an original GLiDE-0.4B LoRA and navigation guard

A fine-tuned GLiDE judges paired views of the same page to recover useful technical, conversation and reference layout.

Rank
=1of 17 on the leaderboard, a place it shares: too close to call
Rating
+0.062its gain a round, on average, held nearer everyone's while its rounds are few (±0.005)
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.086bits 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.089technical+0.054conversation+0.077agents+0.020reading+0.014logic+0.120grammar+0.025numbers−0.001programs+0.010knowledge−0.039

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 4 files · 9.4 kB

Public from its first round. Start from it:

$ stet fork aa3af5e6a043
import json
import re
from collections import Counter
from dataclasses import dataclass


FORM = re.compile(rb"(?m)^[ \t]*(?:[>*-] |>>> |\.\.\. |\$ |def |return |[+-][^\s+-]|\| |\d{1,2}[.)] |[\w-]{2,16}:\s)")
NAV = re.compile(rb"cookie policy|privacy policy|rights reserved|manage cookies|skip to main content|terms of use", re.I)
FORMS_BY_GENRE = {
    "code": "program", "shell": "program", "technical": "program",
    "discussion": "discussion", "reference": None,
}


@dataclass(slots=True)
class Proposal:
    slot: int
    doc: int
    ranges: list
    added_bytes: int
    kind: str | None
    before: str
    after: str


def propose(task, index, page):
    kind = FORMS_BY_GENRE[page.genre]
    raw = task.corpus.raw(page.doc)
    original = sum(right - left for left, right in page.ranges)
    cap = min(920, original // 3)
    best = None
    for i, ((begin, closing), (left, right)) in enumerate(zip(page.ranges, page.ranges[1:])):
        gap = raw[closing:left]
        if (not 14 <= len(gap) <= cap or NAV.search(gap) or gap.count(b"https://") > 1
                or not FORM.search(gap)):
            continue
        prefix = raw[max(begin, closing - 330):closing]
        suffix = raw[left:min(right, left + 440)]
        if len(prefix) + len(suffix) >= 220 and (best is None or len(gap) > len(best[2])):
            best = i, (begin, right), gap, prefix, suffix
    if best is None:
        return None
    i, joined, gap, prefix, suffix = best
    kept = [*page.ranges[:i], joined, *page.ranges[i + 2:]]
    before = (prefix + suffix).decode("utf-8", errors="ignore")
    after = (prefix + gap + suffix).decode("utf-8", errors="ignore")
    return Proposal(index, page.doc, kept, len(gap), kind, before, after)


def assess(task, proposals):
    import torch
    from peft import PeftModel
    from safetensors.torch import load_file
    from transformers import AutoModel, AutoTokenizer

    from decision import DecisionHead, FORMS, embed, quality_score

    base = task.asset("encoder")
    tuning = task.asset("scorer")
    details = json.loads((tuning / "model-info.json").read_text())
    tokenizer = AutoTokenizer.from_pretrained(base, local_files_only=True)
    tokenizer.padding_side = "right"
    encoder = AutoModel.from_pretrained(
        base, dtype=torch.float16, local_files_only=True, attn_implementation="sdpa",
    ).to("cuda")
    encoder = PeftModel.from_pretrained(encoder, tuning / "adapter", local_files_only=True).merge_and_unload().eval()
    head = DecisionHead(details["width"])
    head.load_state_dict(load_file(tuning / "lora-head.safetensors"))
    head = head.to("cuda").eval()
    retained = []
    evaluated = 0
    furniture = FORMS.index("navigation")
    with torch.inference_mode():
        for start in range(0, len(proposals), 48):
            if task.time_left() < 22:
                break
            batch = proposals[start:start + 48]
            pieces = [piece for proposal in batch for piece in (proposal.before, proposal.after)]
            tokens = tokenizer(pieces, max_length=details["context"], truncation=True,
                               padding="max_length", return_tensors="pt").to("cuda")
            quality, form = head(embed(encoder, tokens))
            merit = quality_score(quality).reshape(-1, 2).tolist()
            types = form.float().softmax(dim=-1).reshape(-1, 2, len(FORMS)).tolist()
            evaluated += len(batch)
            for proposal, (before, after), (old_form, new_form) in zip(batch, merit, types):
                navigation = new_form[furniture] - old_form[furniture]
                form_gain = 0.0
                if proposal.kind:
                    kind = FORMS.index(proposal.kind)
                    form_gain = new_form[kind] - old_form[kind]
                benefit = round(after - before + 1.4 * form_gain - 2.3 * max(0.0, navigation), 3)
                if (benefit >= -0.10 and new_form[furniture] <= max(0.34, old_form[furniture] + 0.05)
                        and (form_gain >= 0.06 or after - before >= 0.07)):
                    retained.append((benefit, proposal))
    return retained, evaluated


def apply(task, selected, target):
    if task.device() != "cuda" or task.time_left() < 70:
        return
    proposals = []
    for index, page in enumerate(selected):
        if page.genre in FORMS_BY_GENRE and len(page.ranges) >= 2:
            change = propose(task, index, page)
            if change:
                proposals.append(change)
    proposals.sort(key=lambda change: ((change.doc * 2654435761) & 0xffffffff, change.doc))
    limit = 8_000 if task.train_tokens >= 80_000_000 else 2_200
    if not proposals:
        return
    try:
        decisions, evaluated = assess(task, proposals[:limit])
    except (ImportError, KeyError, OSError, RuntimeError, ValueError) as error:
        print(f"GLiDE layout judge could not run ({error})", flush=True)
        return
    changes = {}
    reclaimed = Counter()
    size = 0
    for _, decision in sorted(decisions, key=lambda item: (-item[0], item[1].doc)):
        if size + decision.added_bytes > target * 0.022:
            break
        changes[decision.slot] = decision.ranges
        reclaimed[selected[decision.slot].genre] += decision.added_bytes
        size += decision.added_bytes
    print(f"GLiDE decided {evaluated:,} paired views and restored {size:,} source bytes in {len(changes):,} pages "
          f"{reclaimed.most_common()}", flush=True)
    if changes:
        task.write({"d": page.doc, "k": changes.get(index, page.ranges)} for index, page in enumerate(selected))

download bundle (.tar.zst) id aa3af5e6a043471dc3c2356c78eb078b2d3ca28c70ec86c8c066f2730d4b3343

Files it fetches 758.5 MB in 17 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.

PathSizesha256From
language/lid.176.ftz 916.0 kB 8f3472cfe873 https://huggingface.co/julien-c/fasttext-language-id/resolve/9f2e94d2fd6b2615d26f5ec5b34cf7e2f38cb86e/lid.176.ftz
encoder/LICENSE 5.1 kB 7381146597b4 https://huggingface.co/fastino/GLiDE-0.4B/resolve/6bda7ab91aeb36dcad6d27828a8871e548c7fc71/LICENSE
encoder/NOTICE 579 B 54576106686e https://huggingface.co/fastino/GLiDE-0.4B/resolve/6bda7ab91aeb36dcad6d27828a8871e548c7fc71/NOTICE
encoder/config.json 1.2 kB 778102ed6dca https://huggingface.co/fastino/GLiDE-0.4B/resolve/6bda7ab91aeb36dcad6d27828a8871e548c7fc71/config.json
encoder/licenses/Ettin-encoder-400m-LICENSE 1.1 kB 9cec9e5a835d https://huggingface.co/fastino/GLiDE-0.4B/resolve/6bda7ab91aeb36dcad6d27828a8871e548c7fc71/licenses/Ettin-encoder-400m-LICENSE
encoder/model-00001-of-00001.safetensors 753.0 MB 4540aa6d168f https://huggingface.co/fastino/GLiDE-0.4B/resolve/6bda7ab91aeb36dcad6d27828a8871e548c7fc71/model-00001-of-00001.safetensors
encoder/model.safetensors.index.json 12.0 kB 911f8dfccf8a https://huggingface.co/fastino/GLiDE-0.4B/resolve/6bda7ab91aeb36dcad6d27828a8871e548c7fc71/model.safetensors.index.json
encoder/special_tokens_map.json 694 B ea97ecdbcc73 https://huggingface.co/fastino/GLiDE-0.4B/resolve/6bda7ab91aeb36dcad6d27828a8871e548c7fc71/special_tokens_map.json
encoder/tokenizer.json 2.0 MB 9fd55248d51d https://huggingface.co/fastino/GLiDE-0.4B/resolve/6bda7ab91aeb36dcad6d27828a8871e548c7fc71/tokenizer.json
encoder/tokenizer_config.json 20.3 kB 3cd2017ff46d https://huggingface.co/fastino/GLiDE-0.4B/resolve/6bda7ab91aeb36dcad6d27828a8871e548c7fc71/tokenizer_config.json
scorer/LICENSE 5.1 kB 7381146597b4 https://huggingface.co/ericflo/stet-glide-pairwise-adapter/resolve/f0a1f614017700fb9764c87d32878f2d853f3370/LICENSE
scorer/NOTICE 579 B 54576106686e https://huggingface.co/ericflo/stet-glide-pairwise-adapter/resolve/f0a1f614017700fb9764c87d32878f2d853f3370/NOTICE
scorer/licenses/Ettin-encoder-400m-LICENSE 1.1 kB 9cec9e5a835d https://huggingface.co/ericflo/stet-glide-pairwise-adapter/resolve/f0a1f614017700fb9764c87d32878f2d853f3370/licenses/Ettin-encoder-400m-LICENSE
scorer/model-info.json 1.2 kB b0865edc7cea https://huggingface.co/ericflo/stet-glide-pairwise-adapter/resolve/f0a1f614017700fb9764c87d32878f2d853f3370/model-info.json
scorer/lora-head.safetensors 1.0 MB 7e7e9015d1b3 https://huggingface.co/ericflo/stet-glide-pairwise-adapter/resolve/f0a1f614017700fb9764c87d32878f2d853f3370/lora-head.safetensors
scorer/adapter/adapter_config.json 1.1 kB 05d3394bc1d7 https://huggingface.co/ericflo/stet-glide-pairwise-adapter/resolve/f0a1f614017700fb9764c87d32878f2d853f3370/adapter/adapter_config.json
scorer/adapter/adapter_model.safetensors 1.5 MB 4a23ba9cfe29 https://huggingface.co/ericflo/stet-glide-pairwise-adapter/resolve/f0a1f614017700fb9764c87d32878f2d853f3370/adapter/adapter_model.safetensors
total758.5 MB