TransformerLensOrg / CircuitsVis

Mechanistic Interpretability Visualizations using React
https://alan-cooney.github.io/CircuitsVis/
MIT License
192 stars 29 forks source link

Colored tokens multi #41

Closed neelnanda-io closed 1 year ago

neelnanda-io commented 1 year ago

Added support for colored tokens with multiple values per token. Current visualization is a bit janky, but I think good enough to be useful. Use in the tokens_multi file. Currently each set of activations has the same color scheme, and exactly one set is shown at any given time (ie, I don't bother with color mixing). When a token is hovered over, the tooltip shows all values for that token.

Added a specific function to the tokens_multi.py file to visualize the logits, log probs and probabilities for a model

Made some minor changes elsewhere, tokens in TokensCustomTooltip now get bolded and outlined when hovered over.

image
neelnanda-io commented 1 year ago

Built on the branch for #36 , as it depends on some minor changes in there