Regular NLA (Qwen3-8B, layer 24)

A natural language autoencoder (NLA) for the layer-24 residual stream of Qwen/Qwen3-8B in the format of the original NLA paper: one short free-form explanation per activation, reconstructed as a whole. It is a non-compositional baseline for the Focus and Subspace NLAs. It has two models:

  • Verbalizer (av/): a fine-tuned Qwen3-8B. It is given one activation vector, injected into its own residual stream at a marker token, and writes one short explanation of it (a few short text snippets; the prompt asks for two or three).
  • Reconstructor (ar/): a fine-tuned Qwen3-8B truncated to its first 25 layers, with a linear head. It maps the explanation back to a vector, a reconstruction of the original activation.

Files

path contents
av/ verbalizer, bf16, Hugging Face format (the RL LoRA is merged in)
ar/ reconstructor backbone (25 decoder layers, final norm and LM head unused) + value_head.safetensors (linear 4096 -> 4096); saved_at_step.txt is its training step
nla_meta.yaml marker token, prompt templates, layer
nla_config.json the settings scripts/hf_quickstart.py reads

How it works

  • Activation x: residual stream at the output of decoder layer 24 (hidden_states[25] in Hugging Face numbering), d = 4096.
  • Injection: the verbalizer prompt contains the marker ㈎ (token 149705) inside <concept>...</concept>. At the output of decoder layer 1, the residual h at the marker position is replaced by h + |h| * x / |x|.
  • Prompt: the actor template from nla_meta.yaml as one user turn, with the chat template applied (add_generation_prompt=True) and no extra instruction. The answer is inside <explanation> tags.
  • Reconstruction: the whole explanation is wrapped in the critic template (Summary of the following text: <text>...</text> <summary>), and the reconstructor's last hidden state at the last token, rescaled to norm sqrt(d), goes through the linear head: x_hat = AR(explanation).
  • FVE (fraction of variance explained): 1 - MSE(n(x_hat), n(x)) / 0.564, where n rescales a vector to norm sqrt(d) and the denominator is the variance of normalized activations in the training pool.

Training

  • Activations from web text (FineFineWeb), 10 token positions per document, all at position 50 or later. Tokens earlier in a text are outside the training distribution, so readings there are less reliable.
  • Warm start: supervised fine-tuning of the verbalizer on Claude-written explanations of the text up to each position, in the format of the original NLA paper, and of the reconstructor on the reverse direction (the explanation to the activation).
  • Reinforcement learning: GRPO (512 activations x 8 samples per step), generation capped at 150 tokens. The reward is the reconstruction quality of the explanation. The verbalizer is trained as a LoRA (rank 128, merged here) with a KL penalty of 0.01 to the warm start; the reconstructor is fully fine-tuned alongside it. The released verbalizer is from step 1,000 of a 4,000-step run (earlier steps write more coherent explanations); the released reconstructor is from the end of the same run (step 4,000), since none was kept from step 1,000.
  • Held-out FVE around step 1,000, measured during training with that step's own reconstructor: 79.5% (mean of the evaluations between steps 950 and 1,050, 64 held-out activations each).

Quickstart

Code: the nla repository shared with these weights (inference helpers in nla/, the end-to-end example in scripts/hf_quickstart.py). Install it from the repository root with pip install -e . einops. The quickstart needs one GPU with about 20 GB of memory and downloads this repository (27 GB) plus Qwen/Qwen3-8B (16 GB).

python scripts/hf_quickstart.py --nla asher577/regular-nla-qwen3-8b \
    --text "The committee met on Tuesday to review the city's proposed budget for the coming year. Council members argued over how much money should go to road repairs, with several pointing out that potholes on the east side have gone unfixed for months. The mayor defended the plan, saying that the new transit funding would reduce traffic, but critics replied that the"

Loading the reconstructor prints a warning that lm_head.weight and model.norm.weight were newly initialized. That is expected: the reconstructor reads the last decoder layer directly and replaces both with identities.

Some tokens carry activations of over 10x the median norm ("sink" tokens, such as tokens a chat template appends after the message). Readings at these tokens are unreliable, and FVE does not flag it: sink activations all point in nearly the same direction and reconstruct well. The quickstart warns on such tokens, and with --chat it reads the last token of the message rather than the tokens the template appends.

A reading is the verbalizer's description of the activation, not a transcript of the text: quoted phrases and specific details in it can be wrong, so check them against the input.

Example output (greedy decoding):

$ python scripts/hf_quickstart.py --nla asher577/regular-nla-qwen3-8b \
    --text "The committee met on Tuesday to review the city's proposed budget for the coming year. Council members argued over how much money should go to road repairs, with several pointing out that potholes on the east side have gone unfixed for months. The mayor defended the plan, saying that the new transit funding would reduce traffic, but critics replied that the"

subject Qwen/Qwen3-8B layer 24: token 69 of 70 = ' the', |x| = 246.3

EXPLANATION
Civic debate structure: a council member's argument is being summarized, presenting opposing viewpoints on budget priorities.

The sentence establishes a criticism of the proposal's transportation funding, setting up a counterargument about road budget concerns versus public transit needs.

Final fragment "because the" is a causal clause mid-sentence, requiring a noun phrase or clause completing the criticism β€” likely referencing the budget plan's transportation spending or road plan being insufficient.
"some argue that the" demands a contrasting or qualifying statement, e.g., "transportation plan won't address traffic needs" or "road budget is insufficient."
"they argue that the" introduces.

reconstruction: cosine 0.942, FVE 0.793 (from the whole explanation)
Downloads last month

-

Downloads are not tracked for this model. How to track
Inference Providers NEW
This model isn't deployed by any Inference Provider. πŸ™‹ Ask for provider support

Model tree for asher577/regular-nla-qwen3-8b

Finetuned
Qwen/Qwen3-8B
Finetuned
(2,383)
this model