Downloads · 30 days
0
enjalot/sae-all-MiniLM-L6-v2-stagej-49K
sae-all-MiniLM-L6-v2-stagej-49K is a machine learning model from enjalot. Use it for the machine learning task on the model card, and read the license before you ship it in a product.
A 49,152-feature Matryoshka sparse autoencoder on pooled sentence-transformers/all-MiniLM-L6-v2 embeddings (384-d) — interpretability for the small, fast, extremely widely used workhorse embedding model. It mirrors th…
Downloads · 30 days
0
Access
Public
Updated Jul 11, 2026
Repo size
151 MB
Likes
0
Public
Click a slice to open those files.
.safetensors151 MB · 100%
From the Hugging Face model README
A 49,152-feature Matryoshka sparse autoencoder on pooled
sentence-transformers/all-MiniLM-L6-v2
embeddings (384-d) — interpretability for the small, fast, extremely widely used workhorse
embedding model. It mirrors the jina-v5-nano "Stage J" recipe (Matryoshka nesting, k=64, 128×
overcompleteness) and is the successor to the older
enjalot/sae-all-MiniLM-L6-v2-FineWeb-RedPajama-Pile-150M
TopK SAEs (1.5K–3K latents): ~16–32× more features with far better utilization (2.9% dead).
This card follows a standing house rule: every quantitative claim ships with its baseline, its confidence interval, and the number of seeds behind it. Where an artifact has no CI, we say so instead of inventing one.
| SAE type | Matryoshka (nested TopK levels) |
| Input dim | 384 (pooled all-MiniLM-L6-v2) |
| Latents | 49,152 (128× expansion) |
| Nested levels | 512 / 2,048 / 8,192 / 49,152 |
| Per-level k | 8 / 16 / 32 / 64 |
| Active features at inference | 64 (largest level; Sae.encode default) |
| Training | batch 1024, LR warmup 2,000 steps, AMP, unit-norm decoder, b_dec data init, grad clip, parallel-grad removal, auxk off |
| Seeds | 1 training seed (data seed 42) — see seed-stability caveat below |
| Checkpoint | sae_matryoshka_64_128.pooled (final, ~300K steps), subfolder 64_128/ |
English 3-corpus mix of ~120-token chunks embedded with all-MiniLM-L6-v2 (default encode()
document embeddings, no prompts — MiniLM has no prompt convention):
153,373,857 unique chunk embeddings (≈18.4B source tokens at ~120 tokens/chunk), replayed 2× → 306,747,392 training samples (~300K steps at batch 1024). Trained in 5.7 h on one RTX 5090.
Feed the SAE plain model.encode(texts) all-MiniLM-L6-v2 embeddings — the same distribution it was
trained on. There is no query/document prompt asymmetry for MiniLM (unlike our jina-v5-nano Stage J
release, where queries take a "Query: " prefix). All evals below are self-consistent in this
default embedding space.
Held-out eval (200K-row tail of a FineWeb shard, 1 seed):
| nested level (k) | FVU |
|---|---|
| 512 (k=8) | 0.534 |
| 2,048 (k=16) | 0.364 |
| 8,192 (k=32) | 0.225 |
| 49,152 (k=64, full) | 0.139 |
Full level: FVU 0.139, L0 = 64, 2.9% dead (47,703 of 49,152 features live). Monotonic per-level FVU confirms the Matryoshka nesting behaves correctly. Reconstruction matches jina Stage J (~0.13) at half the feature count on a 2× smaller embedding.
All intervention CIs are 95% percentile bootstrap over queries; controls are m random live features and m frequency-matched random features. This checkpoint, 1 training seed. Faithfulness covers 2 datasets; the necessity/sufficiency/steering triad is SciFact-only for this model (it replicates the pattern established on jina Stage J across 2 datasets).
Faithfulness (does the SAE preserve retrieval?):
| dataset | raw nDCG@10 | SAE recon | recovered | sparse-code-only |
|---|---|---|---|---|
| SciFact (n=300) | 0.654 | 0.577 | 88.2% | 0.535 (82%) |
| TREC-COVID (n=50, full 171,332-doc corpus, exp gain) | 0.445 | 0.468 | 105.3% | 0.454 (102%) |
Point estimates (no CI in the artifact). TREC-COVID uses the 2026-07 corrected harness (exponential nDCG gain, full corpus — the pre-correction capped harness read 0.592 raw and is void); recon > raw is the known SAE-as-denoiser effect, also seen on jina Stage J.
Necessity (ablate the query's relevance-distinctive features; SciFact):
| space / ablation | m | Δ nDCG distinctive [95% CI] | random | freq-matched |
|---|---|---|---|---|
| sparse (largest-level) | 5 | −0.048 [−0.086, −0.012] | +0.000 | +0.002 |
| sparse (largest-level) | 10 | −0.079 [−0.125, −0.036] | −0.000 | −0.002 |
| sparse (largest-level) | 25 | −0.087 [−0.134, −0.039] | −0.001 | −0.004 |
| dense (full-level) | 50 | −0.316 [−0.369, −0.259] | −0.001 | −0.017 |
Sparse-space effect saturates to ≈0 at m=50 (ranked list runs past the truly distinctive features). "Full-level" = level-aware matryoshka ablation (zero the feature at every nested level).
Sufficiency (keep ONLY the top-m distinctive features of the query's 64-feature code; fraction of full-code pool nDCG recovered, pool_k=100, SciFact):
| m | distinctive-only [95% CI] | random | freq-matched |
|---|---|---|---|
| 5 | 1.012 [0.936, 1.105] | 0.085 | 0.098 |
| 10 | 1.167 [1.091, 1.255] | 0.081 | 0.099 |
| 25 | 1.262 [1.189, 1.351] | 0.085 | 0.057 |
5–10 features recover ≈1.0–1.17× of full-code retrieval vs ≈0.06–0.10 controls (recovery >1 is oracle-selection denoising: masking distractor features helps).
Steering (push queries along decoder directions; 60 features, top-10 lift, SciFact):
| α | steer [95% CI] | random dirs |
|---|---|---|
| 1 | +0.040 [+0.022, +0.060] | |Δ| < 0.001 |
| 2 | +0.081 [+0.054, +0.109] | |Δ| < 0.001 |
| 4 | +0.102 [+0.076, +0.132] | |Δ| < 0.002 |
Monotonic dose-response, all CIs exclude zero, random-direction controls ≈0.
Cross-model note: this model passing the full necessity + sufficiency + steering triad replicates the jina Stage J causal result on a second embedding model; the 3-seed necessity replication (−0.130 to −0.155, all CIs exclude 0) was run on a companion vanilla-TopK jina SAE, not on this checkpoint.
Across retrainings with different seeds, only ~11% of features of a comparable dense SAE reproduce as near-twins (decoder cosine ≥0.7, exact 1-1 bipartite matching, 3 seeds of a companion jina 24K SAE; not yet measured for this MiniLM run). Trust aggregates and validated features, not individual feature indices.
A full shingle scan of the 162.5M-chunk training universe (including these exact chunked-120 corpora) against BEIR found real but metric-neutral contamination: verbatim full-abstract copies for 0.8–1.4% of SciFact docs and ~0.9% of TREC-COVID docs (Pile is the main source). Rescoring with contaminated docs excluded moves every nDCG@10 by < 0.005, so numbers are reported unadjusted with this caveat.
Requires the GitHub version of latentsae (Matryoshka support is not in the PyPI 0.1.3 release):
# pip install git+https://github.com/enjalot/latent-sae
from latentsae import Sae
from sentence_transformers import SentenceTransformer
sae = Sae.load_from_hub("enjalot/sae-all-MiniLM-L6-v2-stagej-49K", "64_128")
model = SentenceTransformer("sentence-transformers/all-MiniLM-L6-v2")
emb = model.encode(
["Hello world", "Sparse autoencoders decompose embeddings"],
convert_to_tensor=True,
)
features = sae.encode(emb)
print(features.top_indices) # which of the 49,152 features fired (64 per input)
print(features.top_acts) # how strongly
recon = sae.decode(features.top_acts, features.top_indices) # back to 384-d
Trained 2026-06-20 with enjalot/latent-sae
(run minilm_l6_stagej_49K_oldrecipe_replay2_k64); labeling 2026-06-21, causal triad 2026-07-01,
TREC-COVID harness correction 2026-07-01. Sibling release:
enjalot/sae-jina-v5-nano-multilingual-98K.