SAE: wire up MiniLM Stage-J 49K (Matryoshka) end to end - #157
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 3a45c221e7
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| "outlines>=0.1,<1", | ||
| "nltk>=3.8,<4", | ||
| "latentsae>=0.1.3,<1", | ||
| "latentsae>=0.2.0,<1", |
There was a problem hiding this comment.
Update uv.lock with the latentsae floor
This raises the runtime requirement to latentsae>=0.2.0 for the new Matryoshka SAE path, but the committed uv.lock was not regenerated: it still pins the latentsae package to 0.1.3 and still records the project dependency as >=0.1.3,<1 (uv.lock lines 2947-2973 and 3048). Any environment installed from the committed lock will miss the Matryoshka support that this commit relies on, so ls-sae for the new MiniLM entry can fail despite pyproject.toml advertising the newer dependency.
Useful? React with 👍 / 👎.
- register enjalot/sae-all-MiniLM-L6-v2-stagej-49K (64_128) in the SAE map - fix Explore's exact-key SAE lookup: ScopeContext now uses the same prefix-tolerant getSaeForModel() as Setup, so transformers-/huggingface- prefixed embedding ids resolve (previously features silently never loaded) - parameterize the latent-taxonomy feature deep-link (was hardcoded to NOMIC_FWEDU_25k) via the new saeEntry exposed by ScopeContext - bump latentsae to >=0.2.0 (0.1.3 cannot load Matryoshka checkpoints) - fix stale ls-sae default repo id (10BT -> 100BT, matching the registry) Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
- Setup/Sae.jsx no longer blindly attaches saes[0]: runs are filtered by embedding_id AND SAE model_id, so a nomic run can't get attached to a MiniLM scope (and vice versa) now that the registry has two entries - uv.lock regenerated for latentsae 0.2.0 (now on PyPI) Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
3a45c22 to
dd56595
Compare
|
Updates:
|
…ken-maps Both sides had wired MiniLM labels and fixed the taxonomy deep-link independently; resolved to main's getSaeForModel registry style with the token-scope additions on top (scope-declared SAEs resolve links/labels by the SAE's own model repo via saeLabels). FeatureModal keeps the activation-ranking fix alongside main's saeEntry link. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
What
Makes the newly published
enjalot/sae-all-MiniLM-L6-v2-stagej-49K(Matryoshka, nested 512/2048/8192/49152, k=64) usable in latent-scope for any dataset embedded withall-MiniLM-L6-v2, and fixes two latent bugs found along the way.Changes
web/src/lib/SAE.js— live registry entry for the MiniLM Stage-J SAE (64_128, label parquet served by the latent-taxonomy site, same pattern as nomic).web/src/contexts/ScopeContext.jsx— Explore previously looked up SAEs by exactsaeAvailable[model_id]while Setup used the prefix-tolerantgetSaeForModel(). Atransformers-/huggingface--prefixed embedding id could pass Setup and then silently load no features in Explore. Both paths now usegetSaeForModel(). Also exposes the matchedsaeEntryin context.web/src/components/Explore/FeatureModal.jsx— the latent-taxonomy deep link was hardcoded toNOMIC_FWEDU_25k; it now uses the scope's SAE registry label (falls back to nomic).pyproject.toml—latentsae>=0.2.0,<1; 0.1.3 cannot load Matryoshka checkpoints (cfg.jsoncarriesmatryoshka_*fields).latentscope/scripts/sae.py— stale default repo id…-10BT→…-100BT(matches the registry and the actually-published repo).../lib/SAEupdated to exportgetSaeForModel.Testing
npm test: 103/103 pass (the two context suites failed before the mock update, all green after).npm run production: builds clean;npm run lint: 0 errors (49 pre-existing warnings, none introduced).Sae.load_from_hub('enjalot/sae-all-MiniLM-L6-v2-stagej-49K', '64_128', 'cpu')→num_latents=49152,encode()returns[batch, 64]top_acts/top_indices — exactly the callsls-saemakes. The ColBERT token repo (32_512) also loads and encodes with the same package version (L0 ≈ 32).Notes
…/models/MINILM_STAGEJ_49K/features.parquet) goes live when the latent-taxonomy multi-model site deploys; until then Explore fetches 404 for MiniLM scopes (nomic unaffected). The parquet's column order matches the positional parsing inapiService.getFeatures(verified: identical schema to the nomic file).web/src/components/FilterDataTable.jsx(root, notExplore/) contains a stale copy of FeatureModal with the same hardcoded link but appears to be imported nowhere; left untouched.🤖 Generated with Claude Code