Skip to content

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

@ocramz

Description

@ocramz

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)

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions