Upload README.md with huggingface_hub
Browse files
README.md
ADDED
|
@@ -0,0 +1,59 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
license: mit
|
| 3 |
+
base_model: syvb/nanonla-qwen3-8b-L24-av
|
| 4 |
+
tags:
|
| 5 |
+
- nla
|
| 6 |
+
- natural-language-autoencoder
|
| 7 |
+
- qwen3
|
| 8 |
+
---
|
| 9 |
+
|
| 10 |
+
# nanonla-qwen3-8b-L24-av-ctrl-singletag-bs64
|
| 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: 1000 steps, eff. batch 64, 1 epoch (64k rows), lr 2.5e-5, single-tag, `injection_scale = sqrt(d_model)`. Trained with the
|
| 30 |
+
standalone (miles-free) trainer `tools/train_av_standalone.py`.
|
| 31 |
+
|
| 32 |
+
## Held-out val NLL (lower is better)
|
| 33 |
+
|
| 34 |
+
Evaluated on **4001 doc-disjoint** held-out rows (val rows whose `doc_id`
|
| 35 |
+
does **not** appear in the training split — a true held-out set, not just a row
|
| 36 |
+
split), gold activation injected. Both arms scored on the **same** rows (paired).
|
| 37 |
+
|
| 38 |
+
| arm | val NLL/token | perplexity |
|
| 39 |
+
|---|---|---|
|
| 40 |
+
| **16-slot affine (experiment)** | 1.4580 | 4.298 |
|
| 41 |
+
| **1-slot (control)** | 1.4753 | 4.372 |
|
| 42 |
+
| **Δ (control − experiment)** | **+0.0172** | — |
|
| 43 |
+
|
| 44 |
+
Paired row-level bootstrap (10k resamples): Δ = **+0.0172** nats/token,
|
| 45 |
+
95% CI **[+0.0167, +0.0178]**.
|
| 46 |
+
|
| 47 |
+
✅ **The 16-slot affine significantly improves val NLL** (Δ=+0.0172, 95% CI [+0.0167, +0.0178] excludes 0).
|
| 48 |
+
|
| 49 |
+
### Caveats
|
| 50 |
+
- This is a **system-level** comparison (16 markers + per-slot affine vs. 1 marker).
|
| 51 |
+
It does **not** isolate the affine from the effect of simply repeating the
|
| 52 |
+
injection 16× — a "16 markers, no affine" arm would be needed for that.
|
| 53 |
+
- Continued warm-start, not a converged run (1000 steps, eff. batch 64, 1 epoch (64k rows), lr 2.5e-5, single-tag).
|
| 54 |
+
|
| 55 |
+
For the 16-slot model the per-slot affines are in `nla_affine.safetensors`
|
| 56 |
+
(`weight [16,4096,4096]`, `bias [16,4096]`); apply them at injection time — see
|
| 57 |
+
`launch/eval_av_val_loss.py --multi-input-slots 16 --affine-path ...`.
|
| 58 |
+
|
| 59 |
+
wandb: https://wandb.ai/octahedral-systems/nla-multi-affine-experiment
|