NLA (Qwen3-8B, layer 24)

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

It usually identifies the kind of request and how a reply should be structured, but often gets the specific content wrong: in spot checks it read a nursing cover letter as one for a marketing role, and a question about paying for a broken dishwasher as one about a written lease. Compare its readings with the Focus NLA's on the same text. 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 explanation of it, usually about eight short paragraphs.
  • 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 an even mix of chat (WildChat) and 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 (eight short free-form paragraphs each), and of the reconstructor on the reverse direction (the whole explanation to the activation).
  • Reinforcement learning: GRPO for 1,000 steps (256 activations x 8 samples per step), generation capped at 310 tokens. The reward is the reconstruction quality of the whole explanation. The verbalizer is trained as a LoRA (rank 128, merged here) with a KL penalty of 0.02 to the warm start; the reconstructor is fully fine-tuned alongside it, and the released reconstructor is from the same step.
  • Held-out FVE at the released step: about 69% (68.8% averaged over the evaluations between steps 900 and 990, 500 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/nla-qwen3-8b --chat \
    --text "I'm applying for a nursing job at a children's hospital and I need help with my cover letter. I have two years of ICU experience at a large teaching hospital, I'm certified in pediatric advanced life support, and I've trained three new nurses on our unit. The posting asks for someone who stays calm under pressure and communicates well with families. Can you help me write a cover letter that highlights these points?"

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; with --chat the last token of the message is read):

$ python scripts/hf_quickstart.py --nla asher577/nla-qwen3-8b --chat \
    --text "I'm applying for a nursing job at a children's hospital and I need help with my cover letter. I have two years of ICU experience at a large teaching hospital, I'm certified in pediatric advanced life support, and I've trained three new nurses on our unit. The posting asks for someone who stays calm under pressure and communicates well with families. Can you help me write a cover letter that highlights these points?"

subject Qwen/Qwen3-8B layer 24: token 85 of 91 = '?', |x| = 197.6

EXPLANATION
The model must produce a polished cover letter for a marketing role, so its next move is to open with a structured, professional template rather than free-form prose.

The user's request is narrow and specific: a marketing cover letter, which means the model should lean on marketing-relevant language—audience, campaigns, analytics, ROI—rather than generic job-letter filler.

The user supplied no personal details, so the model must either ask for them or invent placeholders, a tension it should resolve by offering a customizable draft.

The user's own phrasing is casual and slightly ungrammatical, signaling a non-native or hurried writer, so the model should keep tone approachable while maintaining professionalism.

The model should honor the "polished" demand by using formal salutation, body paragraphs, and a closing, avoiding the informal register the user used.

The model likely aims to include a hook about passion for marketing, a skills summary, and a call to action, standard letter sections.

The model may offer to tailor the letter to the user's actual experience, since the request lacks concrete credentials.

Grammatically, the model is poised to begin a fresh response, probably a greeting or a brief acknowledgment of the request before delivering the letter body. The immediate token is the start of a coherent reply to the truncated prompt ending on the question mark after "Could you help me with that? Please help me with that? Please help me with that?."

reconstruction: cosine 0.940, FVE 0.787 (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/nla-qwen3-8b

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