Mini GPT Visualizer with 11,000 Parameters: Train and Understand LLM Fundamentals Right in Your Browser

An 11,000-parameter mini GPT visualizer lets you train and understand LLM fundamentals in your browser.
A developer shared a browser-based mini GPT visualization tool with only 11,000 parameters that lets anyone train a language model in about 10 minutes and observe the full training and generation process in real time. Built with Claude Opus's help, this tool requires no local setup and makes core concepts like word embeddings, attention mechanisms, and loss decay intuitively visible — transforming GPT from a black box into an accessible, hands-on learning experience.
A Mini GPT You Can Train in Your Browser
For most people, GPT and large language models (LLMs) remain a mysterious "black box" — we know they can generate text, but it's hard to intuitively understand what's actually happening inside. Recently, a developer shared an eye-opening project on Reddit: Tiny Language Model GPT Visualizer, which lets anyone train a micro GPT with just 11,000 parameters right in their browser and observe the training and generation process in real time.
The project is available at complexity.zone/tlmgpt. The creator notes it was built with the help of Claude (Opus), with the goal of "better understanding how GPT and LLMs work." It requires no local environment setup — just open the webpage and it runs. You can also download it for offline use and modify the code.

How to Use the Mini GPT Visualizer
The workflow for this GPT visualization tool is incredibly simple, with virtually no barrier to entry:
- Open the webpage and click the "train" button
- Let the model train for about 10 minutes
- Click the "pause" button
- Click the "generate" button
In just a few steps, you can witness firsthand a language model go from "knowing nothing" to "generating text with discernible patterns." This kind of visible training experience is something that reading papers or watching tutorial videos simply can't replace.
Why 11,000 Parameters?
For comparison, GPT-3 has 175 billion parameters, and mainstream open-source models routinely range from billions to hundreds of billions. The number 11,000 might seem "laughably small," but that's precisely where its core value lies — the fewer the parameters, the more transparent and traceable the model's behavior becomes. You can clearly see how the loss function decreases step by step during training, and how the model gradually learns to capture statistical patterns between characters and words.
Parameters are the numerical values a neural network learns through training, including weights and biases. Each parameter stores a small piece of "knowledge" extracted from the training data. The more parameters, the more complex the patterns a model can theoretically learn. GPT-3's 175 billion parameters required hundreds of high-end GPUs training for weeks, with estimated costs exceeding $4.6 million. An 11,000-parameter model, on the other hand, takes up less than 50KB of memory for all its values combined, which means a regular browser's JavaScript engine can easily handle all the computations — this is the fundamental reason why "training GPT in a browser" is possible.
For learners, a mini model that completes in 10 minutes and runs smoothly in a browser is far more educational than a massive model requiring expensive GPU clusters and days of training. It transforms "training a GPT" from an engineering challenge into an accessible experiment.
The Educational Value of GPT Visualization
In recent years, projects for "visually understanding Transformers" have become increasingly common — popular examples include Transformer Explainer, BBycroft's LLM Visualization, and others. Transformer Explainer is an interactive tool developed by a Georgia Tech team that uses GPT-2 as its basis to demonstrate the computational flow through each Transformer layer. BBycroft's project uses 3D animations to show tokens flowing through network layers, vividly illustrating how multi-head attention works in parallel. Together with classic projects like TensorFlow Playground and CNN Explainer, these tools form an educational ecosystem for Explainable AI (XAI), making machine learning more than just a pile of mathematical formulas and code. They all address a core pain point: The principles behind large language models aren't mysterious — they've just long lacked intuitive ways of being presented.
What makes this mini GPT visualizer unique is that it presents both the training and generation phases simultaneously. Many visualization tools only show how an already-trained model performs inference, but this project lets you experience the training itself — watching the model's weights evolve from a randomly initialized state, through round after round of gradient updates, slowly "converging" to a state capable of producing readable text.
It's worth explaining the core training mechanisms here. A loss function is a mathematical formula that measures the gap between the model's predictions and the actual targets. In language models, the most commonly used is cross-entropy loss, which calculates the difference between the model's predicted probability distribution for the next word and the ground truth. Gradient updates are the engine of model learning: through the backpropagation algorithm, the contribution of each parameter to the loss is calculated, and then parameter values are adjusted in the opposite direction of the gradient to gradually reduce the loss. This process iterates thousands or even millions of times, and the model's predictive ability steadily improves. "Convergence" refers to the state where the loss value stabilizes and no longer decreases significantly. In this mini GPT, you can observe this entire process from chaos to order in real time.
From Black Box to White Box: Understanding Core GPT Concepts
Key GPT concepts — including word embeddings, attention mechanisms, loss decay, and sampling-based generation — can all be fully observed in an 11,000-parameter model without being overwhelmed by the complexity of massive parameter counts.
These concepts form the core skeleton of the Transformer architecture. The Transformer is a neural network architecture proposed by Google in the 2017 paper Attention Is All You Need, and it serves as the underlying foundation of GPT. Word embeddings map discrete text symbols into continuous high-dimensional vectors, so that semantically similar words are closer together in vector space. The attention mechanism is the Transformer's most groundbreaking design — it allows the model to dynamically "attend to" information at all other positions in the input sequence when processing a given word, assigning different weights based on relevance. This is implemented through three sets of matrix operations: Query, Key, and Value. Sampling-based generation is the strategy used during inference: after the model outputs a probability distribution for each word, methods like temperature scaling, Top-k, or Top-p are used to select the next word. Higher temperatures produce more random and diverse outputs, while lower temperatures yield more deterministic and conservative results.
This "small but complete" design philosophy transforms otherwise abstract mathematical processes into concrete objects that can be observed and hands-on debugged. In the mini GPT, these mechanisms aren't obscured by the noise of billions of parameters — the behavior of every attention head and the changes in every embedding layer are clearly visible.
Using LLMs to Build Tools for Understanding LLMs: A Microcosm of AI-Assisted Development
It's worth noting that the creator explicitly stated this tool was built "with the help of Opus" (Anthropic's Claude LLM). Claude Opus is Anthropic's flagship large language model, the most capable version in the Claude 3 series, excelling at complex reasoning, code generation, and long-text processing. Anthropic was founded by former OpenAI members with AI safety research as its core mission. This creates a fascinating phenomenon: using a large language model to help build a teaching tool for understanding large language models.
This also reflects the current trend of AI-assisted programming becoming mainstream. AI-assisted coding has evolved from simple code completion to full-workflow collaboration: developers describe requirements, AI generates code scaffolding, developers review and modify, and AI iterates and optimizes. This pattern is especially well-suited for rapid prototyping of educational tools — developers focus on designing the teaching logic and interactive experience, while delegating the tedious underlying implementation to AI. For developers who want to deeply understand a technical concept, AI isn't just a coding assistant — it can become a "sparring partner" in the learning process. When you want to truly understand a concept, you build it yourself, and AI tools dramatically lower the barrier and cost of that hands-on implementation.
Who Should Use This GPT Visualization Tool
Despite its simplicity, this mini GPT visualizer precisely addresses the needs of AI learners. If you find yourself in any of the following situations, it's worth spending some time to try it out:
- You have a basic understanding of GPT and LLMs but lack intuitive insight
- You want to understand what "model training" actually involves
- You want to experiment hands-on without setting up a complex environment
- You're studying the Transformer architecture and need an interactive supplementary tool
Going further, the creator has made the complete code available for download, encouraging everyone to run it offline and "tinker with the code." For readers with programming experience, after understanding the basic workflow, try modifying the model structure, adjusting parameter scales, or swapping out training data to observe how these changes affect the final generation results. For example, you could try increasing the number of attention heads from 2 to 4 to see if the model can capture more complex language patterns, or double the context window length to see if the model can generate more coherent long-form text. This progression from "watching" to "modifying" is often the crucial step for truly internalizing knowledge.
In an era where large models are increasingly becoming "cloud API black boxes," these small yet refined open-source educational tools preserve a window for us to peer into the underlying principles. When we can train an 11,000-parameter mini GPT with our own hands and understand the meaning of every internal computation, we no longer feel completely lost when facing models with hundreds of billions of parameters — because the underlying mathematical principles and architectural logic are fundamentally the same.
Key Takeaways
Related articles

OpenAI Authorship Dispute: The Battle Over Academic Boundaries in the AI Era
OpenAI disputes authorship with mathematician Tristan Buckmaster over Navier-Stokes research, raising ethical questions about AI involvement in science.

Claude Suggests User Test ACC by Crashing Into Car Ahead: Where Are AI Safety Boundaries?
Claude suggested a user test ACC by crashing into the car ahead—this absurd response sparked AI safety discussions. This article analyzes why LLMs generate implicitly dangerous advice and the blind spots in AI safety guardrails.

Terence Tao's Warning: AI Is Depleting the Non-Renewable Resource of Mathematical Problems
Fields Medalist Terence Tao warns that AI is mining mathematical problems in a non-renewable way. Exploring sustainability of math research in the AI era, the evolving role of human mathematicians, and balancing AI power with human creativity to maintain academic ecology.