llm-internals

A step-by-step learning resource that explains LLM concepts, tokenization, and attention through linked articles and videos, helping readers understand how language models process text.

Share on XLicense: Apache-2.0

Overview

LLM Internals is a step-by-step learning resource about how large language models process text and generate responses. It helps bridge the gap between using LLMs and understanding the mechanisms behind them through linked articles and videos. The material starts with LLM concepts, then covers tokenization, Byte Pair Encoding, stop tokens, and the math of attention with Query, Key, and Value. Readers can work through the explanations in sequence and follow the linked videos.

Key features

  • Introduces LLMs and related concepts including RAG, MCP, agents, fine-tuning, and quantization.
  • Explains character-, word-, and subword-level tokenization, BPE, token IDs, and decoding.
  • Covers stop tokens and their role in generated text and chat turns.
  • Works through Query, Key, and Value attention math with a numeric example.

Best for

Useful for readers who want to understand how LLMs process text, one concept at a time. Choose it to learn from linked explanations and videos rather than only using LLMs.

Upstream
amitshekhariitbhu/llm-internals
Fork on GitHub
Guo-astro/llm-internals
Upstream stars
1.7k
Category
Learning, interviews and curated lists
License
Apache-2.0
Forked
2026-10-03
Sync status
In syncLast synced 2026-10-05