Skip to content

Commit

Permalink
Resolving diff base
Browse files Browse the repository at this point in the history
  • Loading branch information
Zheng Wang committed Jan 17, 2024
1 parent c91e986 commit 0c304cf
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions pyvene/models/interventions.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
from .basic_utils import sigmoid_boundary
from .intervention_utils import _do_intervention_by_swap


class Intervention(torch.nn.Module):

"""Intervention the original representations."""
Expand Down Expand Up @@ -53,7 +54,6 @@ def __init__(self, **kwargs):
self.shared_weights = True



class CollectIntervention(Intervention):

"""Collect activations."""
Expand Down Expand Up @@ -82,8 +82,8 @@ def forward(self, base, source=None, subspaces=None):

def __str__(self):
return f"CollectIntervention(embed_dim={self.embed_dim})"


class SkipIntervention(BasisAgnosticIntervention):

"""Skip the current intervening layer's computation in the hook function."""
Expand Down

0 comments on commit 0c304cf

Please sign in to comment.