Skip to content

Commit

Permalink
replace slicing
Browse files Browse the repository at this point in the history
  • Loading branch information
lauritowal committed Aug 11, 2023
1 parent cc095cb commit af4c9d1
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions elk/extraction/extraction.py
Original file line number Diff line number Diff line change
Expand Up @@ -194,7 +194,7 @@ def extract_hiddens(
seed=cfg.seed,
)

layer_indices = cfg.layers or tuple(range(model.config.num_hidden_layers)[1:])
layer_indices = cfg.layers or tuple(range(1, model.config.num_hidden_layers))

global_max_examples = cfg.max_examples[0 if split_type == "train" else 1]

Expand Down Expand Up @@ -366,7 +366,7 @@ def hidden_features(cfg: Extract) -> tuple[DatasetInfo, Features]:
if num_dropped:
print(f"Dropping {num_dropped} non-multiple choice templates")

layer_indices = cfg.layers or tuple(range(model_cfg.num_hidden_layers)[1:])
layer_indices = cfg.layers or tuple(range(1, model_cfg.num_hidden_layers))
layer_cols = {
f"hidden_{layer}": Array3D(
dtype="int16",
Expand Down

0 comments on commit af4c9d1

Please sign in to comment.