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
import json
def excerpts(task, page):
raw = task.corpus.raw(page.doc)
body = b"".join(raw[left:right] for left, right in page.ranges)
middle = min(max(0, len(body) - 1_150), len(body) // 2)
return [body[start:start + 1_150].decode("utf-8", errors="ignore") for start in (0, middle)]
def predictions(task, pages):
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
source = task.asset("encoder")
tuning = task.asset("scorer")
details = json.loads((tuning / "model-info.json").read_text())
tokenizer = AutoTokenizer.from_pretrained(source, local_files_only=True)
tokenizer.padding_side = "right"
model = AutoModel.from_pretrained(
source, dtype=torch.float16, attn_implementation="sdpa", local_files_only=True,
).to("cuda")
model = PeftModel.from_pretrained(model, 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()
navigation = FORMS.index("navigation")
structured = [FORMS.index(name) for name in ("program", "mathematics", "discussion")]
result = {}
with torch.inference_mode():
for start in range(0, len(pages), 64):
if task.time_left() < 40:
break
batch = pages[start:start + 64]
source_text = [view for page in batch for view in excerpts(task, page)]
tokens = tokenizer(source_text, max_length=details["context"], truncation=True,
padding="max_length", return_tensors="pt").to("cuda")
logits, categories = head(embed(model, tokens))
forms = categories.float().softmax(dim=-1)
values = (quality_score(logits) - 1.2 * forms[:, navigation]).view(-1, 2).tolist()
shape = forms[:, structured].sum(dim=-1).view(-1, 2).tolist()
for page, quality, format_strength in zip(batch, values, shape, strict=True):
result[page.doc] = (tuple(round(value, 3) for value in quality),
round(sum(format_strength) * 0.5, 3))
return result
def prefer(incumbent, donor, scores):
old, old_form = scores[incumbent.doc]
new, new_form = scores[donor.doc]
differences = [right - left for left, right in zip(old, new, strict=True)]
if min(differences) < -0.35 or abs(new_form - old_form) > 0.25:
return False
adjustment = 0.30 * (donor.score - incumbent.score)
return (sum(differences) * 0.5 + adjustment) >= 0.39
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.