source-family-selection v1
Sparse phrase fingerprints with exact overlap verification, followed by paced prose selection
Screens copied passages across source pages while preserving multilingual coverage and a student-paced curriculum.
- Rank
- not yet1 of the 3 rounds it needs to be ranked
- Rating
- +0.043its gain a round, on average, held nearer everyone's while its rounds are few (±0.014)
Against the record holder, fineweb2: ahead by +0.000 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.
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.095bits 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.
The model, learning from it
Training loss on its pages. Low here is not the goal; the exam is.
Its code 8 files · 12.5 kB
Public from its first round. Start from it:
$ stet fork e389014d1170
- continuity.py3.8 kB
- curator.py17.9 kB
- early_order.py6.4 kB
- lengths.py1.5 kB
- prose_selection.py3.9 kB
- source_families.py2.4 kB
- stet.toml1.3 kB
- teacher_rank.py3.0 kB
"""Screen copied passages across sites with sampled and verified phrase overlap."""
import re
import unicodedata
from collections import Counter, defaultdict
from functools import lru_cache
from xxhash import xxh3_64_intdigest
from continuity import UNSEGMENTED
WORD = re.compile(r"[^\W_]+")
MIN_ANCHORS = 7
POSTING_LIMIT = 24
def terms(text):
text = unicodedata.normalize("NFC", text.casefold())
for match in WORD.finditer(text):
word = match.group()
if len(word) >= 4 and not word.isascii() and UNSEGMENTED.search(word):
for start in range(len(word) - 2):
yield word[start:start + 3]
else:
yield word
def fingerprints(text):
words = list(terms(text))
return {xxh3_64_intdigest(" ".join(phrase).encode())
for phrase in zip(words, words[1:], words[2:], words[3:])}
class SourceFamilies:
def __init__(self, read):
self.full = lru_cache(maxsize=1_024)(lambda index: fingerprints(read(index)))
self.sampled = lru_cache(maxsize=12_288)(
lambda index: frozenset(mark for mark in self.full(index) if mark & 15 == 0))
self.postings = defaultdict(list)
self.volumes = {}
self.rejected = {}
def related(self, index, marks):
hits = Counter(previous for mark in marks for previous in self.postings.get(mark, ()))
for previous, overlap in hits.most_common(12):
if overlap < max(6, round(0.47 * len(marks))):
break
if overlap < 0.25 * self.volumes[previous] and overlap < 0.70 * len(marks):
continue
current, known = self.full(index), self.full(previous)
shared = len(current & known)
if shared >= 0.77 * len(current) or (
shared >= 0.61 * len(current) and shared >= 0.58 * len(known)):
return previous
return None
def accept(self, index):
if index in self.rejected:
return False
marks = self.sampled(index)
if len(marks) < MIN_ANCHORS:
return True
earlier = self.related(index, marks)
if earlier is not None:
self.rejected[index] = earlier
return False
self.volumes[index] = len(marks)
for mark in marks:
listed = self.postings[mark]
if len(listed) < POSTING_LIMIT:
listed.append(index)
return True
download bundle (.tar.zst) id e389014d11700f7bdad17d6e315504dca661c8751ba13048c67da8dc793cac46
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.
| Path | Size | sha256 | From |
|---|---|---|---|
| language/lid.176.ftz | 916.0 kB | 8f3472cfe873 | https://huggingface.co/julien-c/fasttext-language-id/resolve/9f2e94d2fd6b2615d26f5ec5b34cf7e2f38cb86e/lid.176.ftz |
| difficulty/early.safetensors | 56.0 MB | f828164714bf | https://huggingface.co/ericflo/stet-matched-student-pace/resolve/a11215d67107307d0e76180494f41755edf4917d/early.safetensors |
| difficulty/mature.safetensors | 56.0 MB | 64c2afc22042 | https://huggingface.co/ericflo/stet-matched-student-pace/resolve/a11215d67107307d0e76180494f41755edf4917d/mature.safetensors |
| difficulty/calibration.json | 170 B | 3be8effd9fd9 | https://huggingface.co/ericflo/stet-matched-student-pace/resolve/a11215d67107307d0e76180494f41755edf4917d/calibration.json |
| total | 112.9 MB |