Skip to content

Code used for reverse-engineering a “Query-Gated Courier” circuit in Gemma-2-2B for role-gated retrieval.

Notifications You must be signed in to change notification settings

komikat/prep-gated-circuits

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Setup and Reproducibility Instructions

0. Python

Make sure you have python 3.11 installed.

1. Install dependencies with uv

First, ensure you have uv installed. You can install it via pip:

pip install uv

Then, install all dependencies specified in pyproject.toml and uv.lock:

uv pip install -r pyproject.toml

1.5

You might need to check the PyTorch compatibility with your CUDA version. Information available here: https://pytorch.org/get-started/

2. Launch Jupyter and run experiments

Start Jupyter Lab or Notebook:

uv run -- jupyter lab

or

uv run -- jupyter notebook

or You can also activate the virtualenv manually:

source .venv/bin/activate

and then run jupyter

Open experiments.ipynb and run all cells to reproduce the results.


Note: All dependencies are pinned in uv.lock, versions can be found in pyproject.toml.

About

Code used for reverse-engineering a “Query-Gated Courier” circuit in Gemma-2-2B for role-gated retrieval.

Topics

Resources

Stars

Watchers

Forks