Steering-first neuron explorer for Qwen3.5-4B: push every MLP neuron, keep every rollout, browse the results
翻譯準備中
開發工具Python · JavaScriptGitHub @lyramakesmusic自行安裝營運者未確認
試用過了嗎? 點一下就好,不需要登入。
尚未偵測到更新。GitHub 發布版本後會顯示在這裡。
個人 GitHub 帳號下公開儲存庫的擁有者可以登入並驗證所有權,自行管理介紹,無需管理員核准。
登入並產生驗證檔案,在 30 分鐘內將其提交至此儲存庫的預設分支。其他分支或分叉儲存庫中的檔案無效。然後在下方檢查檔案,即可無需管理員核准直接管理專案。請保留檔案以維持管理權限。
如需登入,將前往登入頁面。登入後請回到此處,再次點擊所選的驗證按鈕。
安裝型專案無需部署網域也可驗證。個人儲存庫可透過 GitHub 登入驗證,組織儲存庫可使用上方的儲存庫驗證檔案。
製作者的介紹僅有上面的一句話。 更多詳情請閱讀儲存庫 README。 儲存庫 README ↗
正在載入完整 README。
檢視完整 README ↗Steering-first neuron explorer for Qwen3.5-4B. Every MLP neuron in a layer is pushed up and down on a few prompts, every rollout is kept, and the explorer lays the results out over a 3D view of the model.
uv sync
uv run python explorer/server.py # http://localhost:8791
Reads sweep runs from runs/ and per-layer stats from stats/, both produced by the sweep below; the caches in
explorer/cache/ ship with the repo. Loads Qwen3.5-4B locally (MPS, CUDA or CPU) for live
steered chat, lens, connections and live inference over your own text.
writes places
neurons with similar down-projection columns next to each other.lens searches the steer and logit
lenses for a token, fires runs your text through the model and filters neurons by activation.explorer/static/i18n.js.claude CLI (installed and
logged in) with the explorer as an MCP server (explorer/agent_mcp.py). It reads neurons, cones and lenses, runs the
live model (steering, activations, next-token logprobs, ablations), moves the map, list and highlights, and has file
tools and a shell in your home folder. Its prompt is explorer/agent_prompt.md plus explorer/agent_methodology.md, and
explorer/agent_prompt.local.md when present (untracked, for your own additions);
EXPLORER_CLAUDE_MODEL picks the model. The server answers only pages and tools on this machine.Runs on a CUDA 13 GPU pod with the steering fork of vLLM (RhizoNymph/vllm).
bash sweep/setup_pod.sh # fork, deps, model; writes /workspace/env.sh
python sweep/neuron_stats.py --layers 22 --tokens 2000000 --out stats/q35-4b
python sweep/steer_sweep.py --stats stats/q35-4b_L22.npz --design main_rel --dose-unit rel \
--neurons all --random-controls 256 --run q35-4b-L22
sweep/run_depth.sh "4 9 13 17" 384 64 # random-subset sweep across several layers
main_rel doses are fractions of the median residual norm leaving the layer: {who, snake, orange} × {−0.7, +0.5, +0.8}
and {free} × {+3}, plus one unsteered baseline per prompt.
| script | output |
|---|---|
sweep/neuron_stats.py | per-neuron activation extremes by sign regime, down columns, residual norms |
sweep/steer_sweep.py | runs/<run>.jsonl: text, token ids, logprobs, top-k per step; optional activation captures |
sweep/rank.py | runs/<run>.units.jsonl: distinctive words, cluster mass, percentile against controls |
sweep/steer_lens.py | stats/steer_lens_L{l}.npz: next-token Δlogprob and KL for ±0.8 pushes on every neuron |
sweep/depth_report.py | runs/depth_report.json: per-layer share of neurons above controls, coherence, top units |
sweep/shift.py | word-shift score against controls, all words counted |
sweep/merge_runs.py | joins sharded runs of one layer |
sweep/check_equivalence.py | HF vs vLLM steering and capture agreement |
sweep/bench.py, sweep/peek.py | throughput conditions; terminal views of a run |
explorer/build_embeddings.py | runs/<run>.umap.json |
explorer/build_layout.py | explorer/cache/layout_writes.npz |
explorer/build_connections.py | explorer/cache/connections.npz: each neuron's 24 strongest direct-path links up and down |
sweep/capture_prefill.py | captures/<run>.mlp_in.npy: MLP input at the last prompt token at the run's capture layers, steered |
research_log.md holds the findings and reasoning; NOTES.md the source notes.
MIT, see LICENSE.