Skip to content
Back to skills

Neuron View

ASecurity

Route BertViz neuron_view query/key neuron inspection workflows.

  • 247 stars
  • 0 votes
  • 0 copies
  • 4 views
  • Added September 8, 2026
devopsjavascriptjavadebuggingapi

Works with

  • api

Security analysis

A100/100

Pro scans all 6 files and shows the line behind each finding

Scanned September 8, 2026

npx -y skills add VectorSpaceLab/AREX-Skill --skill neuron-view --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Neuron View?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Neuron View
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/vectorspacelab-neuron-view/badge)](https://www.skillsdirectory.com/skills/vectorspacelab-neuron-view)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: neuron-view
description: "Route BertViz neuron_view query/key neuron inspection workflows."
disable-model-invocation: true
metadata:
  disco-role: operating
license: Apache 2.0
---

# 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.show` to render the interactive neuron view in a notebook, Colab, or saved HTML workflow.
- You need `bertviz.neuron_view.get_attention` to 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_view` because 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.

## Do not route here when

- The user already has attention tensors and only wants head view or model view rendering; use [`../attention-views/SKILL.md`](../attention-views/SKILL.md).
- The task is generic Transformers fine-tuning, training, checkpoint serving, generation, or deployment.
- The task asks for encoder-decoder, cross-attention, or tensor-only head/model view workflows; use [`../attention-views/SKILL.md`](../attention-views/SKILL.md).
- The task requires interpreting attention as a causal explanation of model predictions; this skill only operates BertViz neuron-view mechanics.

## Start with

- [`references/api-reference.md`](references/api-reference.md) for signatures, `model_type` values, output schema, and token partition behavior.
- [`references/workflows.md`](references/workflows.md) for BERT, GPT-2, RoBERTa, toy validation, HTML export, and offline/cache-first recipes.
- [`references/model-compatibility.md`](references/model-compatibility.md) for vendored class choices, sentence-pair support, optional dependencies, and CPU expectations.
- [`references/troubleshooting.md`](references/troubleshooting.md) for common errors and recovery steps.
- [`scripts/validate_toy_bert_attention.py`](scripts/validate_toy_bert_attention.py) for no-network local validation of `get_attention` behavior.

## Routing shortcuts

- Use `show(...)` for display/export; it calls `get_attention(..., include_queries_and_keys=True)` internally and injects the payload into BertViz HTML/JavaScript.
- Use `get_attention(...)` for assertions, schema inspection, and non-display workflows.
- Valid `model_type` strings are exactly `bert`, `gpt2`, `xlnet`, and `roberta`; they are not inferred from the model class.
- BERT and RoBERTa support sentence-pair partitions (`all`, `aa`, `ab`, `ba`, `bb`); GPT-2 sentence pairs raise `ValueError`; XLNet sentence pairs raise `NotImplementedError`.
- Keep core neuron-view validation CPU-local and no-network whenever possible. Prefer the bundled toy script before trying remote pretrained notebooks or uncached `from_pretrained(...)` calls.
- If the workflow does not need query/key vectors, route to [`../attention-views/SKILL.md`](../attention-views/SKILL.md) instead of forcing vendored neuron-view models.

Files in this skill

  • SKILL.md3.3 KB
  • references/api-reference.md6.4 KB
  • references/model-compatibility.md4.5 KB
  • references/troubleshooting.md3.3 KB
  • references/workflows.md3.9 KB
  • scripts/validate_toy_bert_attention.py9.2 KB

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.