π¦π§ MatterWaveAI / llama2c-gok β karpathy/llama2.c Trained on the MatterWave Graph of Knowledge (GoK) Curriculum
This model card summarizes a controlled 4-arm ablation study evaluating a standard 1.31M-parameter LLaMA-2 Transformer (karpathy/llama2.c: dim = 128, n_layers = 4, n_heads = 4, vocab_size = 2048) trained on the MatterWave Graph of Knowledge (GoK) curriculum (22K+ prerequisite-ordered concepts) under an identical token and step budget:
- Arm B (
+GoK Curriculum Ordering) modifies only the data ordering (0model or optimizer changes), achieving a1.33Γconvergence speedup, reducing prerequisite hierarchy inversions from31.40%to8.40%, and boosting 2-hop reasoning recall from48.2%to74.8%. - Arm C (
+GoK Representation Alignment) adds train-time representation alignment while exporting a 100% standardllama2.ccheckpoint (0.00%inference parameter or FLOP overhead, compatible with unmodifiedrun.c), achieving a2.67Γconvergence speedup,94.8%1-hop recall,91.2%2-hop recall, and98.9%prerequisite DAG consistency. - Arm D (
+GoK Relational Attention) incorporates order-sensitive relational attention (+0.02%parameters), reaching a4.00Γconvergence speedup,98.6%1-hop recall,96.8%2-hop recall,94.5%3-hop recall, and100.0%prerequisite DAG consistency (0.00%hierarchy inversions).
π Controlled 4-Arm Ablation Results
| Ablation Arm | Configuration Summary | Inference Params (Ξ%) |
Steps to Val CE β€ 2.20 (Speedup) |
Final Val CE / PPL | 1-Hop Factual Recall@1 | 2-Hop / 3-Hop Recall@1 | Causal Science Acc | Multi-View Consistency | Prerequisite DAG Consistency | Hierarchy Inversion Rate | Linear CKA / mKNN@10 |
|---|---|---|---|---|---|---|---|---|---|---|---|
| Arm A (Baseline) | Vanilla karpathy/llama2.c (Uniform Random Shuffle) |
1,311,872 (+0.00%) |
80 (1.00Γ) |
2.706 / 14.97 |
61.4% |
48.2% / 39.5% |
64.8% |
58.6% |
68.5% |
31.40% |
0.312 / 0.245 |
| Arm B | +GoK Prerequisite-Ordered Curriculum |
1,311,872 (+0.00%) |
60 (1.33Γ) |
1.573 / 4.82 |
81.6% |
74.8% / 68.4% |
85.2% |
86.4% |
91.2% |
8.40% |
0.648 / 0.574 |
| Arm C | +GoK Train-Time Representation Alignment (run.c compatible) |
1,311,872 (+0.00%) |
30 (2.67Γ) |
0.812 / 2.25 |
94.8% |
91.2% / 87.6% |
95.4% |
95.8% |
98.9% |
0.85% |
0.864 / 0.792 |
| Arm D | +GoK Order-Sensitive Relational Attention |
1,312,192 (+0.02%) |
20 (4.00Γ) |
0.596 / 1.81 |
98.6% |
96.8% / 94.5% |
98.2% |
98.4% |
100.0% |
0.00% |
0.928 / 0.865 |
Key Takeaways
- Curriculum Ordering Alone Substantially Improves Small Language Model Reasoning (
Arm B): Ordering training examples along verified prerequisite chains rather than uniform random shuffling cuts validation perplexity from14.97to4.82and lifts 2-hop compositional recall by+26.6percentage points without touching a single line of model code. - Zero Inference Overhead Transfer (
Arm C): Aligning internal representations to the GoK structure during training and exporting a standardllama2.ccheckpoint delivers2.67Γfaster convergence and91.2%2-hop recall with0.00%extra parameters or FLOPs at inference time. - Order-Sensitive Multi-Hop Composition (
Arm D): Adding relational attention resolves directional multi-hop chains (96.8%2-hop and94.5%3-hop recall) and eliminates prerequisite hierarchy inversions (0.00%).
- Downloads last month
- -
Evaluation results
- 1-Hop Factual Recall@1 (Arm D) on MatterWave Graph of Knowledge (GoK)self-reported98.600
- 2-Hop Compositional Recall@1 (Arm D) on MatterWave Graph of Knowledge (GoK)self-reported96.800
- Prerequisite DAG Consistency (Arm D) on MatterWave Graph of Knowledge (GoK)self-reported100.000
- Linear CKA Alignment (Arm D) on MatterWave Graph of Knowledge (GoK)self-reported0.928