8000 read: score held-out at the reading window, not the ceiling by gt50 · Pull Request #6 · gt50/mini-AGI · GitHub
[go: up one dir, main page]

Skip to content
8000
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 15 additions & 1 deletion train.py
Original file line number Diff line number Diff line change
Expand Up @@ -786,7 +786,19 @@ def _in_steps(chars, least=1):
eval_steps = max(1, int(args.eval_chunks) // max(1, args.chunk))
sample_eval_steps = max(1, int(args.sample_eval_chunks)
// max(1, args.chunk))
ev = (FolderEvaluator(model, args.held_out, args.chunk, cfg.block, device)
#
# AT THE WINDOW, NOT THE CEILING. This was built with cfg.block and never
# moved, so held-out was read at the ceiling while the model read at its
# window. On the large Strix profile - window 2,367 of 8,192 - that scored
# every subject 0.7 to 1.1 nats worse than the same text at the window,
# flattened held-out while training kept improving, and held growth's
# HONEST brake (train vs held-out) shut for the whole night. It went
# unnoticed while the released model's window had reached its ceiling,
# where the two are the same. `stream` already moves its evaluator with
# the window; this now does too, before every run below.
ev_ctx = max(64, min(int(man.get("context_now") or args.context_start),
int(cfg.block), int(args.context)))
ev = (FolderEvaluator(model, args.held_out, args.chunk, ev_ctx, device)
if args.held_out and os.path.isdir(args.held_out) else None)
before = None
if ev is not None:
Expand Down Expand Up @@ -1184,6 +1196,7 @@ def _on_int(sig, frm):
v_ = se_ = None
dom = None
if ev is not None:
ev.context = ctx_now # the window, as it is now
d = ev.run(sample_eval_steps)
se_ = d.pop("stderr", None)
v_ = float(np.mean(list(d.values())))
Expand Down Expand Up @@ -1371,6 +1384,7 @@ def _on_int(sig, frm):
print(f" mean loss over the files: {np.mean(losses):.4f}")

if ev is not None:
ev.context = ctx_now # the window it ended at
v = ev.run(eval_steps); se = v.pop("stderr", 0.0)
after = float(np.mean(list(v.values())))
d = after - before
Expand Down
Loading
0