P

Python

Python programming, data science, and scripting

Build & Train a GLM-5.3-Flash Model From Scratch with Python

Learn how to design, build, and train an advanced multimodal language model from scratch using modern techniques like mixture-of-experts, sparse attention, and reinforcement learning. This hands-on guide walks you through the entire lifecycle from tokenization and pre-training to post-training optim...

Watch on YouTubeadded 7 October 2026

Key moments

  1. 0:00Introduction & What We're Building
  2. 1:02The Modern AI Researcher Role & Asking Research Questions
  3. 4:50Tokenization & Byte-Level Vocabulary (Why Small Vocab Matters)
  4. 7:01Embeddings & Transformer Forward Pass Overview
  5. 8:53GLM-5.3 Architecture Overview & Model Specifications
  6. 10:25Code Walkthrough: Embeddings & Token Representation
  7. 11:56Manifold Constrained Hyperconnections (DeepSeek Residuals)
  8. 13:27Output Projection & Weight Tying
  9. 14:27RMSNorm & Normalization Layers
  10. 15:10Positional Encodings (RoPE vs. NoPE) & Sparse Attention Indexer
  11. 18:30Linear Attention (State-Space Memory) vs. Sparse Attention
  12. 20:46Mixture of Experts (MoE) & Shared Experts
  13. 23:06Adding Vision: Patch Embeddings & 2D RoPE
  14. 26:14Pre-Training Pipeline, Loss & Optimization (AdamW)
  15. 28:05Pre-Training Experiments: Data Diversity, Interleaving & Curriculums
  16. 30:27Post-Training & Reinforcement Learning (RL) Setup
  17. 34:44Designing Reward Functions & Group Relative Policy Optimization (GRPO)
  18. 37:37Parameter-Efficient RL Updates & Freezing Layers
  19. 39:35Evaluating RL Results: Task Gains & Regression Risks
  20. 40:47RL Hyperparameter Experiments: Group Size, Temperature & Seeds
  21. 43:03Summary & Advice for Aspiring AI Researchers

Chapters by freeCodeCamp.org

Sign in to add a comment

Other Coverage

Related Videos

Did you find what you came for?