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

[P2] Refactor the AlignableConfig to take in intervention not as type but actual instance #20

Closed
frankaging opened this issue Nov 29, 2023 · 0 comments

Comments

@frankaging
Copy link
Collaborator

Description:
Currently, we have,

class AlignableConfig(PretrainedConfig):
    def __init__(
        self,
        alignable_model_type="gpt2",
        alignable_representations=[
            # we do distributed search over elements in the sublist.
            AlignableRepresentationConfig()
        ],
        alignable_interventions_type=VanillaIntervention,
        alignable_low_rank_dimension=None,
        mode="parallel",
        **kwargs
    ):

We need to specify the type as a class type, not as an instance. This causes trouble. It is better to get alignable interventions as a list of actual instances, e.g., alignable_interventions = [VanillaIntervention()]. This will allow us to have more specifications for customizable interventions.

@frankaging frankaging added enhancement New feature or request and removed enhancement New feature or request labels Nov 30, 2023
frankaging added a commit that referenced this issue Dec 20, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant