glide-exact-replay v1
GLiDE-0.4B LoRA preference comparisons with spaced source-row repetition
Replays stronger pages later in the same language, format and exact-token-length training slots.
- Rank
- =1of 17 on the leaderboard, a place it shares: too close to call
- Rating
- +0.063its gain a round, on average, held nearer everyone's while its rounds are few (±0.008)
Round by round
3 rounds
Where it came in each round, and its gain.
Inside its latest round round 4
- pages kept
- 14.4%of the documents drawn
- read
- 1.0×over what it kept
- on the exam
- 1.085bits per byte, against 1.155 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 5 files · 9.4 kB
Public from its first round. Start from it:
$ stet fork 98b415c80e60
from collections import Counter, defaultdict
from scorer import predictions, prefer
ELIGIBLE = {"prose", "reference", "news", "technical", "discussion", "code", "shell"}
def sample(task, selected):
maximum = 19_200 if task.train_tokens >= 80_000_000 else 6_400
pages = [page for page in selected if page.genre in ELIGIBLE and 150 <= page.tokens <= 3_400]
pages.sort(key=lambda page: ((page.doc * 2654435761) & 0xffffffff, page.doc))
return pages[:maximum]
def compare_slots(task, selected, scores):
from stet.spec import load_season
from stet.tok import Unreadable, encode_one, load_encoding
encoding = load_encoding(load_season())
groups = defaultdict(list)
for index, page in enumerate(selected):
if page.doc not in scores:
continue
if task.time_left() < 15:
break
raw = task.corpus.raw(page.doc)
body = b"".join(raw[left:right] for left, right in page.ranges)
try:
size = len(encode_one(encoding, body.decode("utf-8", errors="replace")))
except Unreadable:
continue
groups[page.language, page.genre, size].append((index, page))
return groups
def schedule(task, selected, groups, scores, target):
limit = len(selected)
replacement = {}
repeated = set()
hosts = Counter()
volume = 0
for (_, _, size), pages in groups.items():
if volume >= target * 0.042 or task.time_left() < 9:
break
if len(pages) < 2:
continue
before = [(index, page) for index, page in pages if index < limit * 0.48]
after = [(index, page) for index, page in pages if index >= limit * 0.52]
before.sort(key=lambda item: (-sum(scores[item[1].doc][0]), item[0]))
after.sort(key=lambda item: (sum(scores[item[1].doc][0]), item[0]))
for index, weak in after:
if volume + size > target * 0.042:
break
for first, donor in before:
if (index - first < limit * 0.22 or donor.doc in repeated or donor.host == weak.host
or hosts[donor.host] + size > max(3_000, target * 0.0004)):
continue
if not prefer(weak, donor, scores):
continue
replacement[index] = donor
repeated.add(donor.doc)
hosts[donor.host] += size
volume += size
break
print(f"Exact GLiDE replay scored {len(scores):,} pages and repeated {len(replacement):,} rows "
f"covering {volume:,} tokens", flush=True)
return replacement
def apply(task, selected, target):
if task.device() != "cuda" or task.time_left() < 75:
return
try:
scores = predictions(task, sample(task, selected))
groups = compare_slots(task, selected, scores)
except (ImportError, KeyError, OSError, RuntimeError, ValueError) as error:
print(f"GLiDE exact replay could not run ({error})", flush=True)
return
replacement = schedule(task, selected, groups, scores, target)
if replacement:
def rows():
for index, current in enumerate(selected):
page = replacement.get(index, current)
yield {"d": page.doc, "k": page.ranges}
task.write(rows())
download bundle (.tar.zst) id 98b415c80e605358c5ecdbfb55e0eacb6b94f330dac24b84b922ef0b0570bd60
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.