syvb commited on
Commit
824b30f
·
verified ·
1 Parent(s): c1e418b

Upload README.md with huggingface_hub

Browse files
Files changed (1) hide show
  1. README.md +37 -33
README.md CHANGED
@@ -7,54 +7,58 @@ tags:
7
  - qwen3
8
  ---
9
 
10
- # nanonla-qwen3-8b-L24-av-ctrl
11
-
12
- **1-slot control arm** (status-quo single injection, matched compute).
13
 
14
  Continued AV-SFT warm-started from [`syvb/nanonla-qwen3-8b-L24-av`](https://huggingface.co/syvb/nanonla-qwen3-8b-L24-av)
15
- (Qwen3-8B, injection layer 24, d_model 4096).
16
-
17
- ## Multi-input affine experiment
18
-
19
- Hypothesis: repeating the injection marker **N times**, each slot getting its own
20
- learned affine `A_i·v_norm + b_i` over the (normalized) injected activation, gives
21
- the backbone N independently-readable "views" of one activation and improves
22
- verbalization vs. the status-quo single injection.
23
 
24
- - **Experiment arm:** N=16 markers, 16 full d×d+bias affines, identity-init,
25
- full continued AV-SFT (affines **and** backbone trained).
26
- - **Control arm:** N=1, no affine — same warm-start, same data, same step budget
27
- (matched compute).
28
 
29
- Both arms: 3000 steps, eff. batch 32, lr 2e-5 cosine→2e-6, warmup 50,
30
- `injection_scale = sqrt(d_model)`. Trained with the standalone (miles-free)
31
- trainer `tools/train_av_standalone.py`.
32
 
33
- ## Held-out val NLL (lower is better)
34
-
35
- Evaluated on **832 doc-disjoint** held-out rows (val rows whose `doc_id`
36
- does **not** appear in the training split — a true held-out set, not just a row
37
- split), gold activation injected. Both arms scored on the **same** rows (paired).
38
 
39
  | arm | val NLL/token | perplexity |
40
  |---|---|---|
41
- | **16-slot affine (experiment)** | 1.4141 | 4.113 |
42
- | **1-slot (control)** | 1.4305 | 4.181 |
43
  | **Δ (control − experiment)** | **+0.0165** | — |
44
 
45
  Paired row-level bootstrap (10k resamples): Δ = **+0.0165** nats/token,
46
- 95% CI **[+0.0148, +0.0181]**.
 
 
47
 
48
- **The 16-slot affine significantly improves val NLL** (Δ=+0.0165, 95% CI [+0.0148, +0.0181] excludes 0).
 
49
 
50
- ### Caveats
51
- - This is a **system-level** comparison (16 markers + per-slot affine vs. 1 marker).
52
- It does **not** isolate the affine from the effect of simply repeating the
53
- injection 16× a "16 markers, no affine" arm would be needed for that.
54
- - 3000-step continued warm-start; not a converged run.
 
 
 
 
 
 
 
 
 
 
 
 
55
 
56
  For the 16-slot model the per-slot affines are in `nla_affine.safetensors`
57
- (`weight [16,4096,4096]`, `bias [16,4096]`); apply them at injection time — see
58
  `launch/eval_av_val_loss.py --multi-input-slots 16 --affine-path ...`.
59
 
60
  wandb: https://wandb.ai/octahedral-systems/nla-multi-affine-experiment
 
7
  - qwen3
8
  ---
9
 
10
+ # Multi-input affine experiment (control arm — 1 slot, no affine)
 
 
11
 
12
  Continued AV-SFT warm-started from [`syvb/nanonla-qwen3-8b-L24-av`](https://huggingface.co/syvb/nanonla-qwen3-8b-L24-av)
13
+ (Qwen3-8B, injection layer 24, d_model 4096). Both arms trained with the
14
+ standalone (miles-free) trainer at 3000 steps, eff. batch 32, lr 2e-5 cosine→2e-6,
15
+ warmup 50, `injection_scale = sqrt(d_model)`, single seed.
 
 
 
 
 
16
 
17
+ - **Experiment arm:** 16 repeated injection markers, each with its own learned
18
+ affine `A_i·v_norm + b_i` over the normalized injected activation (identity-init,
19
+ fp32, +269M params). Affines **and** backbone trained.
20
+ - **Control arm:** 1 marker, no affine (status quo). Same warm-start, data, and budget.
21
 
22
+ ## Result held-out NLL (lower is better)
 
 
23
 
24
+ Evaluated on **832 document-disjoint** held-out rows (val rows whose `doc_id`
25
+ does not appear in the training split), gold activation injected, **paired** (same
26
+ rows, both arms), token-NLL on the response.
 
 
27
 
28
  | arm | val NLL/token | perplexity |
29
  |---|---|---|
30
+ | 16-slot affine | **1.4141** | 4.113 |
31
+ | 1-slot control | 1.4305 | 4.181 |
32
  | **Δ (control − experiment)** | **+0.0165** | — |
33
 
34
  Paired row-level bootstrap (10k resamples): Δ = **+0.0165** nats/token,
35
+ 95% CI **[+0.0148, +0.0181]** (excludes 0).
36
+
37
+ ### Honest interpretation (read this)
38
 
39
+ This is a **small, consistent, system-level** improvement **not** a clean
40
+ demonstration that "the affine improves verbalization." Specifically:
41
 
42
+ - **Effect size is small:** +0.0165 nats ≈ **1.1%** relative (ppl 4.18 → 4.11).
43
+ - **Repetition is confounded with the affine.** The experiment changes *two*
44
+ things at once vs. control: 16× marker repetition **and** the learned affine.
45
+ This run cannot separate them. Inspection of the trained affine shows each slot
46
+ moved only **~4–6%** (Frobenius) from identity so much of the behavior is
47
+ still "inject ~v_norm into 16 slots" (pure repetition), with the affine a small
48
+ perturbation on top. A **"16 markers, no affine"** arm is required to isolate
49
+ the affine's contribution.
50
+ - **The slots did learn distinct transforms:** across-slot divergence
51
+ `‖W_i − W̄‖` is nearly as large as each slot's deviation from identity, i.e. the
52
+ 16 affines are mostly *unique*, not a shared shift — partial support for the
53
+ "independent views" idea, but not proof it's what helps.
54
+ - **Single training seed.** The CI reflects eval-row noise only, **not** training
55
+ variability; a re-trained pair could shift. A +1% gap is within plausible
56
+ seed-to-seed range for 2.1-epoch continued SFT on an 8B model.
57
+ - **NLL is a proxy.** This measures teacher-forced response NLL, not the NLA
58
+ paper's verbalization/reconstruction-quality metrics (FVE, downstream evals).
59
 
60
  For the 16-slot model the per-slot affines are in `nla_affine.safetensors`
61
+ (`weight [16,4096,4096]`, `bias [16,4096]`); apply at injection time — see
62
  `launch/eval_av_val_loss.py --multi-input-slots 16 --affine-path ...`.
63
 
64
  wandb: https://wandb.ai/octahedral-systems/nla-multi-affine-experiment