jasperan

LLM Vis — AI skill for Claude Code

AI community

Interactive visualizer of what happens inside a Claude-style LLM for every token: growing attention matrix, KV cache, and a context window filling with system prompt, tools, skills, memory and convers.

How to install LLM Vis

This entry records only its repository, not the path inside it, so there is no exact command to give. Open jasperan/llm-vis and copy the folder into ~/.claude/skills/, or the file into ~/.claude/agents/.

What LLM Vis does

Interactive visualizer of what happens inside a Claude-style LLM for every token: growing attention matrix, KV cache, and a context window filling with system prompt, tools, skills, memory and conversation.

Alternatives in AI

  • Optimization — ai-research-skills AWQ, GPTQ, GGUF, Flash Attention, bitsandbytes 5.4k ★
  • Paritok 4b V1 — Non-destructive compression gateway for AI coding agents 1.4k ★
  • Late CLI — High-performance AI agent for long-horizon tasks and local models 442 ★

README

llm-vis

Inside a model, one token at a time. llm-vis is a static, browser-only visualizer of what a transformer language model does for every token it processes: the causal attention matrix growing by one row and column, the KV cache, a context window filling with system prompt, tools, skills, memory and conversation, auto-compaction when the window fills, and per-token forward-pass details.

Live demo: https://jasperan.github.io/llm-vis/

What this is, and what it is not

Claude's weights, tokenizer and architecture are not public. This project does not show them.

  • The engine is a small transformer that runs in your browser, with hand-wired attention heads (for example "previous token" and "attention sink"). Its attention is real softmax(QK^T / sqrt(d)) over a real KV cache, but the weights are designed, not trained.
  • The tokenizer is an approximate BPE-style splitter. Token boundaries differ from any real model.
  • KV cache size and attention FLOPs for a large model are computed from an explicitly assumed configuration, stated in the Next token panel. They are order-of-magnitude illustrations.
  • Next-token candidates are illustrative, not a real model's probabilities.

What you are looking at

Panel What it shows
Context window Every token in the context, in order, colored by what it is. Fills as the session runs; older turns are replaced by a summary when it is nearly full.
Token stream The text of the context. Hover a token and arcs reach back to the tokens it attends to most; arc width and opacity follow the weight, color is the kind of the attended token.
Attention The causal attention matrix for the selected layer and head. Row i is how much token i reads each earlier token.
Forward pass The focus token (hovered, otherwise the latest) through each layer. Each cell is one head: bar is attention entropy, border color is the kind of the most-attended token, tooltip names it. Click a head to select it.
Next