Qwen3.5-9B NLA activation reconstructor (AR), layer 21, warm-start SFT
The AR half of a natural-language autoencoder (NLA) for Qwen3.5-9B: it reads a text explanation and predicts the layer-21 residual-stream activation it describes. Its partner verbalizer (AV) is therem/qwen3.5-9b-nla-L21-av-sft. SFT warm start only; no RL.
Files
- repo root: the first 22 transformer blocks of Qwen3.5-9B (layer index 21 + 1) with the LoRA merged in, bf16, final norm stripped and no LM head (
model.safetensors), plus a trainedLinear(4096, 4096)value head (value_head.safetensors).ar_meta.jsonrecords the truncation and LoRA settings;nla_meta.yamlis the sidecar with the critic prompt template and extraction settings. lora/iter_NNNNNNN/:ar_lora_value_head.safetensors(LoRA + value head) every 500 steps plus the final one (iter_0004688 = the merged weights). Base for these: the text-only export ofQwen/Qwen3.5-9B.run_config.yaml: the exact training config.
Usage
Prompt: Summary of the following text: <text>{explanation}</text> <summary>. Take the hidden state at the last token (<summary>'s final token), apply the value head. Training compared prediction and gold after scaling both to L2 norm sqrt(4096) = 64, so the prediction's direction is what is meaningful; rescale to the norm you need. Loading the merged model with plain transformers reports lm_head and model.norm as missing; that is expected.
Training
- Data: same 300,003 rows as the AV (ceselder/easynla-dsv4-warmstart-opus5
corpus/, Claude Opus explanations, activations re-extracted from Qwen3.5-9B at layer 21). Held-out = 7,293 test rows from 736 documents, document-disjoint from training. - Code: EasyNLA (github.com/asherps/EasyNLA) with a Qwen3.5 port,
nla.train_sft --mode ar --ar-num-layers 22. - LoRA r=128, alpha=16, rsLoRA (same target modules as the AV), value head fully trained. lr 2e-5 -> 2e-6, 50 warmup, batch 64 (32 x 2), 4,688 steps = 1 epoch, seed 0. One A800 80GB, ~2.3 h.
Results
Held-out FVE (fraction of variance explained vs predict-the-mean, gold explanations, n=1000): 68.5% @500, 71.9% @1000, 74.0% @2000, 75.1% @4000, 75.2% final. The bf16 merge matches the LoRA model (75.18% vs 75.18%, n=1024).
Controls (n=1024, final iter): gold 0.752; explanation from another document -0.94; same document, other position -0.61; quoted spans stripped -0.04; quoted spans only 0.005; raw last 80 characters of source as the quote 0.58. 99.8% of the teacher explanations contain a quoted span. So most of the 75% comes from the verbatim source tail quoted in the explanation, not from the prose.