BSF: block-sparse featurizer (Qwen3-8B, layer 24)
A sparse dictionary for the layer-24 residual stream of Qwen3-8B whose atoms are 64-dimensional subspaces ("blocks") rather than single directions: 2,048 blocks x 64 dimensions. Each token activates its top 16 blocks, with a signed 64-dimensional code in each. It is the dictionary the Subspace NLA reads.
Files
| path | contents |
|---|---|
ae.pt |
state dict (encoder, decoder, decoder bias, block structure, act_scale, selection bias) |
config.json |
training configuration |
Model
- Input: residual stream at the output of decoder layer 24 of Qwen/Qwen3-8B (
hidden_states[25]in Hugging Face numbering), d = 4096, divided byact_scale= 262.59. - Encoding: each block's code
z_gis a linear encoding of the centred inputx / act_scale - b_dec. The 16 blocks with the largest|z_g| + tau_gare kept, wheretau_gis a learned per-block selection bias stored in the checkpoint; it changes which blocks are chosen, not their codes. - Reconstruction:
x_hat = act_scale * (b_dec + sum_g D_g z_g)over the active blocksg, withD_gthe block's 4096 x 64 decoder andz_gits code.act_scale * D_g z_gis the block's component ofx. - Fit: per-token FVE about 0.85 (0.95 pooled over tokens, a figure dominated by a few high-norm tokens). 1,927 of the 2,048 blocks are in use.
- Training: about 100M tokens of FineFineWeb, 50,000 steps, learning rate 5e-5, plain MSE, with Gaussian noise of
0.1 times the input's standard deviation added to the encoder input (a denoising objective). A dead-zone controller adjusts
tau_gso that blocks firing on more than 50% of tokens are handicapped and blocks firing on fewer than 1 in 10,000 are boosted.
Loading
Code: the nla repository shared with these weights (featurizers/bsf_sae.py defines the model). Install it
from the repository root with pip install -e . einops.
from huggingface_hub import snapshot_download
from nla.subspace_nla import load_subspace_sae, extract_components
bsf = load_subspace_sae(snapshot_download("asher577/bsf-qwen3-8b-l24")) # featurizers/bsf_sae.py::BlockSparseSAE
parts = extract_components(bsf, acts, top_k=None) # acts: [B, 4096] raw layer-24 activations
# parts[i] = [{"feature": block id, "coeff": |z_g|, "contribution": act_scale * D_g z_g}, ...], largest first
- Downloads last month
- 56
Inference Providers NEW
This model isn't deployed by any Inference Provider. ๐ Ask for provider support