OutrageouslyBad200 commited on
Commit
1c679c0
·
verified ·
1 Parent(s): 5e6a2f0

Upload 91 files

Browse files
This view is limited to 50 files because it contains too many changes.   See raw diff
Files changed (50) hide show
  1. .gitattributes +1 -0
  2. Forpaper.txt +424 -0
  3. HUGGINGFACE_README.md +159 -0
  4. all_results.csv +25 -0
  5. baseline_s0/config.json +21 -0
  6. baseline_s0/final.pt +3 -0
  7. baseline_s0/metrics.jsonl +0 -0
  8. baseline_s1/config.json +21 -0
  9. baseline_s1/final.pt +3 -0
  10. baseline_s1/metrics.jsonl +0 -0
  11. baseline_s2/config.json +21 -0
  12. baseline_s2/final.pt +3 -0
  13. baseline_s2/metrics.jsonl +0 -0
  14. baseline_s3/config.json +21 -0
  15. baseline_s3/final.pt +3 -0
  16. baseline_s3/metrics.jsonl +0 -0
  17. baseline_s4/config.json +21 -0
  18. baseline_s4/final.pt +3 -0
  19. baseline_s4/metrics.jsonl +0 -0
  20. figures_4ksteps/ablation_results.csv +5 -0
  21. figures_4ksteps/ablation_table.png +0 -0
  22. figures_4ksteps/gate_activity.png +0 -0
  23. figures_4ksteps/lambda_trajectory.png +0 -0
  24. figures_4ksteps/loss_curves.png +0 -0
  25. figures_seed0/ablation_results.csv +5 -0
  26. figures_seed0/ablation_table.png +0 -0
  27. figures_seed0/gate_activity.png +0 -0
  28. figures_seed0/lambda_per_layer.png +3 -0
  29. figures_seed0/lambda_trajectory.png +0 -0
  30. figures_seed0/loss_curves.png +0 -0
  31. full_s0/config.json +21 -0
  32. full_s0/final.pt +3 -0
  33. full_s0/metrics.jsonl +0 -0
  34. full_s1/config.json +21 -0
  35. full_s1/final.pt +3 -0
  36. full_s1/metrics.jsonl +0 -0
  37. full_s2/config.json +21 -0
  38. full_s2/final.pt +3 -0
  39. full_s2/metrics.jsonl +0 -0
  40. full_s3/config.json +21 -0
  41. full_s3/final.pt +3 -0
  42. full_s3/metrics.jsonl +0 -0
  43. full_s4/config.json +21 -0
  44. full_s4/final.pt +3 -0
  45. full_s4/metrics.jsonl +0 -0
  46. g_only_s0/config.json +21 -0
  47. g_only_s0/final.pt +3 -0
  48. g_only_s0/metrics.jsonl +0 -0
  49. g_only_s1/config.json +21 -0
  50. g_only_s1/final.pt +3 -0
.gitattributes CHANGED
@@ -33,3 +33,4 @@ saved_model/**/* filter=lfs diff=lfs merge=lfs -text
33
  *.zip filter=lfs diff=lfs merge=lfs -text
34
  *.zst filter=lfs diff=lfs merge=lfs -text
35
  *tfevents* filter=lfs diff=lfs merge=lfs -text
 
 
33
  *.zip filter=lfs diff=lfs merge=lfs -text
34
  *.zst filter=lfs diff=lfs merge=lfs -text
35
  *tfevents* filter=lfs diff=lfs merge=lfs -text
36
+ figures_seed0/lambda_per_layer.png filter=lfs diff=lfs merge=lfs -text
Forpaper.txt ADDED
@@ -0,0 +1,424 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ================================================================================
2
+ SMAT (Semantic Attention) - Findings Summary for Paper
3
+ ================================================================================
4
+ Compiled: 2026-06-03
5
+ Source files used (all in this repo, all re-verified for this document):
6
+ runs/{baseline,s_only,g_only,full}_s{0..4}/metrics.jsonl (20 training runs)
7
+ runs_4ksteps/{baseline,s_only,g_only,full}_s0/metrics.jsonl (4 partial runs)
8
+ figures_final/ablation_inference.json (surgical ablations)
9
+ figures_final/ablation_results.csv (final eval table)
10
+
11
+ Every number in sections 2-6 below was recomputed directly from the raw
12
+ metrics.jsonl files (not copied from any pre-existing CSV or README). The
13
+ per-seed deltas, means, std devs, and lambda/G statistics were all
14
+ re-derived from scratch and cross-checked twice.
15
+
16
+ The cross-scale results in section 7 are from prior experiments outside
17
+ this repo; they are cited as such and were not re-verified from raw data
18
+ here. Treat them as historical context, not as primary evidence.
19
+
20
+
21
+ ================================================================================
22
+ 1. WHAT SMAT IS (one paragraph)
23
+ ================================================================================
24
+ SMAT modifies standard transformer attention with two additions: (1) a
25
+ learnable semantic-similarity bias S added to the QK^T logits, scaled by a
26
+ per-layer positive scalar lambda; and (2) a per-token value gate G that
27
+ multiplies V before attention aggregation. The gate is also influenced by
28
+ a causal semantic-centrality term c derived from S. Equation:
29
+
30
+ Attn(Q,K,V) = softmax( QK^T / sqrt(d_k) + lambda * S + P + M ) . (G (*) V)
31
+
32
+ where
33
+ S_ij = cos(W_s h_i, W_s h_j) shared-projection cosine similarity
34
+ c_j = (1/n) sum_{l<=j} S_jl causal semantic centrality
35
+ G_j = sigmoid(w_g^T h_j + mu*c_j + b) per-token value gate
36
+ lambda = softplus(lambda_raw) constrained positive, per layer
37
+ P learnable [L,L] positional bias
38
+ M causal mask
39
+
40
+ W_s is shared across heads within a layer. G is per-token and broadcast
41
+ across head channels. Four variants were trained:
42
+ baseline use_S = False, use_G = False (standard attention)
43
+ s_only use_S = True, use_G = False (lambda*S only)
44
+ g_only use_S = False, use_G = True (gate only)
45
+ full use_S = True, use_G = True (both components)
46
+
47
+
48
+ ================================================================================
49
+ 2. TRAINING SETUP (the 5-seed ablation)
50
+ ================================================================================
51
+ Architecture: 24 layers, 384 dim, 6 heads, block size 256, vocab 50257
52
+ Parameters: 63,376,512 (~64M) per variant
53
+ Optimizer: Fused AdamW, lr 6e-4, 200-step linear warmup, cosine to 6e-5
54
+ Batch: 16, grad_accum 2 -> effective batch 32
55
+ Tokens per step: 16 * 2 * 256 = 8,192
56
+ Total steps: 12,000 -> 98,304,000 tokens per run (~98M)
57
+ Eval: every 500 steps on 40 val batches (val_ppl = exp(val_loss))
58
+ Precision: bf16 autocast, TF32, cudnn.benchmark, SDPA attention path
59
+ Hardware: single RTX 4060 (vram ~6 GB during training)
60
+ Corpus: FineWeb-Edu sample-10BT, GPT-2 tokenization
61
+ Seeds: {0, 1, 2, 3, 4} for each of the four variants -> 20 runs total
62
+
63
+ Every variant uses an IDENTICAL data stream for the same seed (data_seed=1337
64
+ plus run seed); this is what makes the per-seed comparison meaningful.
65
+
66
+
67
+ ================================================================================
68
+ 3. PRIMARY RESULT - 5-SEED ABLATION TABLE
69
+ ================================================================================
70
+ Final val perplexity at step 11999 (98M tokens seen), per variant per seed:
71
+
72
+ seed baseline s_only g_only full
73
+ ---- --------- ---------------- ---------------- ----------------
74
+ 0 78.3244 78.7377 (+0.53%) 78.2175 (-0.14%) 77.8634 (-0.59%)
75
+ 1 80.9320 80.8649 (-0.08%) 80.5771 (-0.44%) 80.0262 (-1.12%)
76
+ 2 82.3365 82.0735 (-0.32%) 81.3363 (-1.21%) 81.2602 (-1.31%)
77
+ 3 79.3884 77.9830 (-1.77%) 77.9834 (-1.77%) 77.7016 (-2.12%)
78
+ 4 77.7449 77.6807 (-0.08%) 77.0092 (-0.95%) 76.3953 (-1.74%)
79
+
80
+ Per-seed deltas are computed as (variant_ppl - baseline_ppl) / baseline_ppl
81
+ within the same seed, NOT against the baseline mean.
82
+
83
+ Aggregate (mean across 5 seeds; std is population std):
84
+
85
+ variant n mean_ppl std delta_mean seed wins vs baseline
86
+ -------- -- --------- ------- ------------ -----------------------
87
+ Baseline 5 79.7452 1.6894 - -
88
+ S-only 5 79.4680 1.7131 -0.348% 4 / 5
89
+ G-only 5 79.0247 1.6463 -0.904% 5 / 5
90
+ Full SMAT 5 78.6493 1.7498 -1.374% 5 / 5
91
+
92
+ Key observations:
93
+ - Full SMAT beats baseline on EVERY seed (5/5).
94
+ - The two components are additive in direction: S contributes ~0.35%,
95
+ G contributes ~0.90%, and Full SMAT (both together) gives ~1.37%.
96
+ S + G individually sum to ~1.25%, slightly less than full's 1.37%;
97
+ the components are mostly additive, with a small interaction in their
98
+ favor.
99
+ - Variance ACROSS seeds (std ~1.7 ppl) is larger than the mean effect
100
+ (~1.1 ppl). The signal is real but small relative to seed noise; it
101
+ only becomes clear because every variant uses the SAME data stream per
102
+ seed, so the within-seed comparison cancels almost all of that noise.
103
+ - The smallest within-seed gain for Full SMAT is -0.59% (seed 0);
104
+ the largest is -2.12% (seed 3). Direction is consistent; magnitude
105
+ varies by roughly a factor of 4 across seeds.
106
+
107
+
108
+ ================================================================================
109
+ 4. DIAGNOSTICS (training dynamics)
110
+ ================================================================================
111
+ 4.1 Lambda (semantic-bias scale, per-layer, softplus-positive)
112
+ Init value (all layers, all seeds): 0.1269 ( = softplus(lambda_raw_init) )
113
+ End-of-training mean lambda (averaged across 24 layers), per seed:
114
+ Full SMAT: s0 0.3069 s1 0.3075 s2 0.3031 s3 0.2954 s4 0.3176
115
+ -> mean across seeds ~ 0.306
116
+ S-only: s0 0.3140 s1 0.3188 s2 0.3221 s3 0.3183 s4 0.3261
117
+ -> mean across seeds ~ 0.320
118
+
119
+ Per-layer pattern (Full SMAT seed 0 final checkpoint, 24 layers):
120
+ layers 0-2: lambda ~ 0.14 - 0.18 (slightly below init)
121
+ layers 3-8: lambda ~ 0.08 - 0.16 (DECREASES below init)
122
+ layers 9-17: lambda ~ 0.32 - 0.68 (climbs sharply)
123
+ layers 18-23: lambda ~ 0.18 - 0.58 (settles, still elevated)
124
+ global min: 0.0834 (layer 5)
125
+ global max: 0.6821 (layer 16)
126
+
127
+ Across all 10 SMAT-bearing runs (s_only + full, 5 seeds each),
128
+ the observed per-layer lambda range was [0.059, 0.715]. The shape -
129
+ suppressed in early layers, dominant in middle layers - is robust
130
+ across all 5 seeds.
131
+
132
+ 4.2 Gate G (per-token, sigmoid output, averaged over tokens for logging)
133
+ Initial G_mean per run is around 0.5 (sigmoid initialized near zero
134
+ pre-activation). Across training G_mean rises briefly toward ~0.58
135
+ in the first ~1000 steps, then decays.
136
+ Final G_mean at step 11999 (Full SMAT): s0 0.3506, s1 0.3333,
137
+ s2 0.3306, s3 0.3447, s4 0.3397 -> mean ~ 0.340
138
+ Final G_mean (G-only): s0 0.3484, s1 0.3359,
139
+ s2 0.3676, s3 0.3625, s4 0.3563 -> mean ~ 0.354
140
+ G_std (across tokens) at end of training is ~ 0.16, meaning the gate
141
+ is NOT collapsed: many tokens have G well above the mean, many have it
142
+ well below. Per-token differentiation is preserved.
143
+
144
+ 4.3 Stability
145
+ NaN failures across all 20 runs at 12k steps each (= 240,000 optimizer
146
+ steps total): ZERO.
147
+ No NaN-driven step skips were recorded in any run. Training is
148
+ numerically clean under bf16 + TF32 + fused AdamW on this hardware.
149
+
150
+ 4.4 Wall-clock cost
151
+ Baseline runs: ~4000 - 5300 sec per run (~ 1.1 - 1.5 hours)
152
+ S-only runs: ~4700 - 6100 sec
153
+ G-only runs: ~4300 - 5700 sec
154
+ Full runs: ~5400 - 6600 sec (~ 1.5 - 1.8 hours)
155
+ Cost overhead of Full SMAT vs baseline: roughly +20 to +35% wall time
156
+ at this size on a 4060. (Variation within each variant is hardware/
157
+ thermal noise across the days the runs were executed.)
158
+
159
+
160
+ ================================================================================
161
+ 5. INFERENCE-TIME SURGICAL ABLATIONS
162
+ ================================================================================
163
+ Performed on the Full SMAT seed-0 final checkpoint (no retraining; the
164
+ trained weights are loaded, individual components are zeroed/replaced
165
+ during a forward pass, and val ppl is re-measured on 80 val batches).
166
+ Source: figures_final/ablation_inference.json
167
+
168
+ Intact Full SMAT (this measurement, 80 batches): val ppl = 79.010
169
+ (The 40-batch eval at the end of training reported 77.863; the 80-batch
170
+ slice used for the ablation is a different val subset, hence the small
171
+ difference. What matters is the delta within this measurement context.)
172
+
173
+ ablation val_ppl delta vs intact what was changed
174
+ ------------ ----------- ----------------- ------------------------
175
+ lambda_zero 79.40 +0.49% lambda set to 0 in the
176
+ attention bias only;
177
+ S still flows through
178
+ mu*c into the gate.
179
+ S_off 80.48 +1.85% S removed completely:
180
+ no lambda*S in attention
181
+ AND no mu*c in the gate.
182
+ random_S 81.22 +2.80% S replaced by a random
183
+ matrix with the same
184
+ Frobenius norm. Tests
185
+ whether S's STRUCTURE
186
+ matters, or just its norm.
187
+ G_one 625,850 +792,016% G forced to constant 1.0
188
+ (gate disabled).
189
+ G_mean 196.99 +149.32% G replaced by its scalar
190
+ mean over tokens (per-
191
+ token differentiation
192
+ removed; mean value kept).
193
+
194
+ Decomposition of S's contribution:
195
+ Total S contribution (S_off vs intact): 1.85%
196
+ Contribution via lambda*S in attention: 0.49% -> 26% of S's lift
197
+ Contribution via mu*c in the gate: 1.36% -> 74% of S's lift
198
+ Most of S's value is being read through the gate's centrality term,
199
+ NOT through the additive logit bias.
200
+
201
+ Per-layer lambda=0 ablations (24 separate ablations, zeroing lambda in
202
+ one layer at a time):
203
+ Maximum single-layer cost: +0.0580% (layer 14)
204
+ Sum of all 24 per-layer deltas: +0.219%
205
+ This is far less than the +0.49% you get from zeroing lambda in every
206
+ layer at once. Interpretation: the lambda*S contribution is REDUNDANT
207
+ across layers - no single layer is load-bearing. The benefit is small
208
+ and distributed.
209
+
210
+ Structural vs scalar test:
211
+ random_S (+2.80%) hurts MORE than S_off (+1.85%). Replacing S with a
212
+ same-norm random matrix is worse than removing it entirely. This means
213
+ the model is using S's learned STRUCTURE, not just the presence of an
214
+ extra signal of a given magnitude. A random matrix with the right
215
+ energy actively damages the model; trained S is genuinely informative.
216
+
217
+ Gate criticality:
218
+ G=1.0 collapses the model entirely (val ppl > 600,000). The gate is not
219
+ a small modulation - the trained network depends on it as a primary
220
+ routing mechanism.
221
+ G=mean costs +149%. Replacing per-token gating with a single scalar mean
222
+ destroys most of the gate's value. The gate's worth is in WHICH tokens
223
+ it suppresses or amplifies, not in its average level.
224
+
225
+
226
+ ================================================================================
227
+ 6. PARTIAL 4K-STEP RUN (1 seed, 32M tokens) - CONTEXT ONLY
228
+ ================================================================================
229
+ A shorter run at 4,000 steps (32,768,000 tokens) was performed for ONE
230
+ seed before the full 12k-step ablation was launched. It is not directly
231
+ comparable to the 5-seed result above (different budget, no seed
232
+ variance), but it shows the same direction and a larger relative gap
233
+ because perplexity is higher overall at lower training budgets.
234
+
235
+ variant val_ppl delta vs baseline
236
+ --------- --------- ------------------
237
+ baseline 148.4449 -
238
+ s_only 147.8903 -0.37%
239
+ g_only 144.9733 -2.34%
240
+ full 141.5651 -4.63%
241
+
242
+ This is consistent with the broader pattern: at smaller training budgets
243
+ (or smaller scales), the relative effect of SMAT is larger. As training
244
+ proceeds and the baseline gets closer to its asymptote, the absolute
245
+ ppl gap and the relative gap both shrink. The 12k-step 5-seed result
246
+ (section 3) is the rigorous number; the 4k-step result is a directional
247
+ sanity check.
248
+
249
+ DO NOT cite the 4k-step delta as if it were comparable to the 12k-step
250
+ delta. The user has already flagged this as a "partial run, not directly
251
+ comparable" in the repo README.
252
+
253
+
254
+ ================================================================================
255
+ 7. CROSS-SCALE CONTEXT (PRIOR EXPERIMENTS, NOT FROM THIS REPO)
256
+ ================================================================================
257
+ The following are described in this repo's README as prior experiments
258
+ done before this codebase. They are NOT re-verified from raw data here
259
+ and should be cited as historical context, not as primary evidence of
260
+ this paper's findings. If the paper depends on them, the underlying logs
261
+ should be located and re-verified before they appear in any final claim.
262
+
263
+ scale corpus tokens delta seeds note
264
+ ----- ------------------- -------- ------- ----- -------------------
265
+ 7M Shakespeare short mixed 1 directional crossover
266
+ around step 150
267
+ 100M FineWeb (smoke) short -7% 1 100-step smoke run
268
+ 100M FineWeb 100M -11% 3 of 3 strongest replicated
269
+ 100M FineMath 100M -17% 3 of 3 strongest result
270
+ 68M FineWeb (SMAT+A90) 20M -22.5% 1 SMAT combined with
271
+ BlockAttnRes; out
272
+ of scope for V1.
273
+ 64M FineWeb (THIS REPO) 98M -1.37% 5 of 5 primary result
274
+
275
+ The pattern across these (taking them at face value): direction is
276
+ preserved across every scale, every corpus, every seed where data
277
+ exists. Magnitude shrinks as the scale and training budget grow, with
278
+ the exception of the 100M experiments where the gap is largest.
279
+
280
+ If the paper's headline number is from the 100M FineWeb or FineMath
281
+ experiments, the V1 evidence is the 5-seed run in section 3 of THIS
282
+ document plus those prior experiments. The 5-seed result is the
283
+ hardest-to-dispute piece because every variant trained on identical
284
+ data and direction is consistent across 5/5 seeds.
285
+
286
+
287
+ ================================================================================
288
+ 8. WHAT'S LOAD-BEARING vs WHAT IS NOT
289
+ ================================================================================
290
+ Load-bearing (do not remove):
291
+ - The gate G. Catastrophic if removed (+792,016%) and badly degraded
292
+ if reduced to its mean (+149%). The gate is the single most important
293
+ component SMAT adds.
294
+ - The structure of S (not just its norm). random_S hurts more than
295
+ S_off, so the learned S projection contains real information.
296
+ - The mu*c centrality channel from S into the gate. This accounts for
297
+ ~74% of S's total contribution. If S is used at all, it should be
298
+ used HERE.
299
+
300
+ Not load-bearing in any individual layer (and largely redundant overall):
301
+ - The per-layer lambda*S term in the attention bias. Removing it in
302
+ one layer costs at most 0.06% ppl. Removing it in all layers costs
303
+ only 0.49%. The benefit exists but it is small and distributed; no
304
+ single layer's lambda is critical, and a uniform lambda across
305
+ layers is the wrong abstraction (early layers actively prefer it
306
+ near zero, middle layers want it near 0.5-0.7).
307
+
308
+ Net implication for V2 (this is what the data argues for):
309
+ - Drop the per-layer lambda_raw parameters and the lambda*S term in
310
+ attention. Keep S's projection W_s and keep mu*c flowing into the
311
+ gate. You retain ~74% of S's lift while removing 24 scalar
312
+ parameters and one matrix add per layer.
313
+ - If you want lambda to stay, replace per-layer lambda with a
314
+ per-layer gate-mix scalar driven by the same per-layer pattern
315
+ observed here (suppressed in early layers, elevated in middle
316
+ layers).
317
+
318
+
319
+ ================================================================================
320
+ 9. CAVEATS, LIMITATIONS, THINGS NOT TO OVERCLAIM
321
+ ================================================================================
322
+ - The headline -1.37% at 64M / 98M tokens is real (5/5 seeds, identical
323
+ per-seed data streams; one-sided sign test gives p = 1/32 = 0.03125
324
+ under the null hypothesis of no effect), but it is SMALL in absolute
325
+ terms (about 1.1 perplexity points). The within-seed effect is what
326
+ makes it visible; do not present mean +/- std as if seed noise were
327
+ the only consideration.
328
+ - Std across seeds (1.65 - 1.75) is larger than the mean effect.
329
+ Always quote the WITHIN-SEED comparison or the SIGN TEST when making
330
+ the case, not just delta-of-means with overlapping error bars.
331
+ - The surgical ablation results in section 5 are from ONE checkpoint
332
+ (Full SMAT seed 0). The qualitative conclusions (G is critical, S
333
+ routes through mu*c, layer-wise lambda is redundant) are stark
334
+ enough that one checkpoint is informative, but it would be more
335
+ defensible to repeat on at least one more seed before publication.
336
+ - The cross-scale numbers in section 7 are not verified from raw data
337
+ in this repo. Do not put them in a results table without separately
338
+ locating and confirming the underlying logs.
339
+ - All training was on a single RTX 4060 with bf16 + TF32. Numbers may
340
+ shift slightly on different hardware; the direction should not.
341
+ - Tokenizer is GPT-2 byte-pair. Corpus is FineWeb-Edu sample-10BT.
342
+ Results on other corpora (FineMath in particular, see section 7)
343
+ may differ in magnitude.
344
+
345
+
346
+ ================================================================================
347
+ 10. SUGGESTED PAPER CLAIMS (ordered by strength of evidence in this repo)
348
+ ================================================================================
349
+ STRONG (directly supported by 20-run ablation, this repo, this document):
350
+ 1. Adding a per-token value gate to attention reduces val ppl by
351
+ ~0.9% on FineWeb at 64M params, 5/5 seeds.
352
+ 2. Adding both the semantic-similarity bias AND the gate reduces
353
+ val ppl by ~1.4% on FineWeb at 64M params, 5/5 seeds.
354
+ 3. Training is numerically stable (0 NaN failures over 240,000
355
+ optimizer steps across 20 runs).
356
+ 4. lambda exhibits a robust per-layer pattern: suppressed in early
357
+ layers, elevated in middle layers, settled in late layers.
358
+ This pattern is consistent across all 5 seeds.
359
+
360
+ STRONG (supported by surgical-ablation evidence, single checkpoint):
361
+ 5. S's contribution flows ~74% through the gate's centrality term
362
+ and only ~26% through the additive logit bias.
363
+ 6. The trained S has learned STRUCTURE; replacing it with a random
364
+ matrix of equal norm hurts more than removing it entirely.
365
+ 7. The per-token gate is catastrophic to remove and very expensive
366
+ to replace with a mean. Per-token differentiation matters.
367
+
368
+ WEAKER (need cross-scale / cross-seed re-verification before paper):
369
+ 8. SMAT's relative effect is larger at smaller training budgets and
370
+ at certain corpora (FineMath in particular).
371
+ 9. SMAT directionality is preserved across scales 7M to 100M.
372
+
373
+ DO NOT CLAIM without further work:
374
+ - That SMAT is a uniformly large improvement (it is not at this scale).
375
+ - That SMAT helps at scales beyond 100M (no data yet).
376
+ - That per-layer lambda is essential (the surgical ablation shows it
377
+ is largely redundant).
378
+
379
+
380
+ ================================================================================
381
+ 11. RAW NUMBERS (machine-readable, for any tables in the paper)
382
+ ================================================================================
383
+ 12k-step 5-seed ablation, final val ppl:
384
+
385
+ baseline = [78.32438343443285, 80.93203870134798, 82.33645607970243,
386
+ 79.38843805716219, 77.74486565469935]
387
+ s_only = [78.73771250646860, 80.86492907631813, 82.07353893301419,
388
+ 77.98296438017636, 77.68072112072338]
389
+ g_only = [78.21752726763506, 80.57706364462581, 81.33629330240751,
390
+ 77.98339201086276, 77.00922636947199]
391
+ full = [77.86344065821494, 80.02616085611275, 81.26017429181104,
392
+ 77.70156877103959, 76.39525023929815]
393
+
394
+ Means:
395
+ baseline 79.74523638546896
396
+ s_only 79.46797320334013
397
+ g_only 79.02470051900063
398
+ full 78.64931896329529
399
+
400
+ Population std:
401
+ baseline 1.6894... s_only 1.7131... g_only 1.6463... full 1.7498...
402
+
403
+ Sample (n-1) std (if you prefer):
404
+ baseline 1.8888 s_only 1.9153 g_only 1.8406 full 1.9563
405
+
406
+ Delta of means vs baseline (%):
407
+ s_only -0.3477 g_only -0.9035 full -1.3743
408
+
409
+ Per-layer trained lambda (Full SMAT seed 0, 24 values, from
410
+ ablation_inference.json):
411
+ [0.1837, 0.1491, 0.1557, 0.1365, 0.1209, 0.0834, 0.1213, 0.0920,
412
+ 0.1605, 0.3192, 0.3323, 0.4566, 0.3248, 0.5507, 0.5484, 0.4943,
413
+ 0.6821, 0.4693, 0.3914, 0.5843, 0.1961, 0.3536, 0.2781, 0.1833]
414
+ (printed to 4 dp; full precision in figures_final/ablation_inference.json)
415
+
416
+ Surgical ablation deltas (Full SMAT seed 0, 80-batch eval slice, intact
417
+ ppl 79.010):
418
+ lambda_zero +0.4903% S_off +1.8547% random_S +2.8032%
419
+ G_one +792,015.9609% G_mean +149.3211%
420
+
421
+
422
+ ================================================================================
423
+ END
424
+ ================================================================================
HUGGINGFACE_README.md ADDED
@@ -0,0 +1,159 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ license: mit
3
+ library_name: pytorch
4
+ tags:
5
+ - language-modeling
6
+ - transformer
7
+ - attention
8
+ - ablation
9
+ - research
10
+ language:
11
+ - en
12
+ datasets:
13
+ - HuggingFaceFW/fineweb-edu
14
+ metrics:
15
+ - perplexity
16
+ pipeline_tag: text-generation
17
+ ---
18
+
19
+ # SMAT — Semantic Attention
20
+
21
+ Trained checkpoints for **SMAT** (Semantic Attention), a transformer attention
22
+ variant with a learnable semantic-similarity bias and per-token value gate.
23
+
24
+ - **Code:** [github.com/OutrageouslyBad200/smat](https://github.com/OutrageouslyBad200/smat)
25
+ - **Architecture:** 24 layers × 384d × 6 heads, block size 256, ~64 M parameters
26
+ - **Tokenizer:** GPT-2 (`tiktoken`, vocab 50 257)
27
+ - **Training data:** FineWeb-Edu sample-10BT, 98 M tokens
28
+ - **Training compute:** 12 000 optimizer steps, batch 16 × grad_accum 2 (effective 32),
29
+ RTX 4060
30
+
31
+ ## Equation
32
+
33
+ ```
34
+ Attn(Q,K,V) = softmax(QK^T/sqrt(d_k) + λ·S + P + M) · (G ⊙ V)
35
+ ```
36
+
37
+ - `S_ij = cos(W_s h_i, W_s h_j)` — cosine similarity in shared projection
38
+ - `c_j = (1/n) Σ_{l≤j} S_jl` — causal semantic centrality
39
+ - `G_j = σ(w_g^T h_j + μ·c_j + β)` — per-token value gate
40
+ - `λ = softplus(λ_raw)` — constrained positive scalar (per layer)
41
+
42
+ ## Repository contents
43
+
44
+ This HuggingFace repo hosts 20 checkpoints from the 5-seed ablation in
45
+ Experiment 6 of the SMAT paper:
46
+
47
+ ```
48
+ baseline_s0/final.pt s_only_s0/final.pt g_only_s0/final.pt full_s0/final.pt
49
+ baseline_s1/final.pt s_only_s1/final.pt g_only_s1/final.pt full_s1/final.pt
50
+ baseline_s2/final.pt s_only_s2/final.pt g_only_s2/final.pt full_s2/final.pt
51
+ baseline_s3/final.pt s_only_s3/final.pt g_only_s3/final.pt full_s3/final.pt
52
+ baseline_s4/final.pt s_only_s4/final.pt g_only_s4/final.pt full_s4/final.pt
53
+ ```
54
+
55
+ Each variant directory also contains `config.json` and `metrics.jsonl`
56
+ (per-step training + eval logs).
57
+
58
+ | Variant | `use_S` | `use_G` | Description |
59
+ |---------|---------|---------|-------------|
60
+ | `baseline` | False | False | Standard attention |
61
+ | `s_only` | True | False | Semantic bias only |
62
+ | `g_only` | False | True | Value gate only |
63
+ | `full` | True | True | Full SMAT |
64
+
65
+ ## Results
66
+
67
+ Validation perplexity on FineWeb-Edu, 5 seeds, 12 000 steps:
68
+
69
+ | Variant | Mean ppl | Std | Δ vs baseline | Seed wins |
70
+ |---------|----------|-----|---------------|-----------|
71
+ | Baseline | 79.75 | 1.69 | — | — |
72
+ | S-only | 79.47 | 1.71 | −0.35% | 4/5 |
73
+ | G-only | 79.02 | 1.65 | −0.90% | 5/5 |
74
+ | **Full SMAT** | **78.65** | 1.75 | **−1.37%** | **5/5** |
75
+
76
+ 0 NaN failures across 240 000 optimizer steps.
77
+
78
+ ## Usage
79
+
80
+ ```bash
81
+ pip install torch numpy tiktoken huggingface_hub
82
+ git clone https://github.com/OutrageouslyBad200/smat.git
83
+ cd smat
84
+ ```
85
+
86
+ Download a single checkpoint:
87
+
88
+ ```python
89
+ from huggingface_hub import hf_hub_download
90
+ ckpt_path = hf_hub_download(
91
+ repo_id="OutrageouslyBad200/smat",
92
+ filename="full_s0/final.pt",
93
+ )
94
+ ```
95
+
96
+ Load it into the SMAT model:
97
+
98
+ ```python
99
+ import torch
100
+ from model import Config, SMATTransformer
101
+
102
+ state = torch.load(ckpt_path, map_location="cuda")
103
+ cfg = Config(**state["config"])
104
+ model = SMATTransformer(cfg).cuda()
105
+ model.load_state_dict(state["state_dict"])
106
+ model.eval()
107
+ ```
108
+
109
+ Reproduce surgical ablations (Experiment 7):
110
+
111
+ ```bash
112
+ python ablate.py --ckpt full_s0/final.pt --n_batches 80
113
+ ```
114
+
115
+ ## Surgical-ablation findings (Experiment 7)
116
+
117
+ Run on Full SMAT, val ppl 79.010:
118
+
119
+ | Ablation | val ppl | Δ |
120
+ |----------|---------|---|
121
+ | λ=0 (S still drives c) | 79.40 | +0.49% |
122
+ | S removed entirely | 80.48 | +1.85% |
123
+ | Random S (same norm) | 81.23 | +2.80% |
124
+ | G replaced by mean | 196.99 | +149% |
125
+ | G forced to 1.0 | 625 850 | catastrophic |
126
+
127
+ - The gate **G** is catastrophically essential.
128
+ - **S** routes mostly through `μ·c` in the gate (74 % of lift), not through
129
+ `λ·S` in attention (26 %).
130
+ - Per-token gate differentiation matters: replacing G with its mean costs 149 %.
131
+
132
+ ## Limitations
133
+
134
+ - Small base model (~64 M params); larger-scale runs (100 M on FineWeb / FineMath)
135
+ show stronger lifts (−11 % to −17 %) but are not included as released checkpoints.
136
+ - Trained only on English FineWeb-Edu sample-10BT — generalization to other
137
+ domains untested at this scale.
138
+ - Not instruction-tuned, not RLHF'd, no safety filtering. Research artifact only.
139
+
140
+ ## Citation
141
+
142
+ ```bibtex
143
+ @misc{smat2026,
144
+ author = {OutrageouslyBad200},
145
+ title = {SMAT: Semantic Attention},
146
+ year = {2026},
147
+ howpublished = {\url{https://github.com/OutrageouslyBad200/smat}},
148
+ }
149
+ ```
150
+
151
+ ## Contact
152
+
153
+ For further information on training runs, intermediate experiments, or the
154
+ unpublished paper draft, please contact the creator via
155
+ [GitHub](https://github.com/OutrageouslyBad200) or HuggingFace.
156
+
157
+ ## License
158
+
159
+ [MIT License](https://github.com/OutrageouslyBad200/smat/blob/main/LICENSE).
all_results.csv ADDED
@@ -0,0 +1,25 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ runset,variant,seed,params,final_step,tokens_seen,val_loss,val_ppl,lambda_start,lambda_end,lambda_per_layer_min,lambda_per_layer_max,G_start,G_end,elapsed_s,nan_failures
2
+ runs,baseline,0,63376512,11999,98304000,4.360858964920044,78.32438343443285,,,,,,,5309.61736869812,0
3
+ runs,baseline,1,63376512,11999,98304000,4.393609774112702,80.93203870134798,,,,,,,5335.801450252533,0
4
+ runs,baseline,2,63376512,11999,98304000,4.410813975334167,82.33645607970243,,,,,,,4016.196511745453,0
5
+ runs,baseline,3,63376512,11999,98304000,4.374352741241455,79.38843805716219,,,,,,,4001.651510953903,0
6
+ runs,baseline,4,63376512,11999,98304000,4.353432512283325,77.74486565469935,,,,,,,3997.937122106552,0
7
+ runs,full,0,63975624,11999,98304000,4.354956531524659,77.86344065821494,0.12692801654338837,0.3069125845407446,0.08336106687784195,0.6821404099464417,0.5030857535700003,0.3505655957075457,6544.294906139374,0
8
+ runs,full,1,63975624,11999,98304000,4.382353591918945,80.02616085611275,0.12692801654338837,0.3074745563790202,0.09392528235912323,0.6946620941162109,0.4995858383675416,0.3332850156972806,6583.949243545532,0
9
+ runs,full,2,63975624,11999,98304000,4.397656035423279,81.26017429181104,0.12692801654338837,0.30312894998739165,0.11483360826969147,0.6690832376480103,0.48413818205396336,0.33056403052372235,5372.456871032715,0
10
+ runs,full,3,63975624,11999,98304000,4.352875447273254,77.70156877103959,0.12692801654338837,0.29537375799069804,0.09290912002325058,0.6339113712310791,0.4967380625506242,0.3447236562302957,5374.616672039032,0
11
+ runs,full,4,63975624,11999,98304000,4.335920524597168,76.39525023929815,0.12692801654338837,0.3175949805105726,0.09670225530862808,0.6432420015335083,0.49705679963032406,0.3396819991370042,5370.658619880676,0
12
+ runs,g_only,0,63385776,11999,98304000,4.359493756294251,78.21752726763506,,,,,0.4967447916666667,0.3484141031901042,5647.636380910873,0
13
+ runs,g_only,1,63385776,11999,98304000,4.389214038848877,80.57706364462581,,,,,0.5144856770833334,0.3359120686848958,5649.687728404999,0
14
+ runs,g_only,2,63385776,11999,98304000,4.398592329025268,81.33629330240751,,,,,0.5052897135416666,0.3676300048828125,4351.29425239563,0
15
+ runs,g_only,3,63385776,11999,98304000,4.356495881080628,77.98339201086276,,,,,0.4998372395833333,0.362548828125,4340.425580263138,0
16
+ runs,g_only,4,63385776,11999,98304000,4.34392523765564,77.00922636947199,,,,,0.5079752604166666,0.3562774658203125,4339.748939752579,0
17
+ runs,s_only,0,63966360,11999,98304000,4.366122233867645,78.7377125064686,0.12692801654338837,0.31397200624148053,0.06856122612953186,0.7095168232917786,,,6095.362888336182,0
18
+ runs,s_only,1,63966360,11999,98304000,4.392780220508575,80.86492907631813,0.12692801654338837,0.3187686977908015,0.058697257190942764,0.6693422198295593,,,6085.201226711273,0
19
+ runs,s_only,2,63966360,11999,98304000,4.407615661621094,82.07353893301419,0.12692801654338837,0.32208347382644814,0.07567994296550751,0.7152900695800781,,,4696.141266584396,0
20
+ runs,s_only,3,63966360,11999,98304000,4.3564903974533085,77.98296438017636,0.12692801654338837,0.3182733968521158,0.0908360481262207,0.6816989183425903,,,4680.379953622818,0
21
+ runs,s_only,4,63966360,11999,98304000,4.352607107162475,77.68072112072338,0.12692801654338837,0.3260646794612209,0.07901874929666519,0.6664481163024902,,,4688.767492055893,0
22
+ runs_4ksteps,baseline,0,63376512,3999,32768000,5.000214111804962,148.44493951411144,,,,,,,1804.3665130138397,0
23
+ runs_4ksteps,full,0,63975624,3999,32768000,4.9527598261833194,141.5651204177534,0.12692801654338837,0.16720068734139204,,,0.5060585426787535,0.4214151619623105,2212.9264504909515,0
24
+ runs_4ksteps,g_only,0,63385776,3999,32768000,4.976549911499023,144.973346966276,,,,,0.4969075520833333,0.4358113606770833,1914.1351833343506,0
25
+ runs_4ksteps,s_only,0,63966360,3999,32768000,4.996470749378204,147.89029507035235,0.12692801654338837,0.16468850150704384,,,,,2049.8153450489044,0
baseline_s0/config.json ADDED
@@ -0,0 +1,21 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "variant": "baseline",
3
+ "seed": 0,
4
+ "out": "C:\\Users\\Bhorn\\Desktop\\SMATest\\runs\\baseline_s0",
5
+ "max_steps": 12000,
6
+ "warmup": 200,
7
+ "lr_max": 0.0006,
8
+ "lr_min": 6e-05,
9
+ "wd": 0.1,
10
+ "batch_size": 16,
11
+ "grad_accum": 2,
12
+ "block_size": 256,
13
+ "n_layer": 24,
14
+ "n_head": 6,
15
+ "n_embd": 384,
16
+ "vocab_size": 50257,
17
+ "data_seed": 1337,
18
+ "eval_interval": 500,
19
+ "eval_batches": 40,
20
+ "log_interval": 20
21
+ }
baseline_s0/final.pt ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:bce27c7b560e565c25258a6ea84e5173a531c8167830748f786bd4bb96b4541d
3
+ size 253572039
baseline_s0/metrics.jsonl ADDED
The diff for this file is too large to render. See raw diff
 
baseline_s1/config.json ADDED
@@ -0,0 +1,21 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "variant": "baseline",
3
+ "seed": 1,
4
+ "out": "C:\\Users\\Bhorn\\Desktop\\SMATest\\runs\\baseline_s1",
5
+ "max_steps": 12000,
6
+ "warmup": 200,
7
+ "lr_max": 0.0006,
8
+ "lr_min": 6e-05,
9
+ "wd": 0.1,
10
+ "batch_size": 16,
11
+ "grad_accum": 2,
12
+ "block_size": 256,
13
+ "n_layer": 24,
14
+ "n_head": 6,
15
+ "n_embd": 384,
16
+ "vocab_size": 50257,
17
+ "data_seed": 1001340,
18
+ "eval_interval": 500,
19
+ "eval_batches": 40,
20
+ "log_interval": 20
21
+ }
baseline_s1/final.pt ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:9a5d08149cc3d598b4b31279b1e19ed2a79854bed1e1212d1d3094bfd50d0c0d
3
+ size 253572039
baseline_s1/metrics.jsonl ADDED
The diff for this file is too large to render. See raw diff
 
baseline_s2/config.json ADDED
@@ -0,0 +1,21 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "variant": "baseline",
3
+ "seed": 2,
4
+ "out": "C:\\Users\\Bhorn\\Desktop\\SMATest\\runs\\baseline_s2",
5
+ "max_steps": 12000,
6
+ "warmup": 200,
7
+ "lr_max": 0.0006,
8
+ "lr_min": 6e-05,
9
+ "wd": 0.1,
10
+ "batch_size": 16,
11
+ "grad_accum": 2,
12
+ "block_size": 256,
13
+ "n_layer": 24,
14
+ "n_head": 6,
15
+ "n_embd": 384,
16
+ "vocab_size": 50257,
17
+ "data_seed": 2001343,
18
+ "eval_interval": 1000,
19
+ "eval_batches": 20,
20
+ "log_interval": 20
21
+ }
baseline_s2/final.pt ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:b59023116afb5ef8093dfc4e71d3ee798e4ee2a88a5db75fa8c695bae1a795de
3
+ size 253572039
baseline_s2/metrics.jsonl ADDED
The diff for this file is too large to render. See raw diff
 
baseline_s3/config.json ADDED
@@ -0,0 +1,21 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "variant": "baseline",
3
+ "seed": 3,
4
+ "out": "C:\\Users\\Bhorn\\Desktop\\SMATest\\runs\\baseline_s3",
5
+ "max_steps": 12000,
6
+ "warmup": 200,
7
+ "lr_max": 0.0006,
8
+ "lr_min": 6e-05,
9
+ "wd": 0.1,
10
+ "batch_size": 16,
11
+ "grad_accum": 2,
12
+ "block_size": 256,
13
+ "n_layer": 24,
14
+ "n_head": 6,
15
+ "n_embd": 384,
16
+ "vocab_size": 50257,
17
+ "data_seed": 3001346,
18
+ "eval_interval": 1000,
19
+ "eval_batches": 20,
20
+ "log_interval": 20
21
+ }
baseline_s3/final.pt ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:22e76aba2e7217efe0857e02a66e135844cc511ee89d9cec34be1a6354b0f5ea
3
+ size 253572039
baseline_s3/metrics.jsonl ADDED
The diff for this file is too large to render. See raw diff
 
baseline_s4/config.json ADDED
@@ -0,0 +1,21 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "variant": "baseline",
3
+ "seed": 4,
4
+ "out": "C:\\Users\\Bhorn\\Desktop\\SMATest\\runs\\baseline_s4",
5
+ "max_steps": 12000,
6
+ "warmup": 200,
7
+ "lr_max": 0.0006,
8
+ "lr_min": 6e-05,
9
+ "wd": 0.1,
10
+ "batch_size": 16,
11
+ "grad_accum": 2,
12
+ "block_size": 256,
13
+ "n_layer": 24,
14
+ "n_head": 6,
15
+ "n_embd": 384,
16
+ "vocab_size": 50257,
17
+ "data_seed": 4001349,
18
+ "eval_interval": 1000,
19
+ "eval_batches": 20,
20
+ "log_interval": 20
21
+ }
baseline_s4/final.pt ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:d1653ae95a80f8c998ce1f4d3e1a8c1e6466df0324a40c29b930f3c62f5b7887
3
+ size 253572039
baseline_s4/metrics.jsonl ADDED
The diff for this file is too large to render. See raw diff
 
figures_4ksteps/ablation_results.csv ADDED
@@ -0,0 +1,5 @@
 
 
 
 
 
 
1
+ variant,seed,final_val_ppl,delta_pct_vs_baseline,final_val_loss,final_step,tokens_seen,lambda_start,lambda_end,G_start,G_end
2
+ baseline,0,148.44493951411144,+0.00,5.000214111804962,3999,32768000,None,None,None,None
3
+ full,0,141.5651204177534,-4.63,4.9527598261833194,3999,32768000,0.12692801654338837,0.16720068734139204,0.5060585426787535,0.4214151619623105
4
+ g_only,0,144.973346966276,-2.34,4.976549911499023,3999,32768000,None,None,0.4969075520833333,0.4358113606770833
5
+ s_only,0,147.89029507035235,-0.37,4.996470749378204,3999,32768000,0.12692801654338837,0.16468850150704384,None,None
figures_4ksteps/ablation_table.png ADDED
figures_4ksteps/gate_activity.png ADDED
figures_4ksteps/lambda_trajectory.png ADDED
figures_4ksteps/loss_curves.png ADDED
figures_seed0/ablation_results.csv ADDED
@@ -0,0 +1,5 @@
 
 
 
 
 
 
1
+ variant,seed,final_val_ppl,delta_pct_vs_baseline,final_val_loss,final_step,tokens_seen,lambda_start,lambda_end,G_start,G_end
2
+ baseline,0,78.32438343443285,+0.00,4.360858964920044,11999,98304000,None,None,None,None
3
+ full,0,77.86344065821494,-0.59,4.354956531524659,11999,98304000,0.12692801654338837,0.3069125845407446,0.5030857535700003,0.3505655957075457
4
+ g_only,0,78.21752726763506,-0.14,4.359493756294251,11999,98304000,None,None,0.4967447916666667,0.3484141031901042
5
+ s_only,0,78.7377125064686,+0.53,4.366122233867645,11999,98304000,0.12692801654338837,0.31397200624148053,None,None
figures_seed0/ablation_table.png ADDED
figures_seed0/gate_activity.png ADDED
figures_seed0/lambda_per_layer.png ADDED

Git LFS Details

  • SHA256: 15dbebcafa80d99a9227ce377ab7bfd8c9b131cf086e71bf78a7fcc2b6cc15bc
  • Pointer size: 131 Bytes
  • Size of remote file: 113 kB
figures_seed0/lambda_trajectory.png ADDED
figures_seed0/loss_curves.png ADDED
full_s0/config.json ADDED
@@ -0,0 +1,21 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "variant": "full",
3
+ "seed": 0,
4
+ "out": "C:\\Users\\Bhorn\\Desktop\\SMATest\\runs\\full_s0",
5
+ "max_steps": 12000,
6
+ "warmup": 200,
7
+ "lr_max": 0.0006,
8
+ "lr_min": 6e-05,
9
+ "wd": 0.1,
10
+ "batch_size": 16,
11
+ "grad_accum": 2,
12
+ "block_size": 256,
13
+ "n_layer": 24,
14
+ "n_head": 6,
15
+ "n_embd": 384,
16
+ "vocab_size": 50257,
17
+ "data_seed": 1337,
18
+ "eval_interval": 500,
19
+ "eval_batches": 40,
20
+ "log_interval": 20
21
+ }
full_s0/final.pt ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:b5a8d83d8725d3cfe8ed58aa8720b6a40900aed797f617addfea94d49a315bda
3
+ size 256003111
full_s0/metrics.jsonl ADDED
The diff for this file is too large to render. See raw diff
 
full_s1/config.json ADDED
@@ -0,0 +1,21 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "variant": "full",
3
+ "seed": 1,
4
+ "out": "C:\\Users\\Bhorn\\Desktop\\SMATest\\runs\\full_s1",
5
+ "max_steps": 12000,
6
+ "warmup": 200,
7
+ "lr_max": 0.0006,
8
+ "lr_min": 6e-05,
9
+ "wd": 0.1,
10
+ "batch_size": 16,
11
+ "grad_accum": 2,
12
+ "block_size": 256,
13
+ "n_layer": 24,
14
+ "n_head": 6,
15
+ "n_embd": 384,
16
+ "vocab_size": 50257,
17
+ "data_seed": 1001340,
18
+ "eval_interval": 500,
19
+ "eval_batches": 40,
20
+ "log_interval": 20
21
+ }
full_s1/final.pt ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:7e653be057f08c2c10bb1be3ee3633ef3c490f33dab83e9a3891339327c80f10
3
+ size 256003111
full_s1/metrics.jsonl ADDED
The diff for this file is too large to render. See raw diff
 
full_s2/config.json ADDED
@@ -0,0 +1,21 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "variant": "full",
3
+ "seed": 2,
4
+ "out": "C:\\Users\\Bhorn\\Desktop\\SMATest\\runs\\full_s2",
5
+ "max_steps": 12000,
6
+ "warmup": 200,
7
+ "lr_max": 0.0006,
8
+ "lr_min": 6e-05,
9
+ "wd": 0.1,
10
+ "batch_size": 16,
11
+ "grad_accum": 2,
12
+ "block_size": 256,
13
+ "n_layer": 24,
14
+ "n_head": 6,
15
+ "n_embd": 384,
16
+ "vocab_size": 50257,
17
+ "data_seed": 2001343,
18
+ "eval_interval": 1000,
19
+ "eval_batches": 20,
20
+ "log_interval": 20
21
+ }
full_s2/final.pt ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:ffbdf35a45d7b455806ed6ef360340c606c1a9c1ca78eff6811b679009e180c0
3
+ size 256003111
full_s2/metrics.jsonl ADDED
The diff for this file is too large to render. See raw diff
 
full_s3/config.json ADDED
@@ -0,0 +1,21 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "variant": "full",
3
+ "seed": 3,
4
+ "out": "C:\\Users\\Bhorn\\Desktop\\SMATest\\runs\\full_s3",
5
+ "max_steps": 12000,
6
+ "warmup": 200,
7
+ "lr_max": 0.0006,
8
+ "lr_min": 6e-05,
9
+ "wd": 0.1,
10
+ "batch_size": 16,
11
+ "grad_accum": 2,
12
+ "block_size": 256,
13
+ "n_layer": 24,
14
+ "n_head": 6,
15
+ "n_embd": 384,
16
+ "vocab_size": 50257,
17
+ "data_seed": 3001346,
18
+ "eval_interval": 1000,
19
+ "eval_batches": 20,
20
+ "log_interval": 20
21
+ }
full_s3/final.pt ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:484ac9a39316cb184ca5e19e871ca977fa8529d4c3bafaa6613ee6e3aeef2eef
3
+ size 256003111
full_s3/metrics.jsonl ADDED
The diff for this file is too large to render. See raw diff
 
full_s4/config.json ADDED
@@ -0,0 +1,21 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "variant": "full",
3
+ "seed": 4,
4
+ "out": "C:\\Users\\Bhorn\\Desktop\\SMATest\\runs\\full_s4",
5
+ "max_steps": 12000,
6
+ "warmup": 200,
7
+ "lr_max": 0.0006,
8
+ "lr_min": 6e-05,
9
+ "wd": 0.1,
10
+ "batch_size": 16,
11
+ "grad_accum": 2,
12
+ "block_size": 256,
13
+ "n_layer": 24,
14
+ "n_head": 6,
15
+ "n_embd": 384,
16
+ "vocab_size": 50257,
17
+ "data_seed": 4001349,
18
+ "eval_interval": 1000,
19
+ "eval_batches": 20,
20
+ "log_interval": 20
21
+ }
full_s4/final.pt ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:324684aa157a690a58646c82d7c760e6278b709168dc4be9372d2c0778f0e999
3
+ size 256003111
full_s4/metrics.jsonl ADDED
The diff for this file is too large to render. See raw diff
 
g_only_s0/config.json ADDED
@@ -0,0 +1,21 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "variant": "g_only",
3
+ "seed": 0,
4
+ "out": "C:\\Users\\Bhorn\\Desktop\\SMATest\\runs\\g_only_s0",
5
+ "max_steps": 12000,
6
+ "warmup": 200,
7
+ "lr_max": 0.0006,
8
+ "lr_min": 6e-05,
9
+ "wd": 0.1,
10
+ "batch_size": 16,
11
+ "grad_accum": 2,
12
+ "block_size": 256,
13
+ "n_layer": 24,
14
+ "n_head": 6,
15
+ "n_embd": 384,
16
+ "vocab_size": 50257,
17
+ "data_seed": 1337,
18
+ "eval_interval": 500,
19
+ "eval_batches": 40,
20
+ "log_interval": 20
21
+ }
g_only_s0/final.pt ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:0fb40abef9f7c1c7d9b7557e45a4bf5793c3ed6a875cbe9faef05d3b58c23b64
3
+ size 253629735
g_only_s0/metrics.jsonl ADDED
The diff for this file is too large to render. See raw diff
 
g_only_s1/config.json ADDED
@@ -0,0 +1,21 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "variant": "g_only",
3
+ "seed": 1,
4
+ "out": "C:\\Users\\Bhorn\\Desktop\\SMATest\\runs\\g_only_s1",
5
+ "max_steps": 12000,
6
+ "warmup": 200,
7
+ "lr_max": 0.0006,
8
+ "lr_min": 6e-05,
9
+ "wd": 0.1,
10
+ "batch_size": 16,
11
+ "grad_accum": 2,
12
+ "block_size": 256,
13
+ "n_layer": 24,
14
+ "n_head": 6,
15
+ "n_embd": 384,
16
+ "vocab_size": 50257,
17
+ "data_seed": 1001340,
18
+ "eval_interval": 500,
19
+ "eval_batches": 40,
20
+ "log_interval": 20
21
+ }
g_only_s1/final.pt ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:0904b072959de61365838c737bf14d2ec72dbffbc5a02fcfa7fa49895a8fed85
3
+ size 253629735