KitsuVp commited on
Commit
8b89dbc
·
verified ·
1 Parent(s): 51cf8b6

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +157 -38
README.md CHANGED
@@ -5,61 +5,180 @@ tags:
5
  model-index:
6
  - name: NeoLLM
7
  results: []
 
 
 
 
 
8
  ---
9
 
10
  <!-- This model card has been generated automatically according to the information the Trainer had access to. You
11
  should probably proofread and complete it, then remove this comment. -->
12
-
13
  # NeoLLM
14
 
15
- This model is a fine-tuned version of [](https://huggingface.co/) on an unknown dataset.
16
- It achieves the following results on the evaluation set:
17
- - Loss: 2.3449
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
18
 
19
- ## Model description
 
 
 
 
20
 
21
- More information needed
22
 
23
- ## Intended uses & limitations
24
 
25
- More information needed
26
 
27
- ## Training and evaluation data
28
 
29
- More information needed
 
 
30
 
31
- ## Training procedure
 
 
 
32
 
33
- ### Training hyperparameters
34
 
35
- The following hyperparameters were used during training:
36
- - learning_rate: 0.0006
37
- - train_batch_size: 64
38
- - eval_batch_size: 64
39
- - seed: 42
40
- - optimizer: Use OptimizerNames.ADAMW_TORCH_FUSED with betas=(0.9,0.999) and epsilon=1e-08 and optimizer_args=No additional optimizer arguments
41
- - lr_scheduler_type: linear
42
- - lr_scheduler_warmup_steps: 0.1
43
- - num_epochs: 1
44
 
45
- ### Training results
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
46
 
47
- | Training Loss | Epoch | Step | Validation Loss |
48
- |:-------------:|:------:|:-----:|:---------------:|
49
- | 3.7011 | 0.1067 | 5000 | 3.6012 |
50
- | 3.2863 | 0.2133 | 10000 | 3.1686 |
51
- | 3.0744 | 0.32 | 15000 | 2.9543 |
52
- | 2.9347 | 0.4267 | 20000 | 2.8076 |
53
- | 2.8322 | 0.5333 | 25000 | 2.6952 |
54
- | 2.7471 | 0.64 | 30000 | 2.6047 |
55
- | 2.6859 | 0.7467 | 35000 | 2.5439 |
56
- | 2.6580 | 0.8533 | 40000 | 2.5045 |
57
- | 2.4929 | 0.96 | 45000 | 2.3449 |
58
 
 
59
 
60
- ### Framework versions
61
 
62
- - Transformers 5.3.0
63
- - Pytorch 2.10.0+cu130
64
- - Datasets 4.8.4
65
- - Tokenizers 0.22.2
 
 
 
 
 
5
  model-index:
6
  - name: NeoLLM
7
  results: []
8
+ license: apache-2.0
9
+ datasets:
10
+ - HuggingFaceFW/fineweb-edu
11
+ language:
12
+ - en
13
  ---
14
 
15
  <!-- This model card has been generated automatically according to the information the Trainer had access to. You
16
  should probably proofread and complete it, then remove this comment. -->
 
17
  # NeoLLM
18
 
19
+ NeoLLM is a 135M parameter language model trained from scratch on [FineWeb-Edu](https://huggingface.co/datasets/HuggingFaceFW/fineweb-edu) in FP8. It integrates a collection of recently published attention and normalization techniques into a single architecture, with the goal of studying their combined behavior during pretraining. The model is actively being developed and the current checkpoint represents an intermediate training state.
20
+
21
+ ---
22
+
23
+ ## Architecture
24
+
25
+ NeoLLM is a decoder-only transformer with the following configuration:
26
+
27
+ | Parameter | Value |
28
+ |---|---|
29
+ | Hidden size | 512 |
30
+ | Layers | 12 |
31
+ | Attention heads | 8 |
32
+ | KV heads (GQA) | 2 |
33
+ | Head dim | 64 |
34
+ | Intermediate size | 1536 |
35
+ | Parameters | ~135M (77M tied embeddings, ~58M effective) |
36
+ | Vocabulary | Qwen3 tokenizer |
37
+ | Context length | 512 |
38
+
39
+ ### Components
40
+
41
+ Each layer integrates the following mechanisms simultaneously:
42
+
43
+ **Normalization**
44
+ - **SeeDNorm** ([arXiv:2510.22777](https://arxiv.org/abs/2510.22777)) — Self-rescaled dynamic normalization applied to Q and K projections
45
+ - **PolyNorm / GPAS** ([arXiv:2506.22049](https://arxiv.org/abs/2506.22049), [arXiv:2602.04902](https://arxiv.org/abs/2602.04902)) — Polynomial composition activations with three branches (linear, quadratic, cubic) and gradient-preserving activation scaling on residual connections
46
+ - **LayerNorm Scaling / LNS** ([arXiv:2502.05795](https://arxiv.org/abs/2502.05795)) — Per-layer scaling by 1/√ℓ to address the Curse of Depth
47
+
48
+ **Attention**
49
+ - **FAN** ([arXiv:2502.21309](https://arxiv.org/abs/2502.21309)) — Fourier Analysis Networks: periodic channels in input projections for improved periodicity modeling
50
+ - **MEA** ([arXiv:2601.19611](https://arxiv.org/abs/2601.19611)) — Explicit Multi-head Attention with learnable inter-head interaction matrices for K and V
51
+ - **LUCID** ([arXiv:2602.10410](https://arxiv.org/abs/2602.10410)) — Lower-triangular preconditioner on V for attention decorrelation
52
+ - **Affine-Scaled Attention** ([arXiv:2602.23057](https://arxiv.org/abs/2602.23057)) — Learnable per-head α and β scaling of softmax weights: `[α·softmax(QKᵀ)+β]V`
53
+ - **XSA** ([arXiv:2603.09078](https://arxiv.org/abs/2603.09078)) — Exclusive Self Attention: removes the auto-position component from attention output
54
+ - **Directional Routing** ([arXiv:2603.14923](https://arxiv.org/abs/2603.14923)) — Learned suppression of attention output along K=4 directions per head
55
+ - **Gated Attention** ([arXiv:2505.06708](https://arxiv.org/abs/2505.06708)) — Sigmoid gate applied to attention output before o_proj
56
+ - **Momentum Attention** ([arXiv:2411.03884](https://arxiv.org/abs/2411.03884)) — Causal first-difference shear on Q and K
57
+
58
+ **MLP**
59
+ - **Learnable Multipliers** ([arXiv:2601.04890](https://arxiv.org/abs/2601.04890)) — Per-row and per-column learnable scale parameters on linear layers
60
+ - **SimpleGPT** ([arXiv:2602.01212](https://arxiv.org/abs/2602.01212)) — Second-order geometry normalization applied inside MLP projections
61
+
62
+ ---
63
+
64
+ ## Training
65
+
66
+ | Setting | Value |
67
+ |---|---|
68
+ | Dataset | FineWeb-Edu |
69
+ | Tokens | ~1.5B (45k steps × batch 64 × length 512) |
70
+ | Precision | FP8 (E4M3/E5M2) native |
71
+ | Optimizer | AdamW fused (β₁=0.9, β₂=0.999, ε=1e-8) |
72
+ | Learning rate | 6e-4 with linear warmup (10%) |
73
+ | Weight decay | 0.1 |
74
+ | Training time | ~6 hours |
75
+ | Hardware | NVIDIA RTX 5090 |
76
+
77
+ ### Training curve
78
+
79
+ | Step | Train Loss | Val Loss |
80
+ |---|---|---|
81
+ | 5,000 | 3.701 | 3.601 |
82
+ | 10,000 | 3.286 | 3.169 |
83
+ | 15,000 | 3.074 | 2.954 |
84
+ | 20,000 | 2.935 | 2.808 |
85
+ | 25,000 | 2.832 | 2.695 |
86
+ | 30,000 | 2.747 | 2.605 |
87
+ | 35,000 | 2.686 | 2.544 |
88
+ | 40,000 | 2.658 | 2.505 |
89
+ | 45,000 | 2.493 | 2.345 |
90
+
91
+
92
+ ---
93
+
94
+ ## Benchmarks
95
+
96
+ Evaluated with [lm-evaluation-harness](https://github.com/EleutherAI/lm-evaluation-harness), 0-shot.
97
+
98
+ | Task | Metric | Score |
99
+ |---|---|---|
100
+ | MMLU | acc | 23.02% |
101
+ | BoolQ | acc | 54.43% |
102
+ | ARC-Easy | acc_norm | 34.55% |
103
+ | ARC-Challenge | acc_norm | 22.44% |
104
+ | PIQA | acc_norm | 53.59% |
105
+ | HellaSwag | acc_norm | 26.78% |
106
+ | OpenBookQA | acc_norm | 29.00% |
107
+ | Winogrande | acc | 46.96% |
108
+ | SCIQ | acc | 58.30% |
109
+ | CommonsenseQA | acc | 20.88% |
110
+ | Lambada (OpenAI) | acc | 9.02% |
111
+ | TruthfulQA MC2 | acc | 46.45% |
112
+ | COPA | acc | 57.00% |
113
+ | ANLI R1 | acc | 35.90% |
114
+ | ANLI R2 | acc | 33.90% |
115
+ | ANLI R3 | acc | 33.58% |
116
+ | Wikitext | word_ppl | 40.41 |
117
+ | **Average (acc tasks)** | | **36.61%** |
118
 
119
+ ---
120
+
121
+ ## Interpretability notes
122
+
123
+ A set of custom interpretability tools was developed alongside training to analyze the internal dynamics of the model. The following observations correspond to the 45k step checkpoint.
124
 
125
+ **Layer hierarchy.** The model develops a functional hierarchy across layers. Early layers (L0–L3) focus on local structure processing, with XSA auto-position removal active at frac > 1.5 throughout. Middle layers (L4–L6) capture periodic and sequential patterns — L5 explicitly attends to preceding elements in geometric sequences. Layers L7–L8 perform global integration with cross-head similarity above 0.87. Layers L9–L11 perform synthesis toward the vocabulary head, with L11 MLP contributing rho_mlp = 0.81 to the residual stream.
126
 
127
+ **Affine-Scaled Attention.** Learned α values range from 0.23 to 0.54 across layers. Lower α appears in layers with high XSA activity, where affine defers to global integration via the β·V_cumsum term. ΔH (attention entropy increase from affine) is consistently positive across all layers and inputs.
128
 
129
+ **Periodicity.** FAN R_FAN grows monotonically with depth in long sequences, reaching 0.18 in L11 at 130 tokens. This indicates that periodic channels are activated in proportion to available sequential structure in the input.
130
 
131
+ **Numerical condition.** MLP outlier risk (simulated via the colinearity mechanism described in TWEO, arXiv:2511.23225) is 1.96 mean (vs 500–5000 typical for standard transformers), reflecting near-orthogonal gate_proj and up_proj dominant directions. The only component with elevated condition numbers is o_proj (κ from 2,009 to 105,616), partially compensated by the learnable multipliers.
132
 
133
+ ---
134
+
135
+ ## Limitations
136
 
137
+ - The model is trained for a single epoch on FineWeb-Edu and has not reached its estimated token optimum. Knowledge-intensive tasks (MMLU, factual retrieval) remain limited.
138
+ - A gradient spike near step 40k degraded the long-range correlation structure in layer 9, affecting tasks that require integrating information across long distances (Lambada, SCIQ, BoolQ). An earlier checkpoint around step 38k is expected to have better aggregate benchmark performance.
139
+ - PolyNorm exclusivity for the quadratic branch (delta_12) is negative across all layers at 45k steps, indicating that the exclusive_logits parameters did not converge to effective orthogonalization. This will be addressed in subsequent runs by including exclusive_logits in the checkpoint from the start of training.
140
+ - The model has not been instruction-tuned or aligned in any way. It is a base language model intended for research.
141
 
142
+ ---
143
 
144
+ ## Intended use
 
 
 
 
 
 
 
 
145
 
146
+ NeoLLM is released for research purposes. It is intended as a testbed for studying the combined behavior of recent attention and normalization techniques during pretraining at small scale. It is not intended for production deployment in its current state.
147
+
148
+ ---
149
+
150
+ ## References
151
+
152
+ | Paper | arXiv |
153
+ |---|---|
154
+ | SeeDNorm: Self-Rescaled Dynamic Normalization | [2510.22777](https://arxiv.org/abs/2510.22777) |
155
+ | Explicit Multi-head Attention (MEA) | [2601.19611](https://arxiv.org/abs/2601.19611) |
156
+ | Learnable Multipliers | [2601.04890](https://arxiv.org/abs/2601.04890) |
157
+ | Directional Routing in Transformers | [2603.14923](https://arxiv.org/abs/2603.14923) |
158
+ | Exclusive Self Attention (XSA) | [2603.09078](https://arxiv.org/abs/2603.09078) |
159
+ | Gated Attention for LLMs | [2505.06708](https://arxiv.org/abs/2505.06708) |
160
+ | Affine-Scaled Attention | [2602.23057](https://arxiv.org/abs/2602.23057) |
161
+ | The Curse of Depth in LLMs (LNS) | [2502.05795](https://arxiv.org/abs/2502.05795) |
162
+ | LUCID: Attention with Preconditioned Representations | [2602.10410](https://arxiv.org/abs/2602.10410) |
163
+ | FAN: Fourier Analysis Networks | [2502.21309](https://arxiv.org/abs/2502.21309) |
164
+ | SimpleGPT | [2602.01212](https://arxiv.org/abs/2602.01212) |
165
+ | GPAS: Gradient-Preserving Activation Scaling | [2506.22049](https://arxiv.org/abs/2506.22049) |
166
+ | PolyNorm / PolyCom | [2602.04902](https://arxiv.org/abs/2602.04902) |
167
+ | Momentum Attention | [2411.03884](https://arxiv.org/abs/2411.03884) |
168
+
169
+ ---
170
 
171
+ ## License
 
 
 
 
 
 
 
 
 
 
172
 
173
+ Apache 2.0
174
 
175
+ ## Citation
176
 
177
+ ```bibtex
178
+ @misc{neollm2026,
179
+ title = {NeoLLM: A Research Language Model Integrating Recent Attention and Normalization Techniques},
180
+ author = {KitsuVp},
181
+ year = {2026},
182
+ url = {https://huggingface.co/KitsuVp/NeoLLM}
183
+ }
184
+ ```