Thanks to the new treescope integration,
@InseqLib now supports interactive visualizations for multidimensional attributions (show_granular), token highlights (show_tokens) and improved viz for attribute_context CLI! 🚀 Install main, will appear in v0.7
x.com/_ddjohnson/status/1821…
ALT Granular visualization of an attention weight matrix for Gemma 2B on a summarization task. The slider on the bottom allows to visualize scores for individual heads without aggregation.
ALT Generated text with probability highlights (in green). For every generated token, source and target attribution scores can be visualized by opening the collapsed section (scores for token "colore" shown in figure)
ALT Output visualization of the attribute_context command for a chain-of-thought reasoning task with output-side context. The token "pairs" in the generated sentence "20 pairs of legs." is found to be context-sensitive and its prediction over the non-contextual alternative "horses" is motivated mainly by the presence of "pairs" in the output context.
By popular demand, the Treescope pretty-printer from the Penzai neural net library can now be installed separately, and supports both JAX and PyTorch!
And that's not all: Penzai itself now has less boilerplate and includes more pretrained Transformer models!