Instructions to use stube123890/MindReader-7B-v2 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- PEFT
How to use stube123890/MindReader-7B-v2 with PEFT:
from peft import PeftModel from transformers import AutoModelForCausalLM base_model = AutoModelForCausalLM.from_pretrained("Qwen/Qwen2.5-Coder-7B-Instruct") model = PeftModel.from_pretrained(base_model, "stube123890/MindReader-7B-v2") - Notebooks
- Google Colab
- Kaggle
MindReader-7B-v2
A mechanistic-interpretability decompiler. Given a neural circuit's architecture metadata and behavioural activation signature β including attention_pattern_stats β it outputs a standalone, executable Python function circuit_logic(tokens: list[str]) -> dict that reproduces the circuit's algorithm.
Training
QLoRA fine-tune of Qwen/Qwen2.5-Coder-7B-Instruct (4-bit nf4, LoRA r=16, alpha=32, dropout 0.05, all projection modules) on 1,871 ChatML examples built from 567 causally verified circuits mined from 26 open-weights models. 3 epochs, lr 1e-4 cosine, completion-only loss, final loss 0.034 (from 1.781, 351 steps, ~4.2 h on a T4).
Blind evaluation
On 40 held-out circuits from 4 unseen architectures β meta-llama/Llama-3.2-1B, google/gemma-2-2b, allenai/OLMo-2-0425-1B-Instruct, stabilityai/stablelm-2-zephyr-1_6b (never in training):
| Suite | n | Contender | Exec % | Rule % | Fidelity % |
|---|---|---|---|---|---|
| Original 15 (v1 comparison) | 15 | Base Qwen2.5-Coder-7B | 100 | 100 | 100 |
| Original 15 | 15 | MindReader-7B-v2 Pass@1 | 100 | 100 | 100 |
| Original 15 | 15 | MindReader-7B-v2 + Causal MCTS Pass@4 | 100 | 100 | 100 |
| Full blind set | 40 | Base Qwen2.5-Coder-7B | 98 | 95 | 98 |
| Full blind set | 40 | MindReader-7B-v2 Pass@1 | 98 | 95 | 98 |
| Full blind set | 40 | MindReader-7B-v2 + Causal MCTS Pass@4 | 100 | 98 | 100 |
v1 scored 53% rule / 53% fidelity on the original suite, with induction and first_token_sink at 0%; in v2 both classes are at 100% for every contender β the attention_pattern_stats in the v2 signature carry the discriminating information. Causal MCTS (greedy rollout plus up to 3 sampled rollouts scored by the causal verifier, best selected) supplies the full-set lead; the one rule no contender identifies is copy_suppression (n=1), reproduced behaviourally at fidelity 1.0 but labelled induction.
v1 reference: on the 15-circuit Llama/Gemma suite, execution 100%, rule identification 53% (baseline 0%), behavioural fidelity pass 53% (baseline 20%). Known v1 limitation: induction and first-token-sink signatures on unseen tokenizers were systematically decompiled as previous-token programs β v2 adds attention_pattern_stats to the training signal specifically to fix this.
Files
This repo holds the full adapter weights (adapter_model.safetensors) plus tokenizer and config files. Load with PEFT on top of Qwen/Qwen2.5-Coder-7B-Instruct.
Links
- Code and project: https://github.com/stube123890-hue/MindReader
- Dataset: https://huggingface.co/datasets/stube123890/MindReader-10k
- Downloads last month
- 21