student-pace-ensemble v1
A consensus of complementary student-supervised judges with exact-length exposure-preserving swaps
Uses a pairwise GLiDE adapter and a portable judge to schedule the same source passages by learning stage.
- Rank
- =1of 17 on the leaderboard, a place it shares: too close to call
- Rating
- +0.065its gain a round, on average, held nearer everyone's while its rounds are few (±0.007)
Against the record holder, fineweb2: ahead by +0.007 a round over 4 shared rounds. Tested at 5, 1 to go. the race →
Round by round
4 rounds
Where it came in each round, and its gain.
Inside its latest round round 9
- pages kept
- 14.7%of the documents drawn
- read
- 1.0×over what it kept
- on the exam
- 1.099bits per byte, against 1.159 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 · 10.6 kB
Public from its first round. Start from it:
$ stet fork 1f80e410cb5b
- curator.py16.8 kB
- early_order.py4.6 kB
- glide_difficulty.py3.4 kB
- layout_model.py789 B
- source_shape.py1.6 kB
- stet.toml5.0 kB
"""Predict early reading difficulty from native passages with a GLiDE adapter."""
import json
import math
import statistics
from itertools import batched
from pathlib import Path
from source_shape import features, predict
def model_directory(task):
try:
return Path(task.asset("difficulty"))
except FileNotFoundError:
return Path(__file__).with_name(".local-weights") / "difficulty"
def load(task):
import torch
from peft import PeftModel
from safetensors.torch import load_file
from transformers import AutoModel, AutoTokenizer
from layout_model import LayoutHead
source = task.asset("encoder")
directory = model_directory(task)
spec = json.loads((directory / "model-info.json").read_text(encoding="utf-8"))
selected = spec.get("selected", "fine_tuned")
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")
if selected == "fine_tuned":
model = PeftModel.from_pretrained(model, directory / "adapter", local_files_only=True)
head = LayoutHead(spec["width"])
name = "page-head.safetensors" if selected == "fine_tuned" else "frozen-head.safetensors"
head.load_state_dict(load_file(directory / name))
return tokenizer, model.eval(), head.to("cuda").eval(), spec["context"]
def rank(task, pages, indices, season, encoding, read_body, window):
if not indices or task.device() != "cuda" or task.time_left() < 26:
return {}
import torch
from stet.tok import encode_batch
from layout_model import embed
tokenizer, model, head, model_context = load(task)
shape = json.loads((model_directory(task) / "difficulty.json").read_text(encoding="utf-8"))
estimates = {}
with torch.inference_mode():
for batch in batched(indices, 24):
if task.time_left() < 13:
break
spans = []
for index in batch:
body = read_body(task, index, pages[index], season)
center = len(body) // 2
spans.append(body[max(0, center - 850):center + 1650].decode("utf-8", errors="replace"))
views = []
for index, tokens in zip(batch, encode_batch(encoding, spans), strict=True):
room = len(tokens) - window
if room >= 0:
offsets = sorted({room // 5, room // 2, room * 4 // 5})
readings = [encoding.decode(tokens[start:start + window]).strip() for start in offsets]
views.append((index, readings))
if not views:
continue
inputs = tokenizer([text for _, readings in views for text in readings], max_length=model_context,
truncation=True, padding="max_length", return_tensors="pt").to("cuda")
outputs = iter(head(embed(model, inputs)).tolist())
for index, readings in views:
neural = statistics.mean(next(outputs) for _ in readings) * 0.25
portable = statistics.mean(predict(features(text), shape) for text in readings)
estimate = 0.65 * neural + 0.35 * portable
if math.isfinite(estimate):
estimates[index] = round(estimate, 5)
return estimates
download bundle (.tar.zst) id 1f80e410cb5b497029844bb66cdf0cfea119a0328f42fd1b3c201e16114ec51e
Files it fetches 758.0 MB in 18 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.