Skip to content

Commit

Permalink
Update logits_lens_with_features.ipynb
Browse files Browse the repository at this point in the history
when load `sae` through `SAE.from_pretrained`, `sae_id` should change with `layer` not always `blocks.0.hook_resid_pre`
  • Loading branch information
Geaming2002 authored Jan 17, 2025
1 parent 0430059 commit 6ba318c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion tutorials/logits_lens_with_features.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@
"for layer in range(12):\n",
" sae, original_cfg_dict, sparsity = SAE.from_pretrained(\n",
" release=\"gpt2-small-res-jb\",\n",
" sae_id=\"blocks.0.hook_resid_pre\",\n",
" sae_id=f\"blocks.{layer}.hook_resid_pre\",\n",
" device=\"cpu\",\n",
" )\n",
" gpt2_small_sparse_autoencoders[f\"blocks.{layer}.hook_resid_pre\"] = sae\n",
Expand Down

0 comments on commit 6ba318c

Please sign in to comment.