attention-viz
attention-viz copied to clipboard
Add left sidebar for matrix view
Need to ask Martin for more details (so maybe work on this later), but here are some things it might involve:
- [ ] input box where user can type in a sentence
- this may not be necessary...
- [ ] add user's sentence to the query/key plots (right side)
- [ ] show attention plot for user's sentence (left side)
- right now, code for these plots is here: att.html
- original bertviz repo: https://github.com/jessevig/bertviz
- [ ] allow user to click on lines in the attention plot, two types of interaction:
- emphasize query/key pair (aka. want to see where this pair has high attention)
- de-emphasize query/key pair (aka. we don't want this pair to have high attention)
- [ ] then, update matrix view to show plots with the corresponding features selected by the user (right side)
example attn plot for reference:
May be able to project new points into same embedding space? E.g., see fit method (vs. fit_transform) for TSNE: https://scikit-learn.org/stable/modules/generated/sklearn.manifold.TSNE.html