LLM Engineering
Build and operate language models end to end: tokenization, embeddings, transformer internals, decoding and serving, then retrieval-augmented generation and evaluation. Every stage is implemented in pure Python, from byte-level BPE counts to KV-cache sizing and nDCG. Take it after Deep Learning Essentials and NLP Starter.
Your progress
0/45 · 0%Path readiness 0%Easy 0% · Medium 0% · Hard 0%
Continue path · Byte-Level BPE Token CountWhat you will learn
- Tokenize and measure text with BPE, fertility, and vocabulary budgets
- Train and inspect embeddings, including negative sampling and pooling
- Build transformer internals: attention, norms, and gated activations
- Serve models with KV caches and decode with modern sampling strategies
- Evaluate RAG pipelines with retrieval and ranking metrics
Before you start
1Tokenization and Vocabulary
Everything starts at the tokenizer: byte-level BPE token counts, pair frequencies, vocabulary growth and merge savings, WordPiece pieces, tokenizer fertility, characters per token, vocabulary coverage, special-token budgets, and chunk lengths.
- Easy
- BPE Pair Frequency CountEasynlp-231NLP
- Easy
- Easy
- Easy
- Special Token BudgetEasynlp-240NLP
- Token Chunk LengthsEasynlp-241NLP
- BPE Vocabulary GrowthHardnlp-232NLP
- BPE Merge SavingsHardnlp-233NLP
Stage checkpoint
0/2 to passA checkpoint is a short retrieval test drawn from this stage: solve 2 of 3 from memory to mark the stage complete. The stage stays open either way.
2Embeddings and Representations
Tokens become vectors: skip-gram context pairs, CBOW averaging, negative-sampling probabilities, word2vec analogies, top-k cosine ranking, sentence mean pooling, whitening transforms, and rotary position application.
- Easy
- Whitening TransformEasynlp-152NLP
- Skip-gram Context PairsMediumnlp-063NLP
- Medium
- Medium
- Medium
- Medium
- Word2Vec AnalogyHardnlp-066NLP
Stage checkpoint
0/2 to passA checkpoint is a short retrieval test drawn from this stage: solve 2 of 3 from memory to mark the stage complete. The stage stays open either way.
3Transformer Internals
Inside the block: scaled attention scores, softmax weights, attention scaling factors, entropy and row sums, temperature, cross-attention, RMSNorm, and SwiGLU gating.
- Attention Scaling FactorEasynlp-072NLP
- Attention Row SumsEasynlp-074NLP
- Medium
- Attention EntropyMediumnlp-073NLP
- Softmax with TemperatureMediumnlp-075NLP
- Medium
- Medium
- Hard
- Cross-Attention ScoresHardnlp-076NLP
Stage checkpoint
0/2 to passA checkpoint is a short retrieval test drawn from this stage: solve 2 of 3 from memory to mark the stage complete. The stage stays open either way.
4Decoding and Serving
Generate and serve: greedy decoding, two-step beam search, top-p and top-k filtering, temperature-adjusted entropy, repetition penalties, KV-cache appends and sizing, and continuous batching rounds.
- Top-k Sampling ThresholdEasynlp-291NLP
- Easy
- Easy
- Greedy DecodingMediumnlp-077NLP
- Top-p (Nucleus) FilteringMediumnlp-079NLP
- Medium
- Medium
- Beam Search (Two Steps)Hardnlp-078NLP
- Hard
Stage checkpoint
0/2 to passA checkpoint is a short retrieval test drawn from this stage: solve 2 of 3 from memory to mark the stage complete. The stage stays open either way.
5RAG, Evaluation, and Alignment
Retrieve, rank, and judge: RAG top-k retrieval, dense passage scores, hybrid score fusion, reciprocal rank fusion, precision and recall at k, MRR, nDCG, expected calibration error, and DPO loss.
- RAG Retrieval Top-kEasynlp-141NLP
- Dense Passage Dot ScoreEasynlp-142NLP
- Retrieval Precision at kEasynlp-184NLP
- Recall at kEasynlp-185NLP
- Hybrid Score FusionMediumnlp-147NLP
- Reciprocal Rank FusionMediumnlp-148NLP
- Medium
- Medium
- Hard
- DPO LossHarddl-180Deep Learning
Stage checkpoint
0/2 to passA checkpoint is a short retrieval test drawn from this stage: solve 2 of 3 from memory to mark the stage complete. The stage stays open either way.
- Expected Calibration ErrorMedium
- nDCG at kHard
- DPO LossHard
Capstone
CollectionClose the path with one real artifact from the catalog.
Tokenization through sampling as one end-to-end pass over the stack.