TransformerLensOrg / CircuitsVis

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

[Bug] colored_tokens generates unreadable text when values are all zero #92

Open naterush opened 1 month ago

naterush commented 1 month ago

First - thanks for the great library! Been working well for me so far, and has a pleasant and expressive API that's been perfect for what I need.

I ran bug on Google Colab where sometimes colored_tokens function generates white text on a white background, making it unreadable. Specifically, this is when the values are all zeros - which sometimes happens, but I still want to be able to read the text!

See here:

Screenshot 2024-09-04 at 5 12 29 PM Screenshot 2024-09-04 at 5 12 39 PM