@GitHub_Daily: Want to understand how Large Language Models actually work? Existing resources are either too academic and hard to digest, or too superficial, focusing only on concepts, with nothing that clearly explains the entire process from start to finish. Similarly, I came across the 'how-llms-work' project, which turns the complete workflow of LLMs into a visual interactive webpage, based on Andrej Karpathy’s...
Summary
An interactive visual guide, 'how-llms-work', breaks down the entire lifecycle of Large Language Models based on Andrej Karpathy's lectures, covering data collection to post-training.
View Cached Full Text
Cached at: 05/12/26, 12:47 AM
If you’re curious about how large language models actually work, you’ll likely find that most resources are either too academic and dense, or too superficial, focusing only on high-level concepts. It’s rare to find content that clearly explains the entire process from start to finish.
Coincidentally, I came across the how-llms-work project, which presents the complete lifecycle of large models as a visual, interactive web page. The content is based on Andrej Karpathy’s classic lectures. From web data collection, tokenization, and neural network training, to inference, generation, and post-training alignment, each stage is illustrated with intuitive diagrams and explanations, allowing you to grasp the entire workflow in a single view.
GitHub: http://github.com/ynarwal/how-llms-work
It also covers advanced topics such as hallucinations, context windows, and Retrieval-Augmented Generation (RAG), helping us understand the model’s capability boundaries and practical application methods. If you want to understand the entire process of large models—from training to conversational interaction—without wading through academic papers, this tutorial is worth spending ten minutes on.
ynarwal/how-llms-work
Source: https://github.com/ynarwal/how-llms-work
How LLMs Actually Work
A visual, interactive guide to how large language models are built — from raw internet text to a conversational assistant.
Live site: https://ynarwal.github.io/how-llms-work/
Based on Andrej Karpathy’s Intro to Large Language Models (https://www.youtube.com/watch?v=zjkBMFhNj_g) lecture.
What’s inside
- Data Collection — how the web is scraped and filtered into training data (Common Crawl, FineWeb)
- Tokenization — how text is broken into subword tokens via Byte Pair Encoding (BPE)
- Neural Network Training — the loss function, gradient descent, and what a forward pass looks like
- Inference & Sampling — how the model generates text token by token, and how temperature works
- The Base Model — what a model knows after pre-training and what it can’t do yet
- Post-Training — RLHF, instruction tuning, and how a base model becomes an assistant
- LLM Psychology — hallucinations, context windows, and how to think about what models “know”
- RAG — retrieval-augmented generation: embeddings, vector search, and context injection
- Full Pipeline Summary — end-to-end visual of every stage
Files
| File | Description |
|---|---|
index.html | Main site (v2 redesign) |
v1.html | Original dark-theme version |
transcript.txt | Full Karpathy lecture transcript |
council.py | LLM council fact-checker (runs via uv run council.py) |
report.html | Latest council fact-check report |
HN discussion
Posted to Hacker News (https://news.ycombinator.com/item?id=47886517) and generated heated debate, mostly about it being LLM-generated. Fair point — but the content isn’t the AI’s. Every claim, figure, and framing is traced directly to Karpathy’s lecture, not hallucinated by a model.
Vibe check
The code and content in this repo is mostly LLM-generated (Claude via Claude Code). The ideas, direction, and editorial decisions are mine — the implementation was largely written by AI. The council fact-checker exists precisely because of this: automated content warrants automated verification.
Similar Articles
@GitHub_Daily: Want to understand the underlying principles of large language models? Most resources only cover theory or provide source code, leaving you still confused. Stumbled upon this open-source tutorial, EveryonesLLM, which guides us step by step to build a complete large language model from scratch on Google Colab, writing code throughout. The whole tutorial is divided into...
EveryonesLLM is an open-source tutorial that provides 29 chapters of Colab notebooks. It teaches users step by step to build a complete large language model from scratch on Google Colab, including pre-training and instruction fine-tuning, and supports Chinese.
@GitHub_Daily: How do large language models work internally, why do they hallucinate, and why do they sometimes give irrelevant answers? For a deeper understanding, check out the Awesome LLM Interpretability resource collection, which provides a systematic path to unpack the AI black box. It covers attention visualization, neuron analysis, and more.
Introduces the Awesome LLM Interpretability resource collection, which gathers various interpretability tools, papers, and community resources to help understand the internal workings of large language models.
@GitHub_Daily: To dive deep into model research, you can't just stay at the application layer—you need to understand how the underlying system is trained and optimized. I stumbled upon LLMSys-PaperList, a carefully curated collection of papers related to large model systems. It is continuously updated from 2022 to the latest top conference papers in 2026, and organized by categories such as training, inference, multimodality...
A carefully curated collection of papers related to large model systems, covering training, inference, multimodality, and more. It is continuously updated and includes technical reports, frameworks, and courses, making it a valuable reference for researchers and developers.
@Gas1688: Can a book on large models really guide you through the whole process? I didn't believe it until I finished this one. T…
The book 'Hands-On Large Language Models' offers a comprehensive, open-source guide to large language models with runnable code on Colab, covering topics from basics to multimodal applications.
@Xx15573208: I've read many articles about Transformers and understand the theory, but when I actually sit down to write code, I have no idea where to start. LLMs-from-scratch is specifically designed to solve this problem: it accompanies the book "Build a Large Language Model" and guides you through implementing GPT from scratch using PyTorch…
LLMs-from-scratch is a GitHub repository that accompanies the book "Build a Large Language Model," providing complete code to implement GPT from scratch with PyTorch, covering the full pipeline including pretraining, fine-tuning, and RLHF. It has gained 93K+ stars and is ideal for developers who want to deeply understand the principles behind large language models.