Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fit reporters on input embeddings as a sanity check #209

Merged
merged 4 commits into from
Apr 25, 2023
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Handle layer_stride correctly
  • Loading branch information
norabelrose committed Apr 22, 2023
commit 43da44ef9bcc028e76833f9faac2ccc5d8f77b45
2 changes: 1 addition & 1 deletion elk/extraction/extraction.py
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ def __post_init__(self, layer_stride: int):
PretrainedConfig, AutoConfig.from_pretrained(self.model)
)
# Note that we always include 0 which is the embedding layer
layer_range = range(0, config.num_hidden_layers, layer_stride)
layer_range = range(1, config.num_hidden_layers + 1, layer_stride)
self.layers = (0,) + tuple(layer_range)

def explode(self) -> list["Extract"]:
Expand Down