Repository navigation
Trained checkpoints from the documented 15-hour experiment (see EXPERIMENT.md).
Assets (~986 MB each, load in fp32 or bf16 — see below):
hope_final_best.pth— Q&A fine-tuned (best QA val 3.51 @ step 5,273). Use this for chat/Q&A.hope_foundation_best.pth— 48k-step Wikipedia foundation (best wiki val 4.178, ppl ~65). Use for continued fine-tuning.
Provenance: single Apple-silicon Mac (MPS), ~786M Wikipedia tokens (foundation, steps 12k→48k extension of a 12k baseline) + 6k steps on the obekt QA micro set. Checkpoints contain model_state, per-tier optimizer_states/scheduler_states, tier_counters, step, best_val_loss — load with train_hope.py's HOPE class (strict=True) or via chat.py/generate.py after pointing CONFIG['save_path'] at the file, or directly: load_model_for_inference("hope_final_best.pth").
Capability statement: fluent English + Wikipedia genre + Q&A format; factual top-5 = 20% on our 20-probe cloze suite (3 facts at rank #1: "world", photosynthesis→"energy" p=69%, H2"O" p=24%). Full measurements and the pre-registered verdict are in the experiment report.
(See the dated correction at the bottom of these notes — that 20% does not replicate on unseen facts.)
Update (2026-09-26): greedy-decoding finding + inference speedups
The canonical question is answered correctly under greedy decoding
Question: Why is the sky blue?
Answer: Sunlight gets scattered by air molecules, making blue light more visible.
Reasoning: Blue light has shorter wavelengths that coll[ide with gas molecules…]
Honest caveats (both measured): it is memorization of the fine-tuning set (other questions like "What happens when water freezes?" still produce dataset-flavored non-answers), and it is prompt-format fragile (a single trailing space changes the first-token distribution; top-1 probability is only ~9% in the flat regime). Sampled decoding at temp 0.7 usually misses it.
Practical tip: use temperature ≤ 0.3 (or greedy) with hope_final_best.pth.
Inference is now ~2.5x faster on prefill, ~1.3x on generation (Apple MPS)
| Path | Before | After | Gain |
|---|---|---|---|
| Prefill T=512 | 12.8 ms | 5.1 ms | 2.5× |
| Prefill T=12 (chat prompt) | 4.0 ms | 2.4 ms | 1.6× |
| Generation | 387 tok/s | ~500 tok/s | 1.3× |
What changed (commit 53d582b, all in train_hope.py, used by chat.py/generate.py/app.py/test_model.py):
- bf16 weights by default — validated quality-identical: 100% greedy token agreement vs fp32 and identical factual-probe metrics (top-5 20%, MRR 0.165). The delta-rule scan and memory state always run fp32 (MPS
solve_triangularis fp32-only). Passdtype=torch.float32/--dtype fp32for legacy behavior. last_only=Trueprefill — CMS stack + head run on the final position only (CMS blocks are position-wise; only the fast memory mixes time). Mathematically identical outputs, proven intest_inference.py.torch.compilefor T=1 generation steps (+1.15×) with automatic eager fallback; prefill stays eager (inductor cannot lowersolve_triangularon MPS).- Nucleus sampling + repetition penalty (
sample_next_token: top-k 40, top-p 0.9, penalty 1.15, MPS NaN guard) — fixes repetition-loop degeneration.
Download: gh release download v0.1-marathon --repo obekt/HOPE-nested-learning
⚠️ Correction (2026-11-05): the capability statement above overstates factual knowledge
That 20% top-5 is measured on the same 20 cues the run was tracked against. On
25 freshly written facts, both released checkpoints score 0.000 top-5 (MRR ≤ 0.009).
GPT-2-small — same 50,257-token vocabulary, run through the identical suite — scores
0.280 on those facts. Multiple-choice likelihood (ARC / MMLU / HellaSwag / Winogrande)
sits at chance for GPT-2-small too under the protocol I used, so those columns
prove little at 86–124M; perplexity, cloze ranking and in-context copying are the
columns that discriminate.
Honest summary of these weights: fluent English, Wikipedia's genre, the Q&A format, a
handful of hardened snippets recalled — and no factual generalisation to unseen
questions. In-context retrieval: 11.3% (foundation) / 0.7% (Q&A) vs GPT-2's 35%.
Weight audit (why): head.weight is the only well-trained matrix (rms 18.8× its init),
while 61% of embedding rows and CMS blocks 8–15 — the slow tiers — are still at random
initialisation, and ridge probes of the head's own input recover the current token at
R² 0.46 but the integrated context at only R² 0.066.
Follow-up work, in the repo rather than in these assets: training-free weight
surgery — no gradient step, no optimizer; only the output layer is re-solved in
closed form (one 513×513 normal equation; 2 of 113 tensors change). Held-out Wikipedia
perplexity 421 → 216 (foundation) and 2 552 → 548 (Q&A), confirmation split
367 → 187 and 2 297 → 500, with factual ranking and retrieval left where they were.
Language modelling improved; capability did not. Writeup:
https://github.com/obekt/HOPE-nested-learning/blob/main/surgery/README.md and decision
D7 in https://github.com/obekt/HOPE-nested-learning/blob/main/EXPERIMENT_LOG.md
The edited .pth files are not attached to this release — the two assets here are
the originals. Reproduce the edit in one command from a clone of main (needs the two
originals in surgery/downloads/):
python3 surgery/src/build_artifact.py --base surgery/downloads/hope_foundation_best.pth \
--steps '[{"op":"distill_head","params":{"n_windows":300,"stride":2,"ridge":0.001,"mixbase":0.6,"wmode":"surprisal"}}]' \
--name foundation_headresolve --out surgery/out/hope_foundation_surg1.pthEach edited file carries its own provenance (op list, base sha256, tensor diff) and its
measured metrics inside a surgery block, so the numbers travel with the binary.