stanfordnlp / pyvene

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

[Minor] Allow other field passing in generate besides input_ids #125

Closed frankaging closed 4 months ago

frankaging commented 4 months ago

Description

In generate() call, we only pass in the input_ids field and rely on huggingface module to populate the attention mask fields. We now pass in the whole user input dict instead.

Testing Done

Tutorial test run passed.

Checklist: