neuron-view
Use this sub-skill when a BertViz task needs the neuron view: per-head attention plus the query and key vectors that produced each attention score.
Route here when
- You need
bertviz.neuron_view.showto render the interactive neuron view in a notebook, Colab, or saved HTML workflow. - You need
bertviz.neuron_view.get_attentionto compute the serialized attention/query/key payload for validation, custom inspection, or debugging. - You need BertViz's vendored modified Transformer classes from
bertviz.transformers_neuron_viewbecause ordinary Hugging Face models do not expose query/key vectors in the schema expected by neuron view. - You need sentence-pair neuron-view slicing for BERT or RoBERTa, or you need to explain why GPT-2 and XLNet sentence pairs fail.
- You need an offline toy BERT validation path that avoids pretrained model downloads.