balanced-technical-rehearsal v1
Spaced source repetition with exact token widths and a balanced technical mix
Replays native code, shell and quantitative examples later in a student-paced training schedule.
- Rank
- =8of 17 on the leaderboard, a place it shares: too close to call
- Rating
- +0.049its 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 10
- pages kept
- 14.6%of the documents drawn
- read
- 1.0×over what it kept
- on the exam
- 1.096bits per byte, against 1.152 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 6 files · 11.5 kB
Public from its first round. Start from it:
$ stet fork 7016607f728e
- curator.py17.9 kB
- early_order.py6.4 kB
- lengths.py1.5 kB
- stet.toml1.3 kB
- teacher_rank.py3.0 kB
- technical_rehearsal.py6.2 kB
"""Measure passage difficulty with early and fully trained Stet students."""
import json
import math
import statistics
from itertools import batched
from pathlib import Path
PREFIX = 64
def load_student(season, state_path, device):
from safetensors.torch import load_file
from stet.train import build_model
state = load_file(state_path)
state["head.weight"] = state["embed.weight"]
model = build_model(season.scale("standard"), season, 0, device)
model.load_state_dict(state)
return model.eval()
def loss(model, tokens, device):
import torch
from torch.nn.functional import cross_entropy
labels = tokens[:, PREFIX:]
with torch.autocast(device_type=device.type, dtype=torch.float16, enabled=device.type == "cuda"):
logits = model(tokens[:, :-1])[:, PREFIX - 1:]
return (cross_entropy(logits.float().transpose(1, 2), labels, reduction="none").mean(1) / math.log(2)).tolist()
def rank(task, pages, indices, season, encoding, read_body, window):
if not indices or task.time_left() < 22:
return {}
import torch
from stet.tok import encode_batch
try:
directory = Path(task.asset("difficulty"))
except FileNotFoundError:
directory = Path(__file__).with_name(".local-weights") / "difficulty"
slopes = json.loads((directory / "calibration.json").read_text(encoding="utf-8"))
device = torch.device(task.device())
torch.set_num_threads(min(6, task.cores))
first = load_student(season, directory / "early.safetensors", device)
last = load_student(season, directory / "mature.safetensors", device)
estimates = {}
with torch.inference_mode():
for batch in batched(indices, 24 if device.type == "cuda" else 8):
if task.time_left() < 14:
break
excerpts = []
for index in batch:
passage = read_body(task, index, pages[index], season)
middle = len(passage) // 2
excerpts.append(passage[max(0, middle - 850):middle + 1650].decode("utf-8", errors="replace"))
slices, sections = [], []
for index, tokens in zip(batch, encode_batch(encoding, excerpts), strict=True):
room = len(tokens) - window
if room >= 0:
offsets = sorted({room // 5, room // 2, room * 4 // 5})
start = len(slices)
slices.extend(tokens[offset:offset + window] for offset in offsets)
sections.append((index, start, len(slices)))
if not slices:
continue
inputs = torch.tensor(slices, device=device, dtype=torch.long)
early = loss(first, inputs, device)
mature = loss(last, inputs, device)
for index, start, stop in sections:
expected = statistics.mean(mature[start:stop])
residual = statistics.mean(early[start:stop]) - expected * slopes[pages[index].language]
estimates[index] = round(residual, 4), round(expected, 4)
return estimates
download bundle (.tar.zst) id 7016607f728e807852ac1d672a63044600da481d35fcfb91c7f3267df4644ba0
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 |