KitsuVp commited on
Commit
d14e5d2
·
verified ·
1 Parent(s): d227ba4

Upload README.md with huggingface_hub

Browse files
Files changed (1) hide show
  1. README.md +246 -44
README.md CHANGED
@@ -1,64 +1,266 @@
1
  ---
2
- library_name: transformers
 
3
  tags:
4
- - generated_from_trainer
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: 3.6278
18
- - Ntp Loss: 3.3786
19
- - Tweo Loss: 0.0029
20
- - Nitp Loss: 0.1223
21
- - Total Model Loss: 3.5008
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
22
 
23
- ## Model description
 
 
24
 
25
- More information needed
26
 
27
- ## Intended uses & limitations
 
28
 
29
- More information needed
30
 
31
- ## Training and evaluation data
 
 
 
 
 
 
 
 
 
 
 
 
 
32
 
33
- More information needed
34
 
35
- ## Training procedure
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
36
 
37
- ### Training hyperparameters
38
 
39
- The following hyperparameters were used during training:
40
- - learning_rate: 0.0006
41
- - train_batch_size: 64
42
- - eval_batch_size: 64
43
- - seed: 42
44
- - optimizer: Use OptimizerNames.ADAMW_TORCH_FUSED with betas=(0.9,0.999) and epsilon=1e-08 and optimizer_args=No additional optimizer arguments
45
- - lr_scheduler_type: linear
46
- - lr_scheduler_warmup_steps: 0.1
47
- - num_epochs: 1
 
 
 
 
 
 
 
48
 
49
- ### Training results
50
 
51
- | Training Loss | Epoch | Step | Validation Loss | Loss | Model Loss |
52
- |:-------------:|:-----:|:-----:|:---------------:|:------:|:----------:|
53
- | 4.2626 | 0.32 | 5000 | 4.2079 | 0.1752 | 4.0986 |
54
- | 3.8635 | 0.64 | 10000 | 3.8313 | 0.1132 | 3.7097 |
55
- | 3.6815 | 0.96 | 15000 | 3.6417 | 0.1237 | 3.5122 |
56
- | 3.6652 | 1.0 | 15625 | 3.6278 | 0.1223 | 3.5008 |
 
 
57
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
58
 
59
- ### Framework versions
60
 
61
- - Transformers 5.12.1
62
- - Pytorch 2.12.1+cu130
63
- - Datasets 5.0.0
64
- - Tokenizers 0.22.2
 
1
  ---
2
+ language: en
3
+ license: apache-2.0
4
  tags:
5
+ - causal-lm
6
+ - research
7
+ - fp8
8
+ - attention
9
+ - normalization
10
+ - neollm
11
+ datasets:
12
+ - HuggingFaceFW/fineweb-edu
13
  ---
14
 
 
 
 
15
  # NeoLLM
16
 
17
+ NeoLLM is a **135 M parameter** decoder-only language model trained from scratch on
18
+ [FineWeb-Edu](https://huggingface.co/datasets/HuggingFaceFW/fineweb-edu) in **FP8**
19
+ precision, completing training in approximately **6 hours** on a single NVIDIA RTX 5090.
20
+ It integrates a collection of recently published attention and normalization techniques
21
+ into a single architecture, with the goal of studying how they interact during
22
+ pretraining. The model is actively being developed and the current checkpoint represents
23
+ an intermediate training state.
24
+
25
+ > **Author / contact:** [@Kyokopom](https://x.com/Kyokopom) on X
26
+ > **Repository:** [KitsuVp/NeoLLM](https://huggingface.co/KitsuVp/NeoLLM)
27
+
28
+ ---
29
+
30
+ ## Architecture
31
+
32
+ NeoLLM is a decoder-only transformer with the following configuration:
33
+
34
+ | Parameter | Value |
35
+ |---|---|
36
+ | Hidden size | 512 |
37
+ | Layers | 12 |
38
+ | Attention heads | 8 |
39
+ | KV heads (GQA) | 4 |
40
+ | Head dim | 64 |
41
+ | Intermediate size | 1536 |
42
+ | Vocabulary | Qwen3 tokenizer (64,402 tokens) |
43
+ | Context length | 512 tokens |
44
+
45
+ ### Parameter breakdown
46
+
47
+ | Parameter bucket | Count |
48
+ |---|---|
49
+ | **Total parameters** | 116.22M (116,216,184) |
50
+ | **Embedding parameters** (tied) | 32.97M (32,973,824) |
51
+ | **Non-embedding parameters** | 83.24M (83,242,360) |
52
+ | **Effective trainable parameters** | 116.22M (116,216,184) |
53
 
54
+ > Weight tying is **enabled**: the input embedding matrix and the language-model head
55
+ > share the same parameters, so the effective trainable budget is
56
+ > `total − embed = 83.24M`.
57
 
58
+ ### Integrated techniques
59
 
60
+ NeoLLM combines architecture modules, optional auxiliary objectives, and
61
+ training-time optimizer/stability components from the following papers.
62
 
63
+ **Embedding and token representation**
64
 
65
+ - **Learnable Multipliers** ([arXiv:2601.04890](https://arxiv.org/abs/2601.04890)) — Adds
66
+ per-row and per-column learnable scalar parameters to selected matrix layers and, when
67
+ enabled, embeddings.
68
+ - **Leviathan** ([arXiv:2601.22040](https://arxiv.org/abs/2601.22040)) — Optional
69
+ continuous token embedding generator that can replace the discrete input lookup table.
70
+ - **KHRONOS** ([arXiv:2505.13315](https://arxiv.org/abs/2505.13315)) — Kernel/basis
71
+ reference used by the Leviathan continuous token generator implementation.
72
+ - **JTok / JTok-M** ([arXiv:2602.00800](https://arxiv.org/abs/2602.00800)) — Optional
73
+ token-indexed self-modulation surfaces over Leviathan coordinates.
74
+ - **Spelling Bee Embeddings** ([arXiv:2601.18030](https://arxiv.org/abs/2601.18030)) —
75
+ Augments token embeddings with character-level spelling information.
76
+ - **Token Embedding Manifold analysis** ([arXiv:2504.01002](https://arxiv.org/abs/2504.01002)) —
77
+ Reference motivation for treating token embeddings as structured objects rather than
78
+ unconstrained lookup rows.
79
 
80
+ **Attention, positions, and output projection**
81
 
82
+ - **FAN** ([arXiv:2502.21309](https://arxiv.org/abs/2502.21309)) — Fourier Analysis Networks.
83
+ A portion of the projection channels are dedicated to periodic cosine/sine features.
84
+ - **MEA** ([arXiv:2601.19611](https://arxiv.org/abs/2601.19611)) — Explicit Multi-head
85
+ Attention. Adds small learnable interaction matrices between attention heads for K and V.
86
+ - **LUCID** ([arXiv:2602.10410](https://arxiv.org/abs/2602.10410)) — Applies a learned
87
+ lower-triangular preconditioner to V before attention, decorrelating value representations
88
+ across positions.
89
+ - **Affine-Scaled Attention** ([arXiv:2602.23057](https://arxiv.org/abs/2602.23057)) — Adds
90
+ two learnable per-head scalars (α and β) to the softmax weights:
91
+ `[α·softmax(QKᵀ) + β]·V`.
92
+ - **XSA** ([arXiv:2603.09078](https://arxiv.org/abs/2603.09078)) — Exclusive Self Attention.
93
+ After computing attention, removes the component of the output aligned with the token's
94
+ own value vector.
95
+ - **Directional Routing** ([arXiv:2603.14923](https://arxiv.org/abs/2603.14923)) — Each head
96
+ learns K=4 directions in the output space; a learned router suppresses the attention output
97
+ along each direction per input.
98
+ - **Gated Attention** ([arXiv:2505.06708](https://arxiv.org/abs/2505.06708)) — A sigmoid gate
99
+ is applied to the attention output before the output projection, introducing non-linearity
100
+ and preventing attention sinks.
101
+ - **Momentum Attention** ([arXiv:2411.03884](https://arxiv.org/abs/2411.03884)) — Modifies Q
102
+ and K by subtracting a fraction of the previous position's Q and K values (causal
103
+ first-difference).
104
+ - **Interleaved Head Attention / IHA** ([arXiv:2602.21371](https://arxiv.org/abs/2602.21371)) —
105
+ Builds pseudo-heads from learned cross-head mixtures to create multiple attention patterns
106
+ per original head.
107
+ - **REPO** ([arXiv:2512.14391](https://arxiv.org/abs/2512.14391)) — Context re-positioning
108
+ module that learns contextual position coordinates above a configurable start layer.
109
+ - **GRAPE** ([arXiv:2512.07805](https://arxiv.org/abs/2512.07805)) — Group representational
110
+ position encoding used by the REPO-GRAPE positional path.
111
+ - **GOAT priors** ([arXiv:2601.15380](https://arxiv.org/abs/2601.15380)) — Optional
112
+ factorized attention log-prior channels inspired by trainable attention priors.
113
+ - **Hadamard output projection** ([arXiv:2603.08343](https://arxiv.org/abs/2603.08343)) —
114
+ Replaces dense attention output projection with a structured Hadamard transform plus
115
+ lightweight scaling.
116
 
117
+ **Normalization, residual flow, and MLP**
118
 
119
+ - **SeeDNorm** ([arXiv:2510.22777](https://arxiv.org/abs/2510.22777)) — Applied to Q and K
120
+ projections. Dynamically rescales normalization from the input's own statistics.
121
+ - **LayerNorm Scaling / LNS** ([arXiv:2502.05795](https://arxiv.org/abs/2502.05795)) — Each
122
+ layer's output is scaled by 1/√ℓ where ℓ is the layer index.
123
+ - **GPAS** ([arXiv:2506.22049](https://arxiv.org/abs/2506.22049)) — Gradient-Preserving
124
+ Activation Scaling for residual junctions.
125
+ - **PolyNorm** ([arXiv:2602.04902](https://arxiv.org/abs/2602.04902)) — Replaces the standard
126
+ MLP activation with normalized linear, quadratic, and cubic branches.
127
+ - **SimpleGPT** ([arXiv:2602.01212](https://arxiv.org/abs/2602.01212)) — Second-order
128
+ geometry-inspired normalization strategy applied inside MLP projections.
129
+ - **StackMemory / STACKTRANS** ([NeurIPS 2025](https://openreview.net/forum?id=2bbDg587uh)) —
130
+ Optional differentiable hidden-state stack between decoder layers.
131
+ - **Attention Residuals / AttnRes** ([arXiv:2603.15031](https://arxiv.org/abs/2603.15031)) —
132
+ Optional learned depth-wise aggregation over previous layer outputs or block summaries.
133
+ - **LAUREL** ([arXiv:2411.07501](https://arxiv.org/abs/2411.07501)) — Optional learned
134
+ augmented residual layer with residual-weight and low-rank variants.
135
 
136
+ **Training objectives and training-time regularizers**
137
 
138
+ - **TWEO** ([arXiv:2511.23225](https://arxiv.org/abs/2511.23225)) — Optional
139
+ Transformers Without Extreme Outliers activation regularizer for FP8/low-bit-friendly
140
+ training.
141
+ - **NITP** ([arXiv:2605.24956](https://arxiv.org/abs/2605.24956)) — Optional Next Implicit
142
+ Token Prediction auxiliary objective using shallow-layer implicit token targets and a
143
+ cosine loss.
144
+ - **NextLat** ([arXiv:2511.05963](https://arxiv.org/abs/2511.05963)) — Optional next-latent
145
+ prediction objective using latent dynamics, Smooth L1 supervision, and frozen-head KL.
146
 
147
+ **Optimizer and training stability**
148
+
149
+ - **Conda** ([arXiv:2509.24218](https://arxiv.org/abs/2509.24218)) —
150
+ Column-Normalized Adam optimizer path used by the training script.
151
+ - **Cautious Weight Decay** ([arXiv:2510.12402](https://arxiv.org/abs/2510.12402)) —
152
+ Sign-selective weight decay variant used by the custom optimizer logic.
153
+ - **Correction of Decoupled Weight Decay** ([arXiv:2512.08217](https://arxiv.org/abs/2512.08217)) —
154
+ Adapts decoupled weight decay during learning-rate decay.
155
+ - **AdamHD** ([arXiv:2511.14721](https://arxiv.org/abs/2511.14721)) —
156
+ Decoupled Huber decay regularization reference used by the optimizer.
157
+ - **GradientStabilizer** ([arXiv:2502.17055](https://arxiv.org/abs/2502.17055)) —
158
+ Optional threshold-free gradient magnitude stabilizer.
159
+
160
+ ---
161
+
162
+ ## Training
163
+
164
+ | Setting | Value |
165
+ |---|---|
166
+ | Dataset | FineWeb-Edu (sample-10BT) |
167
+ | Tokens seen | ~0.51B (15,625 steps × batch 64 × length 512) |
168
+ | Precision | FP8 native (E4M3 weights/activations, E5M2 gradients) + BF16 fallback |
169
+ | Optimizer | Conda (Column-Normalized Adam) |
170
+ | Learning rate | 6e-04 with linear warmup (10 % of steps) |
171
+ | Weight decay | 0.1 |
172
+ | Training time | ~1h 27m |
173
+ | Hardware | NVIDIA RTX 5090 (single GPU) |
174
+
175
+ ### Training curve
176
+
177
+ | Step | Train Loss | Val Loss |
178
+ |---|---|---|
179
+ | 5,000 | 4.263 | 4.208 |
180
+ | 10,000 | 3.863 | 3.831 |
181
+ | 15,000 | 3.682 | 3.642 |
182
+ | 15,625 | — | 3.628 |
183
+
184
+ ---
185
+
186
+ ## Limitations
187
+
188
+ - **Token budget** — ~1.5 B tokens seen; below estimated optimum. Knowledge-intensive tasks
189
+ will improve with more training.
190
+ - **Gradient spike at step 40k** — Reorganized the attention pattern in layer 9 that
191
+ previously captured long-range token correlations. A checkpoint from ~step 38k is expected
192
+ to have better aggregate benchmark scores.
193
+ - **PolyNorm exclusivity** — The quadratic branch has become partially redundant with the
194
+ linear branch. Will be corrected in the next training run.
195
+ - **Base model only** — Not instruction-tuned or aligned; purely a next-token-prediction
196
+ base model.
197
+
198
+ ---
199
+
200
+ ## References
201
+
202
+ All papers whose techniques are integrated into NeoLLM's architecture,
203
+ training objective, or training stack:
204
+
205
+ | Area | Technique | Paper title | Reference |
206
+ |---|---|---|---|
207
+ | Embeddings | Learnable Multipliers | Freeing the Scale of Language Model Matrix Layers | [arXiv:2601.04890](https://arxiv.org/abs/2601.04890) |
208
+ | Embeddings | Leviathan | A Separable Architecture for Continuous Token Representation in Language Models | [arXiv:2601.22040](https://arxiv.org/abs/2601.22040) |
209
+ | Embeddings | KHRONOS | KHRONOS: a Kernel-Based Neural Architecture for Rapid, Resource-Efficient Scientific Computation | [arXiv:2505.13315](https://arxiv.org/abs/2505.13315) |
210
+ | Embeddings | JTok / JTok-M | JTok: On Token Embedding as Another Axis of Scaling Law via Joint Token Self-Modulation | [arXiv:2602.00800](https://arxiv.org/abs/2602.00800) |
211
+ | Embeddings | Spelling Bee | Spelling Bee Embeddings for Language Modeling | [arXiv:2601.18030](https://arxiv.org/abs/2601.18030) |
212
+ | Embeddings | Token embedding analysis | Token Embeddings Violate the Manifold Hypothesis | [arXiv:2504.01002](https://arxiv.org/abs/2504.01002) |
213
+ | Attention / positions | FAN | Fourier Analysis Networks | [arXiv:2502.21309](https://arxiv.org/abs/2502.21309) |
214
+ | Attention / positions | MEA | Explicit Multi-head Attention for Inter-head Interaction in Large Language Models | [arXiv:2601.19611](https://arxiv.org/abs/2601.19611) |
215
+ | Attention / positions | LUCID | Attention with Preconditioned Representations | [arXiv:2602.10410](https://arxiv.org/abs/2602.10410) |
216
+ | Attention / positions | Affine-Scaled Attention | Affine-Scaled Attention: Towards Flexible and Stable Transformer Attention | [arXiv:2602.23057](https://arxiv.org/abs/2602.23057) |
217
+ | Attention / positions | XSA | Exclusive Self Attention | [arXiv:2603.09078](https://arxiv.org/abs/2603.09078) |
218
+ | Attention / positions | Directional Routing | Directional Routing in Transformers | [arXiv:2603.14923](https://arxiv.org/abs/2603.14923) |
219
+ | Attention / positions | Gated Attention | Gated Attention for Large Language Models: Non-linearity, Sparsity, and Attention-Sink-Free | [arXiv:2505.06708](https://arxiv.org/abs/2505.06708) |
220
+ | Attention / positions | Momentum Attention | Momentum Attention | [arXiv:2411.03884](https://arxiv.org/abs/2411.03884) |
221
+ | Attention / positions | IHA | Interleaved Head Attention | [arXiv:2602.21371](https://arxiv.org/abs/2602.21371) |
222
+ | Attention / positions | REPO | Language Models with Context Re-Positioning | [arXiv:2512.14391](https://arxiv.org/abs/2512.14391) |
223
+ | Attention / positions | GRAPE | Group Representational Position Encoding | [arXiv:2512.07805](https://arxiv.org/abs/2512.07805) |
224
+ | Attention / positions | GOAT priors | You Need Better Attention Priors | [arXiv:2601.15380](https://arxiv.org/abs/2601.15380) |
225
+ | Attention / positions | Hadamard o_proj | Rethinking Attention Output Projection: Structured Hadamard Transforms for Efficient Transformers | [arXiv:2603.08343](https://arxiv.org/abs/2603.08343) |
226
+ | Residual / normalization | SeeDNorm | Self-Rescaled Dynamic Normalization | [arXiv:2510.22777](https://arxiv.org/abs/2510.22777) |
227
+ | Residual / normalization | LNS | The Curse of Depth in LLMs | [arXiv:2502.05795](https://arxiv.org/abs/2502.05795) |
228
+ | Residual / normalization | GPAS | Gradient-Preserving Activation Scaling | [arXiv:2506.22049](https://arxiv.org/abs/2506.22049) |
229
+ | Residual / normalization | PolyNorm | PolyNorm / PolyCom | [arXiv:2602.04902](https://arxiv.org/abs/2602.04902) |
230
+ | Residual / normalization | SimpleGPT | SimpleGPT | [arXiv:2602.01212](https://arxiv.org/abs/2602.01212) |
231
+ | Residual / normalization | StackMemory / STACKTRANS | Recursive Transformer: Boosting Reasoning Ability with State Stack | [NeurIPS 2025](https://openreview.net/forum?id=2bbDg587uh) |
232
+ | Residual / normalization | Attention Residuals | Attention Residuals | [arXiv:2603.15031](https://arxiv.org/abs/2603.15031) |
233
+ | Residual / normalization | LAUREL | LAUREL: Learned Augmented Residual Layer | [arXiv:2411.07501](https://arxiv.org/abs/2411.07501) |
234
+ | Objectives | TWEO | Transformers Without Extreme Outliers Enables FP8 Training And Quantization For Dummies | [arXiv:2511.23225](https://arxiv.org/abs/2511.23225) |
235
+ | Objectives | NITP | Next Implicit Token Prediction for LLM Pre-training | [arXiv:2605.24956](https://arxiv.org/abs/2605.24956) |
236
+ | Objectives | NextLat | Next-Latent Prediction Transformers Learn Compact World Models | [arXiv:2511.05963](https://arxiv.org/abs/2511.05963) |
237
+ | Optimizer / training | Conda | Column-Normalized Adam for Training Large Language Models Faster | [arXiv:2509.24218](https://arxiv.org/abs/2509.24218) |
238
+ | Optimizer / training | CWD | Cautious Weight Decay | [arXiv:2510.12402](https://arxiv.org/abs/2510.12402) |
239
+ | Optimizer / training | WD correction | Correction of Decoupled Weight Decay | [arXiv:2512.08217](https://arxiv.org/abs/2512.08217) |
240
+ | Optimizer / training | AdamHD | AdamHD: Decoupled Huber Decay Regularization for Language Model Pre-Training | [arXiv:2511.14721](https://arxiv.org/abs/2511.14721) |
241
+ | Optimizer / training | GradientStabilizer | GradientStabilizer | [arXiv:2502.17055](https://arxiv.org/abs/2502.17055) |
242
+
243
+ ---
244
+
245
+ ## Citation
246
+
247
+ ```bibtex
248
+ @misc{neollm2026,
249
+ title = {NeoLLM: A Research Language Model Integrating Recent Attention and Normalization Techniques},
250
+ author = {KitsuVp},
251
+ year = {2026},
252
+ url = {https://huggingface.co/KitsuVp/NeoLLM}
253
+ }
254
+ ```
255
+
256
+ ---
257
+
258
+ ## Author
259
+
260
+ [@Kyokopom](https://x.com/Kyokopom) on X
261
+
262
+ ---
263
 
264
+ ## License
265
 
266
+ Apache 2.0