# luo3300612/Visualizer

assistant tools for attention visualization in deep learning

Repository: https://github.com/luo3300612/Visualizer
Canonical: https://ross.abutalabs.com/products/visualizer
Language: Jupyter Notebook
License: Apache-2.0
License Family: permissive
Last push: 2022-06-09T14:27:01+00:00

## Health v2 (maintenance only)
Score: 32/100 (v2, computed 2026-09-02T17:46:02.011165+00:00)
- activity 0, release rhythm 35, longevity 100
- inputs: {"age_days": 1850, "days_push": 1546, "days_rel": null, "gap_med": null, "n_releases_24m": 0}
- flags: no_releases
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 1269, forks 92 (observed 2026-08-28T04:04:11.592299+00:00)

## What it is
A lightweight Python library that extracts attention maps and other local variables from deep inside PyTorch models for visualization. It works by decorating the attention function with a get_local decorator that captures named local variables via bytecode manipulation, non-invasively and without touching model code.

## Use cases
- visualize attention maps from a vision transformer
- extract attention weights from a pytorch model without registering hooks
- get intermediate outputs from deeply nested transformer blocks
- capture all attention maps across transformer layers at once
- debug what attention heads look at in a trained model
- grab nested local variables from pytorch model functions non-invasively

## When to choose
- You use PyTorch and need attention maps from Transformer-style models like ViT where the modules are buried in nn.Sequential and hard to address by name
- You want a zero-code-change approach so the same decorated model can be used for both training and visualization
- You need to pull out any named intermediate variable from a model function, not just attention maps

## When to avoid
- You work with TensorFlow, JAX, or other non-PyTorch frameworks
- You already know your module names and simple register_forward_hook calls are enough
- You need a full-featured, actively maintained model-interpretability suite rather than a small single-purpose tool

## Facets
- artifact type: library
- maturity: stable
- function: deep-learning, machine-learning, data-visualization
- domain: deep-learning, machine-learning, data-visualization, artificial-intelligence
- platform: python
- tags: pytorch, transformer, attention-map, interpretability, decorator, model-debugging, explainable-ai, vision-transformer, hooks, bytecode

## Member repositories
- luo3300612/Visualizer (main) score 32

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:04:11.592299+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-30T05:03:32.611707+00:00, confidence not recorded.
  - readme: https://github.com/luo3300612/Visualizer (fetched 2026-08-28T04:04:11.592299+00:00, sha 6efb1cb5e138)
- Data as of 2026-08-30T08:39:29.467469+00:00.
