stanfordnlp / pyvene

Stanford NLP Python Library for Understanding and Improving PyTorch Models via Interventions
http://pyvene.ai
Apache License 2.0
608 stars 59 forks source link

[Minor] Add in trainable intervention based on binary mask intervention #102

Closed frankaging closed 8 months ago

frankaging commented 8 months ago

Description

Add in a baseline for trainable interventions. It learns a binary mask over representation, and the mask is used to choose the dimension to do intervention.

Testing Done

A tutorial is included.

Checklist: