Skip to main content

A robust, plug-and-play Attention Rollout explainer for Vision Transformers (timm & Hugging Face).

Project description

Fast ViT Rollout 🚀

A robust, plug-and-play Attention Rollout extractor for Vision Transformers. Works seamlessly out of the box with timm and Hugging Face backbones.

Why use this?

Most existing Attention Rollout scripts break on modern architectures. This package natively handles:

  • Flash Attention (SDPA): Bypasses PyTorch 2.0+ fused attention issues.
  • Register Tokens: Flawlessly parses DINOv2 and DeiT models without shape mismatch errors.
  • Auto-Detection: Automatically hooks the correct layers without manual indexing.
  • Native Heatmaps: Generates OpenCV-based overlays with built-in intensity colorbars.

Installation

pip install fast-vit-rollout

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

fast_vit_rollout-0.1.0.tar.gz (5.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

fast_vit_rollout-0.1.0-py3-none-any.whl (5.9 kB view details)

Uploaded Python 3

File details

Details for the file fast_vit_rollout-0.1.0.tar.gz.

File metadata

  • Download URL: fast_vit_rollout-0.1.0.tar.gz
  • Upload date:
  • Size: 5.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.12

File hashes

Hashes for fast_vit_rollout-0.1.0.tar.gz
Algorithm Hash digest
SHA256 3190d0a4c3010d46276f83d764dbc5098b4df6dc685017aabb3c5fff02c8e02a
MD5 4fe47fe1fc3d33a9c16db8ac570640c9
BLAKE2b-256 929ce99b906bf9de928ba1df96bf94098d55861fdcb1f9a397f14f4c8c17ba04

See more details on using hashes here.

File details

Details for the file fast_vit_rollout-0.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for fast_vit_rollout-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 a521febea126ebde2dd4e6295b74f2a073acce0125eade5e5921f68abc04c1a9
MD5 c6084c546e0bbd98cd7da49f953e9bee
BLAKE2b-256 cf0a4b669eabc2c9b63cd2a71c795bcc5a3d70d0003267966d9ea7efde25e313

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page