attnlab
A set of labs, walked in order, that run real TransformerLens models behind a web page. Type a prompt, pick a model, and see how it is tokenized, where every head attends, and when the model knows its answer.
Open tools and interactive explainers for mechanistic interpretability. Type a prompt, pick a real model, and look at what every token, attention head and layer is doing, without opening a notebook.
Free · Open source · Real models, real numbers
Free, open-source interpretability tools that run real language models behind a web page: tokenizers, attention patterns and the logit lens.
A set of labs, walked in order, that run real TransformerLens models behind a web page. Type a prompt, pick a model, and see how it is tokenized, where every head attends, and when the model knows its answer.
Interactive, visual explainers of how transformers work: the residual stream, attention and the logit lens, with real numbers you can step through.
Follow four tokens through a single transformer block from the residual stream's point of view. Every matrix is shown with real numbers, computed live, so you can trace one token's row from embedding to next-token probabilities.
Watch GPT-2 build its prediction layer by layer. A runnable walkthrough that decodes the residual stream after every block, shows why ln_final matters, and plots top-k and rank heatmaps.
More writing on transformers and NLP lives on Nirajan Paudel’s site.
Planned labs, built in the open. Each one answers a single question and links to the step before it.
How does a model copy what it has seen before?
Repeated random tokens, per-head induction scores, and the loss drop in the second half of the sequence.
Which components actually matter?
Zero- or mean-ablate heads and measure the change in loss and logits.
Sarvabhaum AI makes the inside of language models something you can look at. The tools run small, real models such as GPT-2, Pythia and Qwen3 on a server we host, and the explainers show every matrix with real numbers, so each idea can be checked rather than taken on trust.
Everything here is free and open source. New labs and explainers are added as they are finished.
It stands on other people’s open work, above all TransformerLens and the ARENA curriculum. Every page lists the libraries, models, data and papers it builds on.