The LLM algorithms wiki
A continuously maintained tutorial on LLM algorithms. It is organized in four parts, chapters follow a learning order, and every page states what you will be able to do afterwards and what to read first. Pages connect through prerequisites and related reading.
Browse labs on GitHub ↗Where to start
- New to LLMs Read “What is an LLM?” first for the end-to-end picture.
- Want a study plan Pick the weekend crash course or the application, engineering or research route, and follow the weekly reading and exercises.
- Start with hands-on basics Work through four CPU exercises on Python, hardware, inference, and agents.
Pick a study route
Each route lays out wiki pages week by week, with a deliverable for every week. Make one of them "my route" and every page you open will tell you which week of the route it belongs to and what the next stop is. Your progress and choice stay in your browser.
Route 0
Weekend crash course
Build an overall picture of LLMs in one weekend, know what each stage does, and then decide which route to take
7 pages
Start hereWhat Is a Large Language Model? From Next-Word Prediction to General AssistantsRoute finished
Route 1
AI application developer
Connect prompting, structured output, retrieval-augmented generation, tool calling, evaluation and security into one deliverable application loop
23 pages
Start hereWhat Is a Large Language Model? From Next-Word Prediction to General AssistantsRoute finished
Route 2
LLM engineer
Understand the full chain from data and pre-training through fine-tuning to serving, estimate the compute and memory of a training run, complete a small fine-tuning run, and deploy an inference endpoint you can load-test
39 pages
Start herePython and tensor shapesRoute finished
Route 3
LLM researcher
Build a map of the literature, learn to pose verifiable questions and design minimal experiments, and write the results up as conclusions others can repeat
21 pages
Start hereFrom RNNs to AttentionRoute finished
All chapters
Want the big picture and the prerequisite links? Open the knowledge map and hover any page to see where it comes from and where it leads. Knowledge map →
Continue You have read every page. Try the exercises again to check what stuck.
Part 1
Understand LLMs
What is an LLM, what is it made of, and why is each part designed the way it is?
-
Getting Started
New to large language models? Build an end-to-end picture first, then pick one of four study routes (weekend crash course, application development, engineering or research), and see how this wiki is organized and meant to be read.
4 pages · 81 min
- 1.1 What Is a Large Language Model? From Next-Word Prediction to General Assistants A large language model (LLM) is a neural network, usually a Transformer, trained on huge amounts of text to predict the next token; pre-training, post-training and inference decoding turn it into an assistant that can chat, write code and reason. Beginner
- 1.2 LLM Learning Roadmap: A Map of the Wiki and Four Study Paths See how the wiki's four parts and twelve chapters fit together, then pick a path by goal: a 10-hour weekend crash course, an 8-week application path, a 14-week engineering path or a 16-week research path, each with weekly reading, exercises and deliverables. Beginner
- 1.3 Learning Resources Map: Courses, Books and Repositories to Pair with This Wiki A map of public courses, books, explainers, code repositories and Chinese-language resources to pair with this wiki, grouped by learning goal: what each adds, what background it assumes and which wiki pages to read with it. Every link was opened and checked in November 2026. Beginner
- 1.4 LLM Cheat Sheet: Estimating Parameters, Compute, Memory and Decoding Speed One page for the estimates you reuse most: counting parameters, training compute (about 6ND), memory for weights, training state and the KV cache, the bandwidth bound on decoding speed, and the LoRA and pass@k formulas, each with a standard-library script checked against published numbers. Intermediate
-
Foundations
Language modeling, neural networks, information theory, tokens and embeddings, and optimizers: the lowest-level primitives of an LLM, and the reason behind almost every design decision that follows.
6 pages · about 2 h
- 2.1 Python and tensor shapes: from a table to a linear layer Start with a table of numbers, name the position and feature axes, and calculate a dot product and bias before running a linear layer in standard Python. Beginner
- 2.2 From Language Modeling to Next-Token Prediction Language modeling estimates the probability of a text and uses the chain rule to split it into a product of "predict the next token given the prefix"; training uses cross-entropy, evaluation uses perplexity, and the causal mask hides future tokens. Beginner
- 2.3 Neural Network Basics: From Linear Layers to Backpropagation A neural network chains linear maps and nonlinearities. Backpropagation (the chain rule) gives the loss gradient for every parameter, and training steps against it. This page builds a two-layer net in NumPy, checks its gradients, and runs learning-rate and initialization experiments. Beginner
- 2.4 Information Theory Refresher: Entropy, Cross-Entropy and KL Divergence Entropy measures how surprising a distribution is on average, cross-entropy is the cost of coding data from p with a code built for q, and KL divergence is the excess over the optimum. A language model's training loss is cross-entropy; perplexity is its exponential. Intermediate
- 2.5 Tokenizers and Embeddings: BPE, Vocabulary Size and the Embedding Table An LLM only processes integers: a tokenizer splits text into tokens with a subword algorithm such as BPE and maps them to ids, then each id is looked up in a vocabulary-size by hidden-size embedding table. Vocabulary size trades off sequence length, parameters and long-tail coverage. Beginner
- 2.6 Optimizers and Training Stability: AdamW, Warmup, Mixed Precision, Loss Spikes Large-model pretraining almost always uses AdamW with linear warmup plus cosine (or WSD) decay, gradient clipping and mixed precision. This page explains what each hyperparameter is for and gives a checklist for loss spikes and NaNs. Intermediate
-
Model Architecture
From the bottleneck of RNNs to attention, then the complete Transformer block, RoPE, GQA, MoE, long context, and the state space models and hybrids that trade the KV cache for a fixed-size state: the structure of modern LLMs and the reasoning behind each choice.
9 pages · about 4.5 h
- 3.1 From RNNs to Attention: Why the Transformer Appeared An RNN squeezes history into one fixed-size state and computes it step by step, so gradients pass through a long chain of multiplications. Attention lets every position read every other position directly, in parallel. Experiments measure vanishing gradients, gating and the copy bottleneck. Beginner
- 3.2 Attention Basics: How a Transformer Reads Context Understand Q/K/V, scaled dot-product attention and multi-head attention through intuition, a worked numeric example and a minimal code sample. Beginner
- 3.3 Positional Encoding Explained: Absolute, Relative and RoPE Self-attention cannot see token order, so positional encodings tell the model where a token is or how far apart two tokens are: sinusoidal and learned encodings are added to the input, relative biases and ALiBi act on attention scores, and RoPE rotates queries and keys. Intermediate
- 3.4 Transformer Block Explained: Attention, FFN, Residuals and LayerNorm A Transformer block is multi-head attention plus a feed-forward network (FFN), each wrapped in a residual connection and LayerNorm. This page gives the equations, Pre-Norm versus Post-Norm, a parameter count (about 12d²) and runnable PyTorch code. Intermediate
- 3.5 Modern LLM Architecture: From GPT-2 to Llama, Qwen and DeepSeek Almost every mainstream open LLM is a refined decoder-only Transformer: Pre-Norm with RMSNorm, a SwiGLU feed-forward network, RoPE positions and GQA attention, and some add mixture of experts (MoE) to grow parameters without growing compute in proportion. Intermediate
- 3.6 Efficient Attention: MQA, GQA, MLA and FlashAttention Attention has two bottlenecks: the KV cache that decoding rereads at every step, and the N×N score matrix of training and prefill. MQA, GQA and MLA shrink the KV cache; FlashAttention cuts memory traffic with tiling and online softmax, and its output is identical to standard attention. Intermediate
- 3.7 Mixture of Experts (MoE): Routing, Load Balancing and Sparse Activation A mixture-of-experts layer swaps the feed-forward network for many experts and routes each token to only k of them, so total parameters grow while per-token compute stays small. This page computes total and active parameters for Mixtral and DeepSeek-V3 and lets you try load balancing. Intermediate
- 3.8 Long Context: Position Extrapolation, Training Recipes and Cost Extending a context window from 4K to 128K takes three fixes: RoPE extensions (PI, NTK-aware scaling, YaRN) for unseen positions, staged continued training on long text, and a budget for attention compute and KV cache. This page covers all three with formulas, code and two interactive tools. Advanced
- 3.9 State Space Models and Hybrids: Trading the KV Cache for a Fixed-Size State Linear attention, state space models (Mamba) and the gated delta rule compress history into a fixed-size state: memory stays flat as context grows, but capacity is limited by the state size. Hybrids keep a few attention layers for exact recall; Jamba's KV cache is 1/8 of Mixtral's. Advanced
Part 2
Train LLMs
How do you train a model on a finite budget of compute and data, then teach it to follow instructions and reason?
-
Compute and Systems
GPU compute and bandwidth, the roofline model, numerical precision and collective communication. The same algorithm can differ tenfold in speed with another implementation, batch size or precision, so the hardware limits have to be understood first.
5 pages · about 2.5 h
- 4.1 LLM hardware basics: CPUs, GPUs, memory, and moving data Follow a model request through disk, host and device memory, and CPU and GPU work. Estimate tensor storage and copy time to distinguish capacity, bandwidth, and compute before diagnosing inference. Beginner
- 4.2 GPUs and the Roofline Model: Why Big Models Are Bound by Memory Bandwidth A GPU is limited by two walls: how many operations it can do per second (compute) and how many bytes it can move per second (memory bandwidth). The roofline model uses arithmetic intensity to tell which wall an operator hits first. This page derives it and measures it on a CPU. Intermediate
- 4.3 GPU kernels: from tiled matrix multiplication to fusion GPU kernel tuning combines thread-level memory access, on-chip reuse, and output stores. Derive the logical traffic of tiled matrix multiplication with edge masks, check it with a CPU experiment, and trace practical limits from staging buffers to register spills. Intermediate
- 4.4 Numerical Precision: Three Ways FP16, BF16 and FP8 Training Goes Wrong Floating-point formats split a few bits between exponent (range) and mantissa (precision). Low-precision training fails in three ways: overflow, underflow (small gradients become 0) and swamping (small terms vanish in sums). Real Qwen2.5-0.5B data shows how large each is and what fixes it. Intermediate
- 4.5 Collective Communication: Why All-Reduce Has So Many Algorithms Collective communication is the plumbing of multi-GPU training. This page simulates five all-reduce algorithms and checks them element by element, compares rounds and traffic with the alpha-beta model, then shows how topology, summation order and MoE all-to-all change the choice. Advanced
-
Pre-training
The training pipeline, data engineering (filtering, deduplication, mixing), scaling laws, the compute and memory ledger and distributed parallelism: the engineering and scientific decisions that turn raw text into usable weights for a base model.
5 pages · about 3 h
- 5.1 The LLM Training Pipeline: From Data to Deployment A map of the pipeline from data preparation, pretraining, SFT and preference alignment to evaluation and release, with the public data scale of each stage, plus a 0.86M-parameter byte-level GPT that trains on a laptop CPU to test data mixture, resuming and leakage. Intermediate
- 5.2 Pretraining Data Engineering: Filtering, Deduplication and Mixing A pretraining corpus is filtered, deduplicated and mixed step by step, and every step throws data away. This page shows what FineWeb, Gopher, DCLM and Llama 3 drop and why, then runs MinHash near-duplicate removal on a demo corpus: how many words may change before a copy stops counting. Intermediate
- 5.3 Scaling Laws: How to Split Compute Between Parameters and Data From Kaplan to Chinchilla: why loss falls as a power law in parameters, data and compute, how to split a compute budget between parameters and tokens, and why today's models are trained on far more data than the compute-optimal amount. Intermediate
- 5.4 The Compute and Memory Ledger of Training: FLOPs, MFU and Memory Budgets How many FLOPs, GPU hours and bytes of memory does training a model need? This page works out where 6ND comes from, what MFU measures, why model states cost 16 bytes per parameter, how activation memory scales, and how to sanity-check reported GPU hours. Intermediate
- 5.5 Distributed Training: Data, Tensor and Pipeline Parallelism Data parallelism splits the batch, tensor parallelism the matrices inside a layer, pipeline parallelism the stack of layers; ZeRO and FSDP shard optimizer state, gradients and parameters. Runnable checks verify gradient averaging, ring all-reduce traffic, the Megatron split and the bubble formula. Advanced
-
Post-training and Alignment
SFT, LoRA, reward models, reinforcement learning basics (policy gradients, advantages, PPO), preference optimization (RLHF and DPO) and reinforcement learning for reasoning: how a base model is shaped into something useful and controllable that learns to solve problems deliberately.
7 pages · about 5 h
- 6.1 SFT Data: Construction and Quality Control How to weigh the quantity and quality of SFT data and check it: measured effects of data size, label noise, the loss mask and mixed-in general data (Qwen2.5-0.5B on banking77), plus rule filters, near-duplicate removal and contamination checks on Alpaca, Alpaca-cleaned and Dolly. Intermediate
- 6.2 LoRA Fine-Tuning in Practice Over fifty training runs of Qwen2.5-0.5B on banking77: the formula, the parameter count and a from-scratch implementation, then learning rate, rank, target modules, epochs, full fine-tuning and QLoRA compared, and the pitfalls of merging and deployment, with code and numbers behind every claim. Intermediate
- 6.3 Reward Models: Turning Human Preferences into a Score to Optimize A reward model scores a prompt-and-response pair with one number, trained on pairwise comparisons; RLHF, rejection sampling and best-of-n all use it. This page derives the Bradley–Terry loss, measures the accuracy ceiling set by label noise, and reproduces overoptimization in simulation. Intermediate
- 6.4 Reinforcement Learning Basics: Policy Gradients, Advantages and PPO Policy gradients, baselines, GAE, PPO clipping and the KL penalty are the toolkit behind RLHF and reasoning RL. This page measures each on a toy task small enough to enumerate exactly: how baselines cut variance, why clipping is not a trust region, and where the KL belongs. Intermediate
- 6.5 Preference Optimization: From RLHF to DPO After SFT a model follows instructions, but its answers are not always the ones people prefer. Preference optimization aligns it using comparisons: RLHF trains a reward model and optimizes with PPO, while DPO reduces the pipeline to a classification-style loss on preference pairs. Advanced
- 6.6 Reinforcement Learning for Reasoning: RLVR and GRPO Since o1 and DeepSeek-R1, making a model think longer before answering has become the main line of post-training. Why verifiable rewards (RLVR) can replace a reward model, how GRPO drops the value model, and the recipe and pitfalls of R1-Zero and R1. Advanced
- 6.7 Reasoning RL systems: asynchronous rollouts and policy lag Reasoning RL joins generation, grading, learning, and weight publication. Asynchronous execution overlaps work and introduces policy lag. A runnable scheduling simulation separates elapsed time, accepted batches, and discarded trajectories. Intermediate
Part 3
Deploy and apply
How do you run a model fast and cheaply, and turn it into a reliable application?
-
Inference and Serving
Decoding and sampling, the KV cache, quantization, inference serving, continuous batching and speculative decoding: how to run LLMs fast and cheaply, and how to see the trade-offs between latency, throughput and memory.
8 pages · about 3 h
- 7.1 Your first inference service: put a model function behind HTTP Run a local inference endpoint, send JSON, and interpret status codes. Follow the model function, runtime, server, and client before learning streaming and deployment. Beginner
- 7.2 Decoding and Sampling: Temperature, Top-k, Top-p and Beam Search Decoding turns the model's output distribution into tokens: greedy picks the most likely one, temperature sharpens or flattens the distribution, top-k and top-p cut off the unlikely tail, and beam search keeps several candidates. Together they set how deterministic and diverse the output is. Beginner
- 7.3 KV Cache and Inference Performance Understand how the KV cache removes repeated computation from autoregressive decoding, and master the trade-offs between latency, throughput, memory and request scheduling. Intermediate
- 7.4 Prefix Caching and PD Disaggregation: Pay for Repeated Compute Once Prefix caching reuses the KV cache of system prompts, shared documents, and chat history across requests (RadixAttention, CacheBlend, LMCache). PD disaggregation places compute-bound prefill and bandwidth-bound decoding on different hardware; DistServe, Splitwise, and Mooncake show when it pays off. Intermediate
- 7.5 Model Quantization: INT8, INT4, GPTQ and AWQ Explained and Measured Quantization stores weights, activations or the KV cache in fewer bits. This page starts from the memory budget, builds up from scales and groups, measures INT8 and INT4 on Qwen2.5-0.5B, implements SmoothQuant, AWQ-style scaling, GPTQ and KV-cache quantization, and ends with a selection guide. Intermediate
- 7.6 LLM Inference Serving: Latency Metrics, Measuring, and Choosing an Engine A serving system has to balance time to first token, time per output token and total throughput. This page measures where one request's time goes with llama.cpp, shows why laptop benchmarks need a warm-up, and compares llama.cpp, Ollama, vLLM and SGLang. Intermediate
- 7.7 Continuous Batching and PagedAttention: How a Server Handles Many Requests at Once Every decode step reads all the weights, so putting several requests in one batch raises throughput almost for free. This page measures concurrency, continuous batching, paged KV caches and prefix caching with llama.cpp to show how one GPU serves many requests. Intermediate
- 7.8 Speculative Decoding: Draft with a Small Model, Verify with a Large One Speculative decoding lets a small, fast draft model guess the next few tokens and the large model verify them in one parallel forward pass, with an accept-and-correct rule that keeps the output distribution unchanged. This page derives the expected speedup and lets you tune it interactively. Intermediate
-
Applications
Prompt engineering, structured outputs and function calling, RAG, agents, and MCP and the tool ecosystem: the engineering methods that turn a model that can talk into a product that is reliable, measurable and easy to iterate on.
8 pages · about 5.5 h
- 8.1 Your first agent: a read-only tool and a bounded loop Use a tiny library lookup to distinguish a function call, a fixed workflow, and an agent loop. Run action, observation, and stopping cases in standard Python. Beginner
- 8.2 Prompt Engineering: A Systematic Guide to Specs, Layers, Examples and Evaluation Design the prompt as a task interface: write a task spec, layer system, examples and context, separate format errors from wrong judgments with an eval set, and use data to decide when few-shot, chain-of-thought or structured output pays off. Includes a runnable ticket-triage experiment. Intermediate
- 8.3 Structured Outputs and Function Calling: From JSON Mode to Constrained Decoding A program can use model output reliably through prompt conventions, JSON mode, JSON Schema constrained decoding, and validate-and-retry. This page explains how token masks guarantee a format, how function-call messages flow, and why format limits can hurt reasoning. Intermediate
- 8.4 RAG in Practice: Chunking, Hybrid Retrieval, Reranking and Evaluation How to build a retrieval-augmented generation system that works: clean and chunk documents, combine dense and BM25 retrieval with RRF, rerank with a cross-encoder, assemble the context, and measure every step with Hit@k and MRR on a small runnable corpus. Intermediate
- 8.5 Agents and Tool Calling in Practice: From Function Calling to ReAct Workflows An agent lets the model decide the next step in a loop, and its reliability comes from the code around the loop: validation, write confirmation, step limits and evaluation. Build one with Qwen3-4B, measure on 12 support cases what guardrails catch, and learn prompt injection, MCP and pass^k. Intermediate
- 8.6 Agent context and memory: budgets, versions, and state Context engineering fits instructions, tool history, and retrieved evidence into a model call. Long-term memory keeps confirmed preferences across sessions. Test whole tool turns, version precedence, deletion, and replay. Intermediate
- 8.7 Agent Evaluation: You Are Grading the System, Not the Model Agent evaluation grades the whole system — model, prompts, tools, loop, environment. An episode is tasks, trials, trajectories, and outcomes; pass^k measures reliability, stateful graders check final states, and cost is accounted per successful task. Intermediate
- 8.8 MCP and the Tool Ecosystem: How It Works and What to Do When Tools Pile Up MCP, the Model Context Protocol, is the open protocol that connects AI applications to external tools and data; its 2026-07-28 revision is stateless. This page shows the protocol in real messages, measures what 96 tool definitions cost in tokens, and compares three ways to pick a tool. Intermediate
-
Multimodal
How vision and language are aligned, and how images are generated: from CLIP, LLaVA and the token cost of an image to how diffusion and flow matching build images, robot actions and text from noise, the core structures and limits of multimodal models.
3 pages · about 1.5 h
- 9.1 Multimodal LLMs: How an Image Becomes Tokens A vision-language model cuts an image into patches, turns them into visual tokens with a vision encoder and a projector, and feeds them to a language model. Measured here are CLIP's contrastive loss, LLaVA's two training stages, token and KV cache costs, and how resolution affects small text. Intermediate
- 9.2 Diffusion Models and Flow Matching: Generating Images, Actions and Text from Noise Diffusion models turn data into Gaussian noise with a known process and train a network to undo it step by step; flow matching regresses a velocity field instead, so sampling is an ODE solve. This page builds DDPM, DDIM, flow matching and reflow on 2-D data and measures steps against quality. Advanced
- 9.3 World models and planning: from prediction to closed-loop control A world model predicts how actions change state. A planner compares candidate sequences and corrects its plan with observations. This tutorial explains latent dynamics and verifies replanning after a map error with a grid simulator. Intermediate
Part 4
Evaluate, secure, look ahead
How do you know whether a model is good and safe, and where is the technology heading?
-
Evaluation
How to show that a model got stronger: what benchmarks measure, the statistics of evaluation (pass@k, confidence intervals, sample size), LLM-as-a-Judge, building an evaluation set with reliable labels, and how benchmark contamination arises and is detected.
6 pages · about 2.5 h
- 10.1 LLM Evaluation Methodology: Benchmarks, Contamination and a Workflow Evaluating an LLM means estimating its performance on a whole class of tasks from a finite set of questions. This page covers what MMLU, HumanEval, GSM8K and MT-Bench measure, how to detect contamination, why a mature evaluation has four layers, and a workflow you can adopt. Intermediate
- 10.2 The Statistics of Evaluation: pass@k, Confidence Intervals and Sample Size A benchmark score is an estimate from a finite set of questions and carries error. Learn the unbiased pass@k estimator, confidence intervals for accuracy, paired comparison of two models and how many questions detecting a gap takes, with runnable code and interactive widgets. Intermediate
- 10.3 LLM-as-a-Judge: Using a Model as the Grader, Its Biases and Calibration LLM-as-a-Judge lets a strong model score answers or compare them in pairs: cheap and scalable, but prone to position bias, length bias and misjudged math. Covers the judging modes, bias mitigation, measuring agreement with humans, and Bradley–Terry ranking. Intermediate
- 10.4 Building Evaluation Sets: Question Sources, Label Quality and Item Information An evaluation set is only as good as its coverage, labels, discrimination and freshness. This page designs one from the decision it supports, then simulates how label errors lower scores and inflate sample sizes, why Cohen's kappa tracks class balance, and which items separate models. Intermediate
- 10.5 Benchmark Contamination: How It Happens, How to Detect It, How to Avoid It Benchmark contamination means evaluation questions, answers or paraphrases of them ended up in a model's training data, so scores measure memory instead of ability. A small experiment with known ground truth measures the dose-response and what n-gram and model-based detectors catch or miss. Intermediate
- 10.6 Production evaluation for LLMs: replay, canaries, and rollback Production evaluation connects model quality, system reliability, and user outcomes. Compare versions on paired requests, set release gates for critical slices, and use shadow traffic, canaries, and randomized experiments to answer different release questions. Intermediate
-
Safety and Alignment Risks
LLMs make up plausible content, get hijacked by prompt injection, are talked past guardrails by jailbreaks, and repeat training-data secrets. This chapter sorts these risks into reproducible categories with threat models, measurements and defenses; most defenses are system design.
3 pages · about 2.5 h
- 11.1 Prompt Injection and Jailbreaks: The Security Boundaries of LLM Applications Prompt injection makes a model treat untrusted content as instructions; a jailbreak makes it ignore its safety training. Attackers, targets and defenses differ. This page gives the threat models, six architectural defenses and a runnable worst-case simulation of what each defense stops. Intermediate
- 11.2 Hallucination and Calibration: Why Models Sound Sure and Are Wrong Hallucination is fluent output that contradicts the facts or the sources a model was given. This page covers two taxonomies, the floor set by facts seen only once, why binary grading rewards guessing, and three runnable simulations of calibration, temperature scaling and abstaining. Intermediate
- 11.3 Memorization and Privacy: What Models Remember, How to Measure and Reduce It Language models can memorize rare training snippets verbatim, and attackers can prompt them back out. A small experiment with known secrets measures how copies, attacker context and training strength change memorization, and compares deduplication with goldfish loss. Intermediate
-
Frontier
The fastest-moving directions in LLMs and the lasting questions behind each. For now: test-time compute (how inference compute buys accuracy), synthetic data (when model-made data helps or collapses) and mechanistic interpretability (finding features and circuits inside the network).
3 pages · about 2 h
- 12.1 Test-Time Compute: Spending Compute on Inference Test-time compute is extra computation spent while answering each question: voting over samples, verifier selection, revision, search and RL-trained long chains of thought. A reproducible simulation shows what caps the gain, what a fooled verifier does and why wall-clock time differs. Advanced
- 12.2 Synthetic Data and Self-Improvement: When Models Make Data, and When It Collapses Synthetic data is generated by a model or a program and then used for training. It keeps helping only with an outside signal: a verifier, a stronger teacher or fresh real data. Two experiments show recursive training losing the tail and only a verifier letting self-training bootstrap. Advanced
- 12.3 Mechanistic Interpretability: Superposition, Sparse Autoencoders and Circuits Mechanistic interpretability reverse-engineers a trained network into a readable algorithm. Three CPU experiments cover superposition and sparse autoencoders for finding features, the logit lens and activation patching for locating causes, and why the choice of ablation changes the answer. Advanced
No pages at this level yet
Recently updated
- Your first agent: a read-only tool and a bounded loop
- LLM Evaluation Methodology: Benchmarks, Contamination and a Workflow
- Neural Network Basics: From Linear Layers to Backpropagation
- Distributed Training: Data, Tensor and Pipeline Parallelism
- What Is a Large Language Model? From Next-Word Prediction to General Assistants