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

[Suggestion]: Docs: explain the first example #162

Open
ocramz opened this issue Jun 7, 2024 · 0 comments
Open

[Suggestion]: Docs: explain the first example #162

ocramz opened this issue Jun 7, 2024 · 0 comments
Labels
enhancement New feature or request

Comments

@ocramz
Copy link

ocramz commented Jun 7, 2024

Suggestion / Feature Request

The first example in the README could use some introduction to make sense of the interface, e.g :

  • What are the parameters b and s of zeroout_intervention_fn ?
  • "3rd position" of what?
  • is the intervention field of the configuration dict always a binary function?
def zeroout_intervention_fn(b, s): 
    b[:,3] = 0. # 3rd position
    return b

pv_model = pv.IntervenableModel({
    "component": "model.layers[15].mlp.output", # string access
    "intervention": zeroout_intervention_fn}, model=model)
@ocramz ocramz added the enhancement New feature or request label Jun 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant