Skip to content

Commit a37ea8f

Browse files
committed
Update descriptions
1 parent 00e8070 commit a37ea8f

File tree

2 files changed

+9
-9
lines changed

2 files changed

+9
-9
lines changed

README.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88

99
Alex Tamkin, Mohammad Taufeeque and Noah D. Goodman: "Codebook Features: Sparse and Discrete Interpretability for Neural Networks", 2023. [[arXiv]](https://arxiv.org/abs/2310.17230)
1010

11-
<img width="989" alt="header-old" src="https://github.com/taufeeque9/codebook-features/assets/46495671/c84ce44e-aa7b-4d44-869c-0745ed6ee9f8">
11+
<img alt="header-old" src="https://github.com/taufeeque9/codebook-features/assets/46495671/ba0c31e5-4983-4504-ad02-9f8208d9396d">
1212

1313

1414
Codebook Features is a method for training neural networks with a set of learned sparse and discrete hidden states, enabling interpretability and control of the resulting model.
@@ -65,7 +65,7 @@ python -m streamlit run codebook_features/webapp/Code_Browser.py -- --cache_dir
6565

6666
### Code Intervention
6767

68-
To control a network, one can _intervene_ on codes by causing them to always be activated during the forward pass. This can be useful to influence the sampled generations, e.g., to cause the network to discuss certain topics. For a general tutorial on using codebook models and seeing how you can perform code intervention, please see the [Code Intervention Tutorial](https://github.com/alextamkin/codebook-features/blob/main/tutorials/code_intervention.ipynb).
68+
To control a network, one can _intervene_ on codes by causing them to always be activated during the forward pass. This can be useful to influence the sampled generations, e.g., to cause the network to discuss certain topics. For a general tutorial on using codebook models and seeing how you can perform code intervention, please see the [Code Intervention Tutorial](https://github.com/taufeeque9/codebook-features/blob/main/tutorials/code_intervention.ipynb).
6969

7070

7171
<details>
@@ -98,7 +98,7 @@ The `codebook_features/train_fsm_model.py` script can be used to train a codeboo
9898

9999

100100

101-
For tutorials on how to use the library, please see the [Codebook Features Tutorials](https://github.com/alextamkin/codebook-features/tree/main/tutorials).
101+
For tutorials on how to use the library, please see the [Codebook Features Tutorials](https://github.com/taufeeque9/codebook-features/tree/main/tutorials).
102102

103103
</details>
104104

codebook_features/webapp/Code_Browser.py

+6-6
Original file line numberDiff line numberDiff line change
@@ -191,12 +191,12 @@
191191

192192
st.markdown("## Code Search")
193193
code_search_desc = (
194-
"If you want to find whether the codebooks model has captured a relevant features from the data,"
195-
" you can specify a regex pattern for your feature and find whether any code activating on the regex pattern"
196-
" exists. The first group in the regex pattern is the token that the code activates on. If the group contains"
197-
" multiple tokens, we search for codes that will activate on the first token in the group followed by the"
198-
" subsequent tokens in the group. For example, the search term 'New (York)' will try to find codes that"
199-
" activate on the bigram feature 'New York' at the York token."
194+
"To find whether the codebooks model has captured a relevant feature from the data (e.g. pronouns),"
195+
" you can specify a regex pattern for your feature (e.g. “he|she|they”) and find whether any code"
196+
" activating on the regex pattern exists.\n\n"
197+
"Since strings can contain several tokens, you can specify the token you want a code to fire on by"
198+
" using a capture group. For example, the search term New (York) will try to find codes that"
199+
" activate on the bigram feature New York at the York token"
200200
)
201201

202202
if st.checkbox("Search with Regex"):

0 commit comments

Comments
 (0)