Skip to content

Commit

Permalink
add @torch.no_grad to extract_hiddens
Browse files Browse the repository at this point in the history
  • Loading branch information
AlexTMallen committed Mar 15, 2023
1 parent 2c6a10a commit d50876e
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions elk/extraction/extraction.py
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,7 @@ def __post_init__(self, layer_stride: int):
self.layers = tuple(range(0, config.num_hidden_layers, layer_stride))


@torch.no_grad()
def extract_hiddens(
cfg: ExtractionConfig,
*,
Expand Down

0 comments on commit d50876e

Please sign in to comment.