|
8 | 8 | > |
9 | 9 | > 📖 **中文版 (Chinese version)**: [README_CN.md](README_CN.md) |
10 | 10 |
|
11 | | -**📚 Jump to a topic** — 28 first-party cheat sheets across 7 categories + 1 community-contributed category: |
| 11 | +**📚 Jump to a topic** — 29 first-party cheat sheets across 7 categories + 1 community-contributed category: |
12 | 12 |
|
13 | 13 | [🧠 General / Foundations](#-general--foundations) · [🎯 Post-Training & Reasoning](#-post-training--reasoning) · [🏛️ LLM Architecture & Systems](#-llm-architecture--systems) · [🌊 Generative Models — Theory & Tokenizers](#-generative-models--theory--tokenizers) · [🎨 Generation Systems (Image / Video / 3D / Diffusion Post-Training)](#-generation-systems--image--video--3d--diffusion-post-training) · [👁️ Multimodal](#-multimodal) · [🤖 Agents](#-agents) · [🦾 Embodied AI / 具身智能](#-embodied-ai--具身智能) |
14 | 14 |
|
@@ -66,6 +66,7 @@ Phone on the subway, iPad at a café, laptop in the library — same HTML link o |
66 | 66 |
|
67 | 67 | ## 📢 What's New |
68 | 68 |
|
| 69 | +- **2026-07-11** —  🔤 **#29 Tokenization cheat sheet** — the foundation the whole collection had been taking for granted: the **pipeline mental model** (chat template / special-token recognition upstream · normalization → pre-tokenization → segmentation model → IDs → post-processing) · **BPE / WordPiece / Unigram** (training ≠ encoding — the #1 hand-coding trap) · **byte-level BPE vs byte fallback** (`Ġ` vs `▁`) · **the five vocab quantities** (mergeable · special · len(tokenizer) · max-ID+1 · embedding rows — cl100k has ID holes, Qwen pads by checkpoint size) · **fertility / BPB metrics** · **vocab extension** (lexical vs control paths) · **production traps** (prefix instability / token healing · special-token injection · glitch tokens · offset mapping) · **tokenizer-free** (ByT5 / MegaByte / BLT). **Bilingual** (中文 + EN), with a runnable script ([`code/tokenization.py`](docs/tutorials/code/tokenization.py) — exact GPT-2 `bytes_to_unicode`, frozen-rank BPE encoding, both Unigram DPs (forward 0.22350625 hand-checked), vocab-extension regression; pure stdlib, verified on a real box) and 25 高频题. First tutorial with cross-model review moved UP to the design stage (81 GPT-5.6-sol guardrails before drafting + 5 review batches + 1 dispute round + an ultra final SHIP — corrections flowed both ways: the reviewer caught 6 hard errors, the orchestrator overturned the reviewer's Qwen vocab claim). [`tokenization_tutorial.html`](docs/tutorials/tokenization_tutorial.html). |
69 | 70 | - **2026-06-29** —  ⚙️ **#28 Optimizers & LR Schedules cheat sheet** — the optimizer/schedule training-mechanics gap: **SGD·Momentum·Nesterov** · **AdaGrad→RMSProp→Adam** (the adaptive lineage) · **Adam bias correction** (the uncorrected first step is ~3.16× too *large*, not small — the direction trap) · **AdamW decoupled weight decay** (Adam's L2 ≠ weight decay) · **frontier** (Muon / Lion / Shampoo / SOAP / Adafactor / LAMB / Sophia) · **LR schedules** (warmup / cosine / Noam / WSD / one-cycle) · weight decay + LR-batch scaling + no-decay groups · grad clipping + LLM hyperparams (β₂=0.95). **Bilingual** (中文 + EN), with a runnable script ([`code/optimizer_lr_schedule.py`](docs/tutorials/code/optimizer_lr_schedule.py) — SGD/Adam/AdamW from-scratch vs `torch.optim`, the executable **AdamW≠Adam+L2** proof, the bias-correction direction, cosine-warmup, verified on a real box) and 25 高频题. [`optimizer_lr_schedule_tutorial.html`](docs/tutorials/optimizer_lr_schedule_tutorial.html). |
70 | 71 | - **2026-06-19** —  🧱 **#27 Normalization / Residual / Init cheat sheet** — the foundational training-mechanics hole: **BatchNorm / LayerNorm / RMSNorm / GroupNorm** · **Pre-vs-Post-LN** (Xiong's gradient argument — why Post-LN needs warmup) · **DeepNorm / Sandwich / QK-Norm** · **residual connections + scaling** (LayerScale / ReZero / GPT-2's 1/√(2N)) · **Xavier vs Kaiming** (the ReLU factor-2, and why the preserved quantity is the second moment E[y²], not Var) · **μP** (width-invariant HP transfer) · **Fixup / NFNets / DyT** (norm-free) · plus the **covariate-shift debunk** (Santurkar). **Bilingual** (中文 + EN), with a runnable script ([`code/normalization.py`](docs/tutorials/code/normalization.py) — from-scratch LN/RMSNorm vs `torch` + Pre/Post-LN gradient + Kaiming second-moment + GPT-2 residual scaling, verified on a real box) and 25 高频题. The cross-model review caught a real methodological confound in the Pre/Post-LN gradient demo (an output-normalization artifact) and redesigned it to a loss-robust top/bottom weight-grad ratio. [`normalization_init_tutorial.html`](docs/tutorials/normalization_init_tutorial.html). |
71 | 72 | - **2026-06-18** —  ⚡ **#26 Linear / Sparse Attention cheat sheet** — the sub-quadratic / efficient-attention hole the collection kept referencing but never derived: **linear attention** (kernel φ + associativity → matrix-state RNN) · **SSM / Mamba** (selective S6) · **Mamba-2 / SSD** (1-semiseparable duality ≡ structured masked linear attention) · **DeltaNet / Gated DeltaNet** (overwrite update) · **chunkwise-parallel** training · **trainable sparse** (NSA three-branch / MoBA / Lightning / DSA) · **hybrid** (Jamba / Hymba / Qwen3-Next / Kimi-Linear / MiniMax-01). **Bilingual** (中文 + EN), with a runnable script ([`code/linear_sparse_attention.py`](docs/tutorials/code/linear_sparse_attention.py) — `chunkwise ≡ recurrent` equivalence + delta-rule + block-sparse, verified on a real box) and 25 高频题, settled through multi-batch Codex GPT-5.5 xhigh citation / math / code / answer / overall + render-fidelity review. [`linear_sparse_attention_tutorial.html`](docs/tutorials/linear_sparse_attention_tutorial.html) ([#22](https://github.com/wanshuiyin/ARIS-in-AI-Offer/pull/22) · [b84e913](https://github.com/wanshuiyin/ARIS-in-AI-Offer/commit/b84e913)). |
@@ -113,6 +114,7 @@ Long-form technical blogs — hand-authored, cross-model reviewed; outside the a |
113 | 114 | | **Attention Interview Cheat Sheet** | [📄 CN](https://wanshuiyin.github.io/ARIS-in-AI-Offer/tutorials/attention_tutorial.html) | [📄 EN](https://wanshuiyin.github.io/ARIS-in-AI-Offer/tutorials/attention_tutorial_en.html) | [MD](docs/tutorials/attention_tutorial.md) | |
114 | 115 | | **Normalization / Residual / Init (BatchNorm / LayerNorm / RMSNorm / Pre-vs-Post-LN / DeepNorm / QK-Norm / Xavier·Kaiming / μP)** | [📄 CN](https://wanshuiyin.github.io/ARIS-in-AI-Offer/tutorials/normalization_init_tutorial.html) | [📄 EN](https://wanshuiyin.github.io/ARIS-in-AI-Offer/tutorials/normalization_init_tutorial_en.html) | [MD](docs/tutorials/normalization_init_tutorial.md) | |
115 | 116 | | **Optimizers & LR Schedules (SGD·Momentum / Adam·AdamW / Muon·Lion·Shampoo·SOAP / warmup·cosine·WSD)** | [📄 CN](https://wanshuiyin.github.io/ARIS-in-AI-Offer/tutorials/optimizer_lr_schedule_tutorial.html) | [📄 EN](https://wanshuiyin.github.io/ARIS-in-AI-Offer/tutorials/optimizer_lr_schedule_tutorial_en.html) | [MD](docs/tutorials/optimizer_lr_schedule_tutorial.md) | |
| 117 | +| **Tokenization (BPE / WordPiece / Unigram·SentencePiece / byte-level·byte fallback / vocab·fertility·BPB / tokenizer-free)** | [📄 CN](https://wanshuiyin.github.io/ARIS-in-AI-Offer/tutorials/tokenization_tutorial.html) | [📄 EN](https://wanshuiyin.github.io/ARIS-in-AI-Offer/tutorials/tokenization_tutorial_en.html) | [MD](docs/tutorials/tokenization_tutorial.md) | |
116 | 118 | | **KL Divergence in RLHF (k1/k2/k3 · placement gradient bias)** | [📄 CN](https://wanshuiyin.github.io/ARIS-in-AI-Offer/tutorials/kl_divergence_rlhf_tutorial.html) | [📄 EN](https://wanshuiyin.github.io/ARIS-in-AI-Offer/tutorials/kl_divergence_rlhf_tutorial_en.html) | [MD](docs/tutorials/kl_divergence_rlhf_tutorial.md) | |
117 | 119 |
|
118 | 120 | ### 🎯 Post-Training & Reasoning |
|
0 commit comments