Skip to content

Interpretability twin: load the deployed model.bin into brainscope - #16

Open
moudrkat wants to merge 1 commit into
slvDev:mainfrom
moudrkat:feat-brainscope-twin
Open

Interpretability twin: load the deployed model.bin into brainscope#16
moudrkat wants to merge 1 commit into
slvDev:mainfrom
moudrkat:feat-brainscope-twin

Conversation

@moudrkat

@moudrkat moudrkat commented Aug 6, 2026

Copy link
Copy Markdown

Dequantizes the exact int4 artifact deploy.sh flashes (not the training checkpoint) into a transformers-loadable twin and serves it live in brainscope — logit lens, attention, per-layer activity. Verified against runtime/llm.h: max logit diff 8e-6 on a fixed prompt, the same tolerance verify.c holds the C port to, plus KV-cache parity (brainscope_adapter/verify_vs_c.py, with a small C driver reusing llm.h unmodified).

Everything is additive — one new directory, no existing file touched. brainscope itself is untouched too: the PLE architecture registers with transformers in-process.

Bonus: build_hf.py --zero-ple-table builds a 'flash unplugged' ablation — the 25M flash-resident parameters zeroed, the storyteller collapsing to a loop. A direct, visible demo of what the PLE table contributes; extract_direction.py adds a story-mood steering direction from contrast pairs.

Demo video/post coming — will link here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant