stanfordnlp / pyvene

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

[P2] Support simple MLP layer for interventions #25

Closed frankaging closed 9 months ago

frankaging commented 10 months ago

Description: Currently, the library only works for transformer-based models. For non-sequence-based models, MLP models; or other sequence-based models like RNN, the library cannot work well.

The first step moving forward to support other model types could be to showcase how this library will work for MLP models. The MLP model can be hand-crafted as well so that we know the counterfactual behaviors. We expect there will be hacks here and there to get things to work, but it will allow more model types.