SAE (sparse autoencoder) interpretability for local models doing real agentic work — built around Hermes Agent, running on consumer hardware.
The core artifact is an OpenAI-compatible serving layer with SAE forward hooks:
the exact same model.generate() call that produces the agent's output also
yields the SAE feature activations over the residual stream. The transcript
tells you what the agent said; the feature trace tells you what the model was
doing internally while it said it.

If you label or trace with one model instance and then re-run the text through a hooked model to get SAE features, you have two inferences — and activations can diverge (sampling, KV state, device placement). That is unfaithful. Here, forward hooks are registered on the decoder layers of the one call that serves the agent:
out_ids → decode → the agent's outputBoth derive from one forward pass / one KV cache, written into one record.
meta.same_inference == True is asserted per row, and gen_text has been
verified byte-identical between the engine-direct and HTTP-server paths.
B1_REAL_27B_REPORT_2026_07_20.md.2026-07-19-agent-integrated-sae-capture/../setup_cpu_test.sh qwen25b. See validation_cpu/.git clone https://github.com/SolshineCode/hermes-sae
cd hermes-sae
./setup_cpu_test.sh qwen25b # fetches model + released SAE, runs a hooked capture
For the minimal standalone probe (any HF model + matching SAE, live per-token
feature stream in ~130 lines), see probe-demo/.
To serve a hooked model to Hermes Agent (or any OpenAI-compatible client):
sae_serve.py exposes /v1/chat/completions and writes a feature-trace JSONL
sidecar per request. Point Hermes at it as a custom provider — the recipe is in
2026-07-19-agent-integrated-sae-capture/LOCAL_MODEL_IN_HERMES_AGENT.md.
| Path | What it is |
|---|---|
hermes-plugin/sae_trace/ | Hermes Agent observability plugin: correlates agent turns with SAE feature traces (standalone install; also proposed upstream) |
sae_serve.py | OpenAI-compatible serving layer with SAE hooks + JSONL sidecar |
probe-demo/ | Minimal standalone probe (one file, one command) |
2026-07-19-agent-integrated-sae-capture/ | Local model as the Hermes Agent model, with capture + analysis |
sae_labeled_course.py, labeler_service.py | Same-inference SAE + labeling instrument (the original course) |
fast_dpilot_sep.py, analyze_dpilot_separability.py | Separability analyzers (rank-AUC, permutation p, BH-FDR) |
B1_REAL_27B_REPORT_2026_07_20.md | The 27B separability result, in full |
FALSIFIABLE_CLAIM_DESIGN.md | Pre-registered claims + null-result conditions (written before data) |
FABLE5_AUDIT.md | Independent adversarial audit of an earlier pipeline version — kept public; the fixes it forced are in the current analyzers |
validation_cpu/, validation_real_27B/ | Replication artifacts |
nous/ | Writeup + figures for the Nous Research / Hermes Agent community |
FABLE5_AUDIT.md) found them, and the
current analyzers are the post-audit redesign. The audit stays in the repo on
purpose.Hardware context: the 27B results ran on a used Dell T7610 with 2× Tesla M40 24GB (< $200 of GPU); the agent-integrated capture ran on a ThinkPad's 4 GB GTX 1650 Ti; the replication path needs no GPU at all. That's what these results happened to run on, not a requirement — the capture path runs wherever your model runs (CPU-only, one consumer GPU, Apple Silicon, or a multi-GPU box), and the plugin side is pure file I/O with no GPU or torch dependency. This is deliberately a consumer/homelab-grade instrument.
MIT — see LICENSE.
34 commits
Python
83.3%
Shell
8.7%
HTML
7.9%
SAE (sparse autoencoder) interpretability for local models doing real agentic work — built around Hermes Agent, running on consumer hardware.
The core artifact is an OpenAI-compatible serving layer with SAE forward hooks:
the exact same model.generate() call that produces the agent's output also
yields the SAE feature activations over the residual stream. The transcript
tells you what the agent said; the feature trace tells you what the model was
doing internally while it said it.

If you label or trace with one model instance and then re-run the text through a hooked model to get SAE features, you have two inferences — and activations can diverge (sampling, KV state, device placement). That is unfaithful. Here, forward hooks are registered on the decoder layers of the one call that serves the agent:
out_ids → decode → the agent's outputBoth derive from one forward pass / one KV cache, written into one record.
meta.same_inference == True is asserted per row, and gen_text has been
verified byte-identical between the engine-direct and HTTP-server paths.
B1_REAL_27B_REPORT_2026_07_20.md.2026-07-19-agent-integrated-sae-capture/../setup_cpu_test.sh qwen25b. See validation_cpu/.git clone https://github.com/SolshineCode/hermes-sae
cd hermes-sae
./setup_cpu_test.sh qwen25b # fetches model + released SAE, runs a hooked capture
For the minimal standalone probe (any HF model + matching SAE, live per-token
feature stream in ~130 lines), see probe-demo/.
To serve a hooked model to Hermes Agent (or any OpenAI-compatible client):
sae_serve.py exposes /v1/chat/completions and writes a feature-trace JSONL
sidecar per request. Point Hermes at it as a custom provider — the recipe is in
2026-07-19-agent-integrated-sae-capture/LOCAL_MODEL_IN_HERMES_AGENT.md.
| Path | What it is |
|---|---|
hermes-plugin/sae_trace/ | Hermes Agent observability plugin: correlates agent turns with SAE feature traces (standalone install; also proposed upstream) |
sae_serve.py | OpenAI-compatible serving layer with SAE hooks + JSONL sidecar |
probe-demo/ | Minimal standalone probe (one file, one command) |
2026-07-19-agent-integrated-sae-capture/ | Local model as the Hermes Agent model, with capture + analysis |
sae_labeled_course.py, labeler_service.py | Same-inference SAE + labeling instrument (the original course) |
fast_dpilot_sep.py, analyze_dpilot_separability.py | Separability analyzers (rank-AUC, permutation p, BH-FDR) |
B1_REAL_27B_REPORT_2026_07_20.md | The 27B separability result, in full |
FALSIFIABLE_CLAIM_DESIGN.md | Pre-registered claims + null-result conditions (written before data) |
FABLE5_AUDIT.md | Independent adversarial audit of an earlier pipeline version — kept public; the fixes it forced are in the current analyzers |
validation_cpu/, validation_real_27B/ | Replication artifacts |
nous/ | Writeup + figures for the Nous Research / Hermes Agent community |
FABLE5_AUDIT.md) found them, and the
current analyzers are the post-audit redesign. The audit stays in the repo on
purpose.Hardware context: the 27B results ran on a used Dell T7610 with 2× Tesla M40 24GB (< $200 of GPU); the agent-integrated capture ran on a ThinkPad's 4 GB GTX 1650 Ti; the replication path needs no GPU at all. That's what these results happened to run on, not a requirement — the capture path runs wherever your model runs (CPU-only, one consumer GPU, Apple Silicon, or a multi-GPU box), and the plugin side is pure file I/O with no GPU or torch dependency. This is deliberately a consumer/homelab-grade instrument.
MIT — see LICENSE.
34 commits
Python
83.3%
Shell
8.7%
HTML
7.9%