Skip to content

Commit

Permalink
fix: Correctly load SAE Bench TopK SAEs (#308)
Browse files Browse the repository at this point in the history
  • Loading branch information
adamkarvonen authored Oct 3, 2024
1 parent 799ce00 commit 4fb5bbe
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion sae_lens/toolkit/pretrained_sae_loaders.py
Original file line number Diff line number Diff line change
Expand Up @@ -422,7 +422,7 @@ def get_dictionary_learning_config_1(config: dict[str, Any]) -> dict[str, Any]:

hook_point_name = f"blocks.{trainer['layer']}.hook_resid_post"

activation_fn_str = "topk" if "topk" in config.get("path", "") else "relu"
activation_fn_str = "topk" if trainer["dict_class"] == "AutoEncoderTopK" else "relu"
activation_fn_kwargs = {"k": trainer["k"]} if activation_fn_str == "topk" else {}

return {
Expand Down

0 comments on commit 4fb5bbe

Please sign in to comment.