Book II · Chapter 7
ML implementation
Implement core algorithms and transformer mechanisms with tests and explicit contracts.
Chapter contents
9 entries · read in order- 01 Implement KNN efficiently✓ Question
- 02 Implement reverse-mode autodiff for scalar expressions✓ Question
- 03 Implement attention from scratch✓ Question
- 04 Implement a pre-norm Transformer decoder block✓ Question
- 05 Implement incremental decoding with a KV cache✓ Question
- 06 Implement beam search with EOS and length normalization✓ Question
- 07 Implement a LoRA adapter for a frozen linear layer✓ Question
- 08 Implement memory-bounded batched top-k retrieval✓ Question
- 09 Implement mergeable streaming classification metrics✓ Question