wln20/Attention-Viewer
A plug-and-play tool for visualizing attention-score heatmap in generative LLMs. Easy to customize for your own need.
This tool helps machine learning researchers and engineers understand how large language models (LLMs) process text. You input an LLM, its tokenizer, and a text prompt, and it outputs visual heatmaps showing which parts of the input text the model "pays attention" to at different stages. This allows you to gain insights into the model's internal reasoning and identify potential biases or unexpected behaviors.
No commits in the last 6 months.
Use this if you are a machine learning researcher or engineer working with generative LLMs and need to visually inspect their internal attention mechanisms for interpretability or debugging.
Not ideal if you are a casual LLM user looking for a simple application or do not have experience working with LLM codebases and model architectures.
Stars
51
Forks
5
Language
Python
License
—
Category
Last pushed
May 16, 2024
Commits (30d)
0
Get this data via API
curl "https://pt-edge.onrender.com/api/v1/quality/llm-tools/wln20/Attention-Viewer"
Open to everyone — 100 requests/day, no key needed. Get a free key for 1,000/day.
Higher-rated alternatives
Lightning-AI/litgpt
20+ high-performance LLMs with recipes to pretrain, finetune and deploy at scale.
liangyuwang/Tiny-DeepSpeed
Tiny-DeepSpeed, a minimalistic re-implementation of the DeepSpeed library
catherinesyeh/attention-viz
Visualizing query-key interactions in language + vision transformers (VIS 2023)
microsoft/Text2Grad
🚀 Text2Grad: Converting natural language feedback into gradient signals for precise model...
FareedKhan-dev/Building-llama3-from-scratch
LLaMA 3 is one of the most promising open-source model after Mistral, we will recreate it's...