TransformerLensOrg / CircuitsVis

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

Add bidirectional attention support #75

Closed andyrdt closed 1 year ago

andyrdt commented 1 year ago

Implements support for bidirectional attention, as mentioned in #74.

Introduces a new parameter mask_upper_tri to the attention_pattern and attention_heads functions that toggles whether or not to mask the upper triangular region. It defaults to true, in order to match existing functionality.