mirror of
https://github.com/MLSysBook/TinyTorch.git
synced 2026-06-01 18:45:52 -05:00
Update examples integration with module progression
- Update EXAMPLES mapping in tito to use new exciting names - Add prominent examples section to main README - Show clear progression: Module 05 → xornet, Module 11 → cifar10 - Update accuracy claims to realistic 57% (not aspirational 75%) - Emphasize that examples are unlocked after module completion - Connect examples to the learning journey Students now understand when they can run exciting examples!
This commit is contained in:
45
README.md
45
README.md
@@ -12,8 +12,8 @@ A Harvard University course that teaches ML systems engineering by building a co
|
||||
## 🎯 What You'll Build
|
||||
|
||||
A **complete ML framework** capable of:
|
||||
- Training CNNs on CIFAR-10 to 75%+ accuracy
|
||||
- Building GPT-style language models
|
||||
- Training neural networks on CIFAR-10 to 57%+ accuracy (exceeds course benchmarks!)
|
||||
- Building GPT-style language models
|
||||
- Implementing modern optimizers (Adam, learning rate scheduling)
|
||||
- Production deployment with monitoring and MLOps
|
||||
|
||||
@@ -102,35 +102,26 @@ model.fit(X, y) # Magic happens
|
||||
- **Jupyter Book**: Professional course website
|
||||
- **Complete Solutions**: Reference implementations included
|
||||
|
||||
## 📊 Example: Train a CNN on CIFAR-10
|
||||
## 🔥 Examples You Can Run
|
||||
|
||||
```python
|
||||
from tinytorch.core.networks import Sequential
|
||||
from tinytorch.core.spatial import Conv2D
|
||||
from tinytorch.core.activations import ReLU
|
||||
from tinytorch.core.dataloader import CIFAR10Dataset
|
||||
from tinytorch.core.training import Trainer
|
||||
from tinytorch.core.optimizers import Adam
|
||||
As you complete modules, exciting examples unlock to show your framework in action:
|
||||
|
||||
# Load real data
|
||||
dataset = CIFAR10Dataset(download=True)
|
||||
train_loader = DataLoader(dataset.train_data, batch_size=32)
|
||||
|
||||
# Build CNN
|
||||
model = Sequential([
|
||||
Conv2D(3, 32, kernel_size=3),
|
||||
ReLU(),
|
||||
Conv2D(32, 64, kernel_size=3),
|
||||
ReLU(),
|
||||
Dense(64*28*28, 10)
|
||||
])
|
||||
|
||||
# Train
|
||||
trainer = Trainer(model, loss=CrossEntropyLoss(), optimizer=Adam())
|
||||
trainer.fit(train_loader, epochs=30)
|
||||
# Achieves 75%+ accuracy!
|
||||
### **After Module 05** → `examples/xornet/` 🔥
|
||||
```bash
|
||||
cd examples/xornet
|
||||
python train.py
|
||||
# 🎯 100% accuracy on XOR problem!
|
||||
```
|
||||
|
||||
### **After Module 11** → `examples/cifar10/` 🎯
|
||||
```bash
|
||||
cd examples/cifar10
|
||||
python train_cifar10_mlp.py
|
||||
# 🏆 57.2% accuracy on real images!
|
||||
```
|
||||
|
||||
**These aren't toy demos** - they're real ML applications achieving competitive results with YOUR framework built from scratch!
|
||||
|
||||
## 🧪 Testing & Validation
|
||||
|
||||
All demos and modules are thoroughly tested:
|
||||
|
||||
@@ -34,21 +34,21 @@ from pathlib import Path
|
||||
# Example mapping - shows what TinyTorch can do after each module
|
||||
EXAMPLES = {
|
||||
"01_setup": None, # Just environment setup
|
||||
"02_tensor": "tensor_operations",
|
||||
"03_activations": "activation_functions",
|
||||
"04_layers": "layer_composition",
|
||||
"05_dense": "xor_network", # 🏆 Classic XOR problem
|
||||
"06_spatial": "mnist_recognition", # 🏆 MNIST CNN
|
||||
"07_attention": "attention_visualization",
|
||||
"08_dataloader": "data_loading",
|
||||
"09_autograd": "automatic_differentiation",
|
||||
"10_optimizers": "optimization_comparison",
|
||||
"11_training": "cifar10_classifier", # 🏆 Full CNN training
|
||||
"12_compression": "model_compression",
|
||||
"13_kernels": "performance_kernels",
|
||||
"14_benchmarking": "performance_profiling",
|
||||
"15_mlops": "production_deployment",
|
||||
"16_tinygpt": "text_generation" # 🏆 Transformer text generation
|
||||
"02_tensor": None, # Foundation only
|
||||
"03_activations": None, # Building blocks only
|
||||
"04_layers": None, # Components only
|
||||
"05_dense": "xornet", # 🔥 XORnet - Neural network fundamentals
|
||||
"06_spatial": None, # CNN components (no working example yet)
|
||||
"07_attention": None, # Attention building blocks
|
||||
"08_dataloader": None, # Data loading components
|
||||
"09_autograd": None, # XORnet already shows autograd
|
||||
"10_optimizers": None, # Optimization components
|
||||
"11_training": "cifar10", # 🎯 CIFAR-10 - Real computer vision
|
||||
"12_compression": None, # Advanced optimization
|
||||
"13_kernels": None, # Performance optimization
|
||||
"14_benchmarking": None, # Performance analysis
|
||||
"15_mlops": None, # Production deployment concepts
|
||||
"16_tinygpt": None # Complete GPT implementation (Module 16)
|
||||
}
|
||||
|
||||
class ModuleCommand(BaseCommand):
|
||||
|
||||
Reference in New Issue
Block a user