Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Attention view for single plots #7

Closed
6 of 7 tasks
catherinesyeh opened this issue Dec 3, 2022 · 4 comments
Closed
6 of 7 tasks

Attention view for single plots #7

catherinesyeh opened this issue Dec 3, 2022 · 4 comments
Labels
high priority Do asap single Single view issues

Comments

@catherinesyeh
Copy link
Owner

catherinesyeh commented Dec 3, 2022

Left sidebar:

  • when user clicks on a point (right side), show attention plot for sentence on left sidebar:
  • highlight token corresponding to point in attention plot (see below)
  • allow user to toggle lines off and on in attention plot to more clearly observe attn patterns
    • currently, i do this by letting people click on the token text in the attention plot
  • renormalize line weights after toggling
  • label q + k columns
  • potentially also add more complex features (e.g., input box) like in matrix view? will ask martin...

current attn view for reference:
image

Main panel:

  • will clarify with martin, but may also still want to highlight points in sentence on main plot when the user clicks on a token (see above)
    • update: yes we should still do this but don't make points yellow, keep query/key color schemes just outline in different color maybe? if we use highlight token method like with search, seems to be a bit slow at the moment...
@catherinesyeh catherinesyeh added the single Single view issues label Dec 3, 2022
@catherinesyeh catherinesyeh mentioned this issue Dec 3, 2022
3 tasks
@catherinesyeh catherinesyeh added the high priority Do asap label Dec 8, 2022
@wowjyu
Copy link
Collaborator

wowjyu commented Dec 8, 2022

The attn data is now available for drawing upon clicking a point.

Known issue: The click interaction is kinda lagging.

Screenshot 2022-12-08 at 16 13 25

wowjyu added a commit that referenced this issue Dec 8, 2022
wowjyu added a commit that referenced this issue Dec 8, 2022
@catherinesyeh
Copy link
Owner Author

catherinesyeh commented Dec 9, 2022

More todos:

  • fix styling
  • what to do about sizing? (e.g., narrow/short screens gets cut off)
  • seems that you have to be pretty zoomed in for click to work... is that expected?
  • fix clear behavior
  • show layer/head

@catherinesyeh
Copy link
Owner Author

catherinesyeh commented Feb 4, 2023

More todos:

  • option to filter out first token
  • or cls/sep

In both cases, should renormalize remaining weights afterwards

@catherinesyeh
Copy link
Owner Author

done for now! (letting user add new sentences = future work)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
high priority Do asap single Single view issues
Projects
None yet
Development

No branches or pull requests

2 participants