11. Pre-trained Models
Chapter focus: ## Transformer Architecture
- Self-Attention Mechanism
- Multi-Head Attention
- Feed Forward Network (FFN)
Positional Encoding
- Absolute Positional Encoding (Sinusoidal)
- Rotary Positional Embedding (RoPE)
Training Objectives
- Masked Language Modeling (MLM)
- Causal Language Modeling (CLM)
🧭 Reading Map
- Prerequisites: 10. Frameworks — pre-training engineering builds on framework capabilities
- Role: opening of Part 4, L4 — pre-training architectures (MoE/MLA) and data/compute/engineering pipelines
- Order: data pipeline & compute planning (do the math first) → model architecture (DeepSeek MoE/MLA) → training engineering
- Next: 12. Distributed Training — with a model in hand, train efficiently on thousands of GPUs
Articles
DeepSeek Architecture: MLA & Extreme MoE Optimization
A deep dive into DeepSeek-V3/R1 architecture innovations, explaining how MLA compresses KV Cache and how Fine-Grained MoE achieves load balancing.
阅读文章 →
LLM Pretraining Data Pipeline: From Raw Corpus to High-Quality Training Set
Runnable engineering scripts dissecting the pretraining data pipeline: corpus cleaning, quality filtering, deduplication, mixing ratios, and tokenizer training, with a pipeline diagram and engineering takeaways.
阅读文章 →
Pretraining Engineering: Checkpoints, Fault Tolerance, and Training Stability
Reproducible configs dissecting pretraining engineering: checkpoint strategy (period/async/sharding), node-fault recovery, loss-anomaly triage, and training-stability guardrails, with engineering takeaways.
阅读文章 →
RTP Hybrid Architecture: DeepSeek & Next-Gen Paradigm
In-depth analysis of the Retention-Transformer Pipeline (RTP) hybrid architecture, revealing its performance advantages in training and inference.
阅读文章 →
MoE Training Engineering: Expert Parallelism & Load Balancing in Practice
EP placement, load-balancing loss, token dropping, All-to-All overhead.
阅读文章 →
Pretraining Compute & Cost Planning: GPU Estimation & Card-Hour Budget
card-hour estimation, MFU corrections, allocation, budget flow.
阅读文章 →
Scaling Law Ledger: Loss-Compute-Data
Kaplan vs Chinchilla allocation, the 6ND compute floor, inference-time scaling, with reproducible Python.
阅读文章 →