rasbt / reasoning-from-scratch
You can get free access to the e-book with a CCSF email address with this process:
Free Textbook Access
|
rasbt / reasoning-from-scratch
Flag ML 210.1: Copying Reasoning (3 pts)
What technique transfers reasoning patterns from a larger, more capable model into a smaller model?
Flag ML 210.2: Human Work (3 pts)
What technique improves reasoning by asking humans to evaluate responses?The answer is a four-letter acronym.
Flag ML 210.3: First Reasoning Model (3 pts)
What reasoning model was released to the public first?
Open a Terminal on your Mac, and execute these commands:
curl -LsSf https://astral.sh/uv/install.sh | sh
source $HOME/.local/bin/env
git clone --depth 1 https://github.com/rasbt/reasoning-from-scratch.git
cd reasoning-from-scratch
uv run jupyter lab
A browser tab should open, showing the textbook
chapters on the left side,
as shown below.
On the left side, double-click ch02.
Double-click 01_main_chapter_code.
Double-click ch02_main.ipynb.
The textbook notebook opens on the right side.
Scroll down to section 2.3, as shown below.
Click in the code box beginning with "import torch", as shown above.
In the toolbar at the top of the textbook pane, click the right-arrow to run that block of code.
The output below the code block should show that you have an Apple Silicon GPU, as shown above.
Continue through the chapter, running each block of code.
Flag ML 200.4: Speed Test (5 pts)
After running the last block of code, find the flag, which is covered by a green rectangle in the image below.
![]()
Flag ML 200.5: Tensors (3 pts)
Read the text of chapter 2 and find the answer to the question below.What PyTorch operation adds a dimension to a tensor?
Flag ML 200.6: 3 Evaluating reasoning models (5 pts)
Run the code in chapter 3.After running the last block of code, find the flag, which is covered by a green rectangle in the image below.
![]()
Flag ML 200.7: Diversity (3 pts)
Read the text of chapter 4 and find the answer to the question below.What parameter controls the diversity of token generation?
Flag ML 200.8: 4 Improving reasoning with inference-time scaling (5 pts)
Run the code in chapter 4.After running the last block of code, find the flag, which is covered by a green rectangle in the image below.
![]()
Flag ML 200.9: 5 Inference-time scaling via self-refinement (5 pts)
Run the code in chapter 5.After running the last block of code, find the flag, which is covered by a green rectangle in the image below.
![]()
Flag ML 200.10: Optimization (3 pts)
Read the text of chapter 6 and find the answer to the question below.What optimization algorithm was invented for DeepSeek? The answer is a four-letter acronym.
Flag ML 200.11: Uncertainty (3 pts)
Read the text of chapter 7 and find the answer to the question below.What metric measures how uncertain the model is?
Flag ML 200.12: Fine-Tuning (3 pts)
Read the text of chapter 8 and find the answer to the question below.What process is just supervised fine-tuning on synthetic data? The answer contains two words.
Posted 7-4-26