Visualize attention matrices from DistilBERT. It performs inference, caches outputs, and renders an interactive D3.js heatmap with tooltips.
-
Backend:
- Install dependencies:
pip install flask flask-cors torch transformers
- Run the Flask app:
python backend/app.py
- Install dependencies:
-
Frontend:
- Open
index.html
in a browser (served athttp://127.0.0.1:5500
) - use live server.
- Open
Enjoy exploring attention data!