You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi, thanks for your effort to develop this package! I wonder is there any way to "stick" or "pin" the attention weight view for a single token?
Currently, when I move the mouse pointer to hover a token, the attention view will only focus on connections for that token. But when I move the pointer out of that place, the view will turn in to "bird's eye view", show all the connection for all the tokens.
However, sometimes I need to show the connections for a specific token. When the sequence is so long, I have to scroll down the notebook, and move the pointer out of that token position, then I lost the focus view.
Is there any way to solve this?
The text was updated successfully, but these errors were encountered:
You could zoom out in the browser. That isn't the perfect solution, though could work around in some use cases.
A better solution could be collapsable sections.
I was looking for the same feature, we can probably make the HTML events configurable, but for now you can work around it using something like below:
fromIPython.displayimportHTML, displayhtml=head_view(
decoder_attention=self_attn_weights,
cross_attention=cross_attn_weights,
encoder_tokens=src_seq,
decoder_tokens=tgt_seq,
html_action='return'# Note: by default it is 'view', you need to change it to 'return' to get the HTML data
)
# As of now the attention highlighting is done using mouseover and mouseleave events, I have replaced them with click and dblclick respectively. This would break if the underlying javascript changes, but as of now it works with version `1.4.0`html=HTML(html.data.replace('mouseover', 'click').replace('mouseleave', 'dblclick'))
display(html)
@jessevig please let me know if you are open to making the events configurable. Maybe just a boolean toggle to switch between mouseover/mouseleave to click/dblclick.
Hi, thanks for your effort to develop this package! I wonder is there any way to "stick" or "pin" the attention weight view for a single token?
Currently, when I move the mouse pointer to hover a token, the attention view will only focus on connections for that token. But when I move the pointer out of that place, the view will turn in to "bird's eye view", show all the connection for all the tokens.
However, sometimes I need to show the connections for a specific token. When the sequence is so long, I have to scroll down the notebook, and move the pointer out of that token position, then I lost the focus view.
Is there any way to solve this?
The text was updated successfully, but these errors were encountered: