Update README.md
Browse files
README.md
CHANGED
|
@@ -1,3 +1,34 @@
|
|
| 1 |
-
---
|
| 2 |
-
license: cc-by-nc-4.0
|
| 3 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
license: cc-by-nc-4.0
|
| 3 |
+
datasets:
|
| 4 |
+
- togethercomputer/RedPajama-Data-V2
|
| 5 |
+
base_model:
|
| 6 |
+
- meta-llama/Llama-3.1-8B-Instruct
|
| 7 |
+
---
|
| 8 |
+
|
| 9 |
+
# TopK Transcoder Based on Llama 3.1 8B Instruct
|
| 10 |
+
|
| 11 |
+
This repository provides the TopK transcoder checkpoints used in the paper [**“Verifying Chain-of-Thought Reasoning via Its Computational Graph”**](https://arxiv.org/abs/2510.09312).
|
| 12 |
+
The model is based on **Llama 3.1 8B Instruct** and trained with the TopK transcoder method described in the paper.
|
| 13 |
+
|
| 14 |
+
## Installation
|
| 15 |
+
|
| 16 |
+
To run the model, you need the Circuit Tracer library.
|
| 17 |
+
It can be installed from the project page:
|
| 18 |
+
|
| 19 |
+
https://github.com/zsquaredz/circuit-tracer
|
| 20 |
+
|
| 21 |
+
Note that this is a fork of the original library as they don't yet support TopK transcoder.
|
| 22 |
+
|
| 23 |
+
After installing the library, you can load and run the transcoder as shown below.
|
| 24 |
+
|
| 25 |
+
## Minimal Usage Example
|
| 26 |
+
|
| 27 |
+
```python
|
| 28 |
+
from circuit_tracer import ReplacementModel
|
| 29 |
+
import torch
|
| 30 |
+
|
| 31 |
+
# Load transcoders into a ReplacementModel
|
| 32 |
+
model = ReplacementModel.from_pretrained("meta-llama/Llama-3.1-8B-Instruct", "facebook/crv-8b-instruct-transcoders", dtype=torch.bfloat16)
|
| 33 |
+
```
|
| 34 |
+
Once you have loaded the model, you can perform attribution or intervention as shown in [this demo](https://github.com/safety-research/circuit-tracer/blob/main/demos/llama_demo.ipynb).
|