Video course · 15 chapters · 63 min · certificate
LLM Development Essentials: Build and Train Qwen 3 from Scratch
Build and train a small Qwen 3-style LLM from scratch in PyTorch: the architecture, configuration, grouped query attention, training hyperparameters, the Muon optimizer, data loading, RoPE, self-attention, SwiGLU feed-forward, assembling the model, evaluation, training and text generation.
What you'll learn
- Describe Qwen 3's architecture
- Implement grouped query attention
- Explain the Muon optimizer
- Implement RoPE and self-attention
- Build SwiGLU feed-forward blocks
- Train and generate text with the model
Chapters
15 chapters · 63:04-
1:46
01Intro Members
Intro and demo
Qwen 3 from scratch.
-
3:40
02Architecture Members
Architecture and setup
Transformer plus Qwen specifics.
-
3:00
03Config Members
Model configuration
Dimensions and heads.
-
3:58
04Architecture Members
Qwen 3 specifics
Sharing key/value heads.
-
4:54
05Training Members
Training hyperparameters
Batch, accumulation, LR.
-
1:38
06GQA Members
Grouped query attention logic
Repeating KV heads.
-
10:06
07Optimizer Members
Muon optimizer
A newer optimizer.
-
3:35
08Data Members
Data loading and tokenization
Preparing text.
-
4:19
09Positions Members
RoPE positional embeddings
Rotary embeddings.
-
7:32
10Attention Members
Self-attention code
Implementing attention.
-
3:08
11FFN Members
Feed-forward and SwiGLU
The MLP block.
-
4:58
12Model Members
Building the final model
Stacking blocks.
-
3:09
13Training Members
Evaluation and the training loop
Loss, accuracy, perplexity.
-
2:55
14Training Members
Running the training
Data loaders and runs.
-
4:26
15Inference Members
Inference and results
Generating text.