diff --git a/book/Gemini_Generated_Image_b34tigb34tigb34t.png b/book/Gemini_Generated_Image_b34tigb34tigb34t.png deleted file mode 100644 index 20b49fbd..00000000 Binary files a/book/Gemini_Generated_Image_b34tigb34tigb34t.png and /dev/null differ diff --git a/book/Gemini_Generated_Image_b34tiib34tiib34t.png b/book/Gemini_Generated_Image_b34tiib34tiib34t.png deleted file mode 100644 index 91116c7b..00000000 Binary files a/book/Gemini_Generated_Image_b34tiib34tiib34t.png and /dev/null differ diff --git a/book/instructor-guide.md b/book/instructor-guide.md deleted file mode 100644 index 14ee1072..00000000 --- a/book/instructor-guide.md +++ /dev/null @@ -1,483 +0,0 @@ -# ๐Ÿ‘จโ€๐Ÿซ Instructor Guide: NBGrader + TinyTorch - -
-๐Ÿ“– Technical Setup & Workflow: This page provides step-by-step NBGrader setup and daily semester management.
-๐Ÿ“– For Course Overview & Benefits: See TinyTorch for Instructors for educational philosophy and course structure. -
- -**Complete workflow for instructors and TAs using TinyTorch with automated grading** - ---- - -## ๐ŸŽฏ The Complete Instructor Journey - -This guide walks you through everything you need to know to successfully run a TinyTorch course with automated grading, from initial setup to semester completion. - ---- - -## ๐Ÿ“‹ Prerequisites - -Before you begin, ensure you have: -- **Python 3.8+** installed on your system -- **Git** for version control -- **Terminal/Command Line** access -- **Basic familiarity** with Jupyter notebooks - -**Time Investment:** ~30 minutes for initial setup, then 5-10 minutes per assignment - ---- - -## ๐Ÿš€ Phase 1: Initial Setup (One-Time) - -### Step 1: Clone and Setup Repository - -```bash -# Clone the TinyTorch repository -git clone https://github.com/your-org/TinyTorch.git -cd TinyTorch - -# Create and activate virtual environment -python3 -m venv .venv -source .venv/bin/activate # On Windows: .venv\Scripts\activate - -# Install all dependencies -pip install -r requirements.txt -pip install nbgrader jupyter jupytext rich -``` - -### Step 2: Verify Installation - -```bash -# Test that everything is working -./bin/tito system doctor - -# Expected output: -# โœ… Python 3.x.x -# โœ… Virtual environment active -# โœ… All dependencies installed -# โœ… TinyTorch CLI ready -``` - -### Step 3: Initialize NBGrader Environment - -```bash -# Initialize the grading infrastructure -./bin/tito nbgrader init - -# Expected output: -# โœ… NBGrader version: 0.9.5 -# ๐Ÿ“ Created directory: assignments -# โœ… NBGrader database initialized -# ๐ŸŽ‰ NBGrader environment initialized successfully! -``` - -### Step 4: Verify Complete Setup - -```bash -# Check system status -./bin/tito module status --comprehensive - -# Should show: -# ๐Ÿ Environment Health: All โœ… green -# ๐Ÿ“Š Module Status: Overview of 17 modules -# ๐ŸŽฏ Priority Actions: Any setup issues to fix -``` - ---- - -## ๐ŸŽ“ Phase 2: Course Preparation - -### Understanding the TinyTorch Module Structure - -TinyTorch has **17 progressive modules**: - -**Foundation (Modules 00-02):** -- `00_introduction` - Visual system overview and dependencies -- `01_setup` - Development environment and CLI workflow -- `02_tensor` - Multi-dimensional arrays and operations - -**Building Blocks (Modules 03-07):** -- `03_activations` - Mathematical functions and nonlinearity -- `04_layers` - Neural network layer abstractions -- `05_dense` - Fully connected layers and matrix operations -- `06_spatial` - Convolutional operations and computer vision -- `07_attention` - Self-attention and transformer mechanisms - -**Training Systems (Modules 08-11):** -- `08_dataloader` - Data pipeline and CIFAR-10 integration -- `09_autograd` - Automatic differentiation engine -- `10_optimizers` - SGD, Adam, and learning rate scheduling -- `11_training` - Training loops, loss functions, and metrics - -**Production & Performance (Modules 12-16):** -- `12_compression` - Model pruning and quantization -- `13_kernels` - Custom operations and hardware optimization -- `14_benchmarking` - MLPerf-style evaluation and profiling -- `15_mlops` - Production deployment and monitoring -- `16_capstone` - Final integration project - -### Course Planning Recommendations - -**๐Ÿ“… Semester Planning (14-16 weeks):** -``` -Week 1: 00_introduction + 01_setup -Week 2: 02_tensor -Week 3: 03_activations -Week 4: 04_layers -Week 5: 05_dense -Week 6: 06_spatial -Week 7: 07_attention -Week 8: Midterm / Review -Week 9: 08_dataloader -Week 10: 09_autograd -Week 11: 10_optimizers -Week 12: 11_training -Week 13: 12_compression + 13_kernels -Week 14: 14_benchmarking + 15_mlops -Week 15: 16_capstone -Week 16: Final presentations -``` - ---- - -## ๐Ÿ“ Phase 3: Assignment Management - -### Creating Student Assignments - -**For Individual Modules:** -```bash -# Generate assignment from TinyTorch module -./bin/tito nbgrader generate 01_setup - -# This creates: -# assignments/source/01_setup/01_setup.ipynb (instructor version) -``` - -**For Multiple Modules:** -```bash -# Generate first 4 modules -./bin/tito nbgrader generate --range 01-04 - -# Or generate all modules at once (start of semester) -./bin/tito nbgrader generate --all -``` - -**What happens during generation:** -1. Reads the module's `.py` file from `modules/source/XX_module/` -2. Converts to Jupyter notebook using jupytext -3. Processes with NBGrader to create student version -4. Removes instructor solutions, adds `# YOUR CODE HERE` stubs -5. Creates assignments in `assignments/source/XX_module/` - -### Releasing Assignments to Students - -```bash -# Release individual assignment -./bin/tito nbgrader release 01_setup - -# Release multiple assignments -./bin/tito nbgrader release --range 01-04 - -# This creates: -# assignments/release/01_setup/01_setup.ipynb (student version) -``` - -**Distribution to Students:** -- Upload `assignments/release/XX_module/XX_module.ipynb` to your LMS -- Or provide direct access to the `assignments/release/` directory -- Students download and work on their local copies - -### Monitoring Assignment Status - -```bash -# Check what assignments exist -./bin/tito nbgrader status - -# Example output: -# ๐Ÿ“š Source assignments: 4 -# - 01_setup, 02_tensor, 03_activations, 04_layers -# ๐Ÿš€ Released assignments: 2 -# - 01_setup, 02_tensor -# ๐Ÿ“ฅ Submitted assignments: 1 -# - 01_setup -# ๐ŸŽฏ Graded assignments: 0 -``` - ---- - -## ๐Ÿ“Š Phase 4: Grading Workflow - -### Collecting Student Submissions - -**Manual Collection (Most Common):** -```bash -# Students submit via LMS, you download to: -mkdir -p assignments/submitted/01_setup/student_name/ -# Place student notebooks in: assignments/submitted/01_setup/student_name/01_setup.ipynb -``` - -**NBGrader Exchange (If Using Shared Server):** -```bash -# Collect all submissions for an assignment -./bin/tito nbgrader collect 01_setup -``` - -### Auto-Grading Process - -```bash -# Auto-grade specific assignment -./bin/tito nbgrader autograde 01_setup - -# Auto-grade all collected assignments -./bin/tito nbgrader autograde --all - -# What happens: -# - Executes all student code -# - Runs hidden test cells -# - Checks assert statements -# - Records pass/fail for each test -# - Creates detailed grading reports -``` - -### Generating Student Feedback - -```bash -# Generate feedback for specific assignment -./bin/tito nbgrader feedback 01_setup - -# Generate feedback for all assignments -./bin/tito nbgrader feedback --all - -# Creates: -# assignments/feedback/01_setup/student_name/01_setup.html -``` - -### Exporting Grades - -```bash -# Export grades to CSV -./bin/tito nbgrader report --format csv - -# Creates: grades.csv with all student scores -``` - ---- - -## ๐Ÿ”ง Phase 5: Common Workflows - -### Weekly Assignment Routine - -```bash -# Monday: Generate and release new assignment -./bin/tito nbgrader generate 03_activations -./bin/tito nbgrader release 03_activations - -# Upload assignments/release/03_activations/03_activations.ipynb to LMS -# Announce assignment to students - -# Friday: Collect submissions and grade -# (Download student submissions from LMS to assignments/submitted/) -./bin/tito nbgrader autograde 03_activations -./bin/tito nbgrader feedback 03_activations - -# Monday: Return graded assignments and feedback to students -``` - -### Mid-Semester Status Check - -```bash -# Comprehensive system status -./bin/tito module status --comprehensive - -# Assignment analytics -./bin/tito nbgrader analytics 03_activations - -# Export current gradebook -./bin/tito nbgrader report --format csv -``` - -### End-of-Semester Workflow - -```bash -# Generate final gradebook -./bin/tito nbgrader report --format csv - -# Archive all assignments and submissions -tar -czf course_archive_fall2024.tar.gz assignments/ gradebook.db - -# Clean up for next semester -./bin/tito clean -./bin/tito nbgrader init # Fresh start -``` - ---- - -## ๐Ÿ› ๏ธ Phase 6: Troubleshooting & Tips - -### Common Issues - -**"Module not found" when generating:** -```bash -# Check available modules -ls modules/source/ - -# Use exact directory name -./bin/tito nbgrader generate 02_tensor # Not just "tensor" -``` - -**"NBGrader validation failed":** -```bash -# This is expected for student notebooks (they have unimplemented functions) -# Validation failure = students need to implement the code -``` - -**Environment issues:** -```bash -# Always activate virtual environment first -source .venv/bin/activate - -# Check environment health -./bin/tito system doctor -``` - -### Best Practices - -**๐Ÿ“‹ Assignment Preparation:** -- Generate all assignments at start of semester -- Test each assignment yourself before releasing -- Provide clear due dates and submission instructions - -**โฐ Grading Efficiency:** -- Set up consistent folder structure for submissions -- Use batch grading commands (`--all` flags) -- Review auto-graded results before finalizing - -**๐Ÿ’ก Student Support:** -- Share `./bin/tito module status` command with students -- Encourage testing with provided test functions -- Provide clear error message interpretation - -### Advanced Configuration - -**Customize point values in `nbgrader_config.py`:** -```python -# Adjust timeout for long-running assignments -c.ExecutePreprocessor.timeout = 300 # 5 minutes per cell - -# Customize solution stubs -c.ClearSolutions.code_stub = { - "python": "# YOUR IMPLEMENTATION HERE\nraise NotImplementedError()" -} -``` - ---- - -## ๐Ÿ“š Phase 7: Student Guidance - -### What to Tell Your Students - -**Setup Instructions for Students:** -```bash -# Students should run: -git clone [your-course-repo] -cd TinyTorch -python3 -m venv .venv -source .venv/bin/activate -pip install -r requirements.txt - -# Test their setup: -./bin/tito system doctor -``` - -**Working on Assignments:** -```markdown -1. Download the assignment notebook from [LMS] -2. Open in Jupyter: `jupyter lab assignment.ipynb` -3. Look for `# YOUR CODE HERE` markers -4. Implement the required functions -5. Test your work with provided test cells -6. Submit the completed notebook -``` - -**Debugging Help:** -```bash -# Students can check their module status -./bin/tito module status - -# Get help with specific modules -./bin/tito module info 02_tensor -``` - ---- - -## ๐ŸŽฏ Quick Reference Commands - -### Essential Daily Commands -```bash -# Check overall system status -./bin/tito module status --comprehensive - -# Assignment lifecycle -./bin/tito nbgrader generate MODULE_NAME -./bin/tito nbgrader release MODULE_NAME -./bin/tito nbgrader autograde MODULE_NAME -./bin/tito nbgrader feedback MODULE_NAME - -# Monitor progress -./bin/tito nbgrader status -./bin/tito nbgrader analytics MODULE_NAME -``` - -### Batch Operations -```bash -# Work with multiple modules -./bin/tito nbgrader generate --range 01-04 -./bin/tito nbgrader release --all -./bin/tito nbgrader autograde --all -./bin/tito nbgrader feedback --all -``` - -### System Maintenance -```bash -# Environment health -./bin/tito system doctor - -# Clean temporary files -./bin/tito clean - -# Export final grades -./bin/tito nbgrader report --format csv -``` - ---- - -## ๐Ÿ“ž Getting Help - -**If you encounter issues:** - -1. **Check system status**: `./bin/tito system doctor` -2. **Review logs**: Check output messages for specific errors -3. **Consult documentation**: This guide covers 95% of common scenarios -4. **Community support**: [GitHub Issues](https://github.com/your-org/TinyTorch/issues) - -**For urgent instructor support:** -- Create detailed issue with error messages -- Include output of `./bin/tito module status --comprehensive` -- Specify which assignment and step is failing - ---- - -## ๐ŸŽ‰ Success Metrics - -**You'll know you're successful when:** -- โœ… Students can download and run assignments without setup issues -- โœ… Auto-grading provides consistent, fair evaluation -- โœ… Weekly assignment workflow takes <10 minutes -- โœ… Students build a complete ML framework by semester end -- โœ… You have detailed analytics on student progress and common issues - -**Ready to run the most comprehensive ML systems course your students will ever take!** ๐Ÿš€ - ---- - -*This guide covers the complete instructor journey from setup to course completion. For specific technical details, see the individual command documentation with `./bin/tito --help`.* \ No newline at end of file diff --git a/book/leaderboard.md b/book/leaderboard.md deleted file mode 100644 index 8c7fba2e..00000000 --- a/book/leaderboard.md +++ /dev/null @@ -1,233 +0,0 @@ -# ๐Ÿ† Leaderboard - -**Compete. Optimize. Rank.** - ---- - -## ๐ŸŽฏ Competition Rankings - -The TinyTorch Olympics Leaderboard showcases the top-performing systems from students who have completed the capstone challenge. Rankings are updated in real-time as new submissions are evaluated. - -
-

Live Leaderboard (Coming Soon)

-

Competition rankings will be displayed here after Module 20 infrastructure is deployed

-
- ---- - -## ๐Ÿ“Š Current Competition Categories - -### โšก Speed Demon -**Fastest inference on standard hardware** -- Metric: Inferences per second -- Minimum accuracy: โ‰ฅ90% -- Focus: Computational optimization - -### ๐Ÿ’พ Memory Miser -**Smallest memory footprint** -- Metric: Peak memory usage (MB) -- Minimum accuracy: โ‰ฅ85% -- Focus: Efficient architectures - -### ๐Ÿ“ฑ Edge Expert -**Best performance on constrained hardware** -- Metric: Composite score -- Platform: Raspberry Pi 4B -- Focus: Complete optimization - -### ๐Ÿ”‹ Energy Efficient -**Lowest power consumption** -- Metric: Energy per inference (joules) -- Focus: Algorithm efficiency - -### ๐Ÿƒโ€โ™‚๏ธ TinyMLPerf -**MLPerf-style benchmark suite** -- Metric: Standardized benchmarks -- Focus: Production readiness - ---- - -## ๐Ÿ… How to Compete - -### 1. Complete Prerequisites -```bash -# Finish all required modules -tito checkpoint status - -# Verify you're ready for capstone -tito module test 20 -``` - -### 2. Submit Your Model -```bash -# Register for competition -tito olympics register - -# Submit baseline -tito olympics submit --baseline - -# After optimization, submit final -tito olympics submit --final -``` - -### 3. View Rankings -```bash -# Check your scores -tito olympics scores - -# View full leaderboard -tito olympics leaderboard - -# Generate report -tito olympics report --format pdf -``` - ---- - -## ๐ŸŽฏ Scoring System - -### Primary Ranking -- **Category-specific metric**: Speed, memory, energy, etc. -- **Accuracy threshold**: Must meet minimum to qualify -- **Tie-breaker**: Higher accuracy wins - -### Bonus Recognition -- **๐Ÿš€ Innovation Award**: Novel optimization techniques -- **๐Ÿ“š Teaching Award**: Best documented approach -- **๐ŸŽฏ First Blood**: First to beat instructor baseline - -### Overall Champion -- Best combined performance across โ‰ฅ3 categories -- Weighted by difficulty of optimization -- Special recognition and portfolio artifact - ---- - -## ๐Ÿ“ˆ Sample Leaderboard - -### โšก Speed Demon Category - -| Rank | Student | Inf/sec | Accuracy | Optimization | -|------|---------|---------|----------|--------------| -| ๐Ÿฅ‡ | alice_chen | 847.3 | 95.2% | Vectorization + caching | -| ๐Ÿฅˆ | bob_smith | 612.7 | 94.8% | Custom kernels | -| ๐Ÿฅ‰ | carol_wong | 588.1 | 96.1% | Batch optimization | -| 4 | dave_kim | 542.9 | 93.7% | Parallel processing | -| 5 | eve_patel | 501.2 | 94.1% | Memory layout | - -### ๐Ÿ’พ Memory Miser Category - -| Rank | Student | Memory (MB) | Accuracy | Optimization | -|------|---------|-------------|----------|--------------| -| ๐Ÿฅ‡ | dave_kim | 12.4 | 91.7% | INT8 quantization | -| ๐Ÿฅˆ | eve_patel | 15.8 | 93.2% | Weight pruning | -| ๐Ÿฅ‰ | frank_liu | 18.2 | 89.9% | Compressed format | -| 4 | grace_lee | 21.5 | 92.4% | Activation sharing | -| 5 | henry_zhao | 24.1 | 90.8% | Efficient layers | - ---- - -## ๐ŸŒŸ Hall of Fame - -### Semester Champions - -**Spring 2024** -- ๐Ÿ† Overall: Jordan Lee (95.2 composite score) -- โšก Speed: Alice Chen (847.3 inf/sec) -- ๐Ÿ’พ Memory: Dave Kim (12.4 MB) -- ๐Ÿ“ฑ Edge: Grace Lee (94.5 score) - -**Fall 2023** -- ๐Ÿ† Overall: Sam Park (93.8 composite score) -- โšก Speed: Morgan Smith (812.1 inf/sec) -- ๐Ÿ’พ Memory: Alex Wong (13.2 MB) -- ๐Ÿ“ฑ Edge: Taylor Brown (92.7 score) - ---- - -## ๐ŸŽ“ What Leaderboard Performance Shows - -### To Potential Employers -- **Systems engineering skills**: You can optimize real systems -- **Competitive performance**: You can achieve results under constraints -- **Technical depth**: You understand performance trade-offs -- **Quantifiable achievements**: Clear metrics of capability - -### Portfolio Impact - -**Strong statement:** -> "Ranked #2 in Memory Efficiency in TinyTorch Olympics (Fall 2024), achieving 13.8 MB footprint with 92.1% accuracy through quantization and pruning techniques." - -**Hiring managers recognize:** -- Competitive achievement (leaderboard ranking) -- Technical specificity (quantization, pruning) -- Quantitative results (13.8 MB, 92.1% accuracy) -- Systems thinking (memory vs. accuracy trade-offs) - ---- - -## ๐Ÿš€ Getting Started - -### Ready to Compete? - -1. **Complete Module 20** (Capstone) -2. **Optimize your system** using modules 14-19 -3. **Submit your model** for evaluation -4. **See your ranking** on the leaderboard - -```bash -# Start your Olympic journey -tito olympics register -``` - ---- - -## ๐Ÿ“… Competition Timeline - -### Ongoing Submissions -- Leaderboard accepts submissions year-round -- Rankings update in real-time -- Semester champions crowned at end of term - -### Seasonal Events -- **Mid-semester sprint**: Early optimization challenge -- **Final week rush**: Last chance to climb rankings -- **Victory ceremony**: Recognition of top performers - ---- - -## ๐Ÿค Fair Competition - -### Rules & Guidelines - -**Allowed:** -- Any technique from modules 1-19 -- Custom implementations within TinyTorch -- Novel optimization strategies -- Hardware-specific optimizations - -**Not Allowed:** -- External ML frameworks (PyTorch, etc.) -- Pre-trained external models -- Hardcoded test outputs -- Breaking API contracts - -**Verification:** -- All submissions automatically validated -- Code review for top 10 in each category -- Reproducibility required -- Fair hardware access provided - ---- - -
-

๐Ÿ† Join the Competition

-

Complete Module 20 and submit your optimized system

-

Prove your systems engineering skills. See how you rank.

-
- ---- - -**The leaderboard doesn't lie. Your optimization skills speak for themselves.** - -*Ready to compete?* โ†’ Complete [Module 20: Capstone](chapters/20-capstone.md) diff --git a/book/user-manual.md b/book/user-manual.md deleted file mode 100644 index 4818818e..00000000 --- a/book/user-manual.md +++ /dev/null @@ -1,646 +0,0 @@ -# TinyTorch User Manual - -## Welcome to Your ML Systems Engineering Journey - -This comprehensive user manual will guide you from installation to mastery, whether you're spending 15 minutes exploring or 15 weeks building complete systems. - -## ๐Ÿงญ Navigation Guide - -### **For New Users** -- **[๐Ÿš€ Quick Start](#quick-start)** - Get running in 5 minutes -- **[๐ŸŽฏ Choose Your Path](#learning-paths)** - Find your ideal learning journey -- **[๐Ÿ“ฑ First Commands](#essential-commands)** - Master the basics - -### **For Active Learners** -- **[๐Ÿ“š Module Guide](#module-system)** - Understand the learning structure -- **[โœ… Checkpoint System](#checkpoint-system)** - Track and validate progress -- **[๐ŸŒ Community Features](#community-features)** - Connect with fellow learners - -### **For Instructors** -- **[๐ŸŽ“ Teaching Guide](#instructor-resources)** - Classroom setup and management -- **[๐Ÿ“Š Progress Tracking](#student-progress)** - Monitor student achievements -- **[๐Ÿ“ Grading System](#nbgrader-integration)** - Automated assessment workflow - ---- - -## ๐Ÿš€ Quick Start - -### **Installation (3 minutes)** - -```bash -# 1. Clone repository -git clone https://github.com/mlsysbook/TinyTorch.git -cd TinyTorch - -# 2. Setup environment -python -m venv .venv -source .venv/bin/activate # Windows: .venv\Scripts\activate - -# 3. Install dependencies -pip install -r requirements.txt -pip install -e . - -# 4. Verify installation -tito system doctor -``` - -### **First Experience (2 minutes)** - -```bash -# See what you'll build -tito demo quick - -# Check your learning path -tito checkpoint status - -# Start your journey -tito help --interactive -``` - -**โœ… Success Indicators:** -- `tito system doctor` shows all green checkmarks -- `tito checkpoint status` displays 21 learning checkpoints -- `tito demo quick` runs without errors - ---- - -## ๐ŸŽฏ Learning Paths - -Choose your journey based on your goals and available time: - -### ๐Ÿ”ฌ **Explorer Path** (15 minutes - 2 hours) -**Goal**: Understand what TinyTorch is and see it in action - -```bash -# Quick demonstration -tito demo quick - -# See the big picture -tito checkpoint timeline --horizontal - -# Try building something small -cd modules/source/01_setup -jupyter lab setup_dev.py -``` - -**You'll Experience:** -- How neural networks work at the code level -- What building ML systems from scratch looks like -- Whether you want to go deeper - ---- - -### ๐ŸŽฏ **Builder Path** (Weekend - 4 weeks) -**Goal**: Build substantial ML components and understand systems - -```bash -# Start structured learning -tito checkpoint status -cd modules/source/01_setup - -# Work through foundation modules -# Complete 1-2 modules per session -# Goal: Build working neural network (Modules 1-6) -``` - -**Milestones:** -- **Week 1**: Tensors and basic operations (Modules 1-2) -- **Week 2**: Neural network components (Modules 3-5) -- **Week 3**: Training systems (Modules 6-8) -- **Week 4**: First real project - CIFAR-10 CNN - ---- - -### ๐Ÿš€ **Engineer Path** (8-12 weeks) -**Goal**: Complete framework capable of modern ML applications - -```bash -# Full curriculum with community participation -tito leaderboard join -tito checkpoint status - -# Systematic progression through all modules -# Regular community engagement -# Optimization and competition participation -``` - -**Journey Stages:** -1. **Foundation** (Weeks 1-4): Neural networks from scratch -2. **Architecture** (Weeks 5-7): Computer vision and language models -3. **Training** (Weeks 8-10): Complete training systems -4. **Optimization** (Weeks 11-12): Performance and deployment -5. **Mastery** (Ongoing): TinyMLPerf competition and community - ---- - -### ๐ŸŽ“ **Instructor Path** -**Goal**: Teach TinyTorch to students with full classroom support - -```bash -# Instructor setup -tito nbgrader setup-instructor -tito grade setup-course - -# Student progress tracking -tito leaderboard instructor-dashboard -``` - -**Resources:** -- **[Classroom Setup Guide](usage-paths/classroom-use.html)** - Complete NBGrader workflow -- **[Student Progress Tracking](#student-progress)** - Monitor achievements -- **[Assessment Resources](#instructor-resources)** - Grading and feedback tools - ---- - -## ๐Ÿ“ฑ Essential Commands - -### **Daily Learning Workflow** - -```bash -# Check your progress -tito checkpoint status - -# Work on current module -cd modules/source/0X_module_name -jupyter lab module_name_dev.py - -# Complete module when done -tito module complete 0X_module_name - -# Celebrate achievement -tito checkpoint test XX -``` - -### **Getting Help** - -```bash -# Interactive guidance -tito help --interactive - -# Quick reference -tito help --quick - -# Specific help topics -tito help getting-started -tito help workflow -tito help troubleshooting -``` - -### **Community Engagement** - -```bash -# Join the global community -tito leaderboard join - -# Submit your progress -tito leaderboard submit - -# See your ranking -tito leaderboard status - -# Compete in Olympics -tito olympics register -``` - -### **System Management** - -```bash -# Check system health -tito system doctor - -# Clean up generated files -tito clean all - -# Reset progress (careful!) -tito reset --confirm -``` - ---- - -## ๐Ÿ“š Module System - -### **Understanding the Structure** - -TinyTorch organizes learning into **20 progressive modules**, each building essential ML systems capabilities: - -``` -modules/source/ -โ”œโ”€โ”€ 01_setup/ ๐Ÿ“ฆ Development environment -โ”œโ”€โ”€ 02_tensor/ ๐Ÿ”ข N-dimensional arrays + operations -โ”œโ”€โ”€ 03_activations/ ๐Ÿ“ˆ ReLU, Sigmoid, Softmax -โ”œโ”€โ”€ 04_layers/ ๐Ÿงฑ Linear layers + parameters -โ”œโ”€โ”€ 05_losses/ ๐Ÿ“‰ CrossEntropy, MSE + gradients -โ”œโ”€โ”€ 06_autograd/ ๐Ÿ”„ Automatic differentiation -โ”œโ”€โ”€ 07_optimizers/ ๐Ÿ“Š SGD, Adam + learning schedules -โ”œโ”€โ”€ 08_training/ ๐ŸŽฏ Complete training loops -โ”œโ”€โ”€ 09_spatial/ ๐Ÿ–ผ๏ธ Conv2d, MaxPool2d + CNNs -โ”œโ”€โ”€ 10_dataloader/ ๐Ÿ“‚ Efficient data pipelines -โ”œโ”€โ”€ 11_tokenization/ ๐Ÿ“ Text processing + vocabularies -โ”œโ”€โ”€ 12_embeddings/ ๐ŸŽญ Token + positional embeddings -โ”œโ”€โ”€ 13_attention/ ๐Ÿ‘๏ธ Multi-head attention -โ”œโ”€โ”€ 14_transformers/ ๐Ÿค– Complete transformer blocks -โ”œโ”€โ”€ 15_profiling/ ๐Ÿ” Performance analysis -โ”œโ”€โ”€ 16_acceleration/ โšก Hardware optimization -โ”œโ”€โ”€ 17_quantization/ ๐Ÿ“ฆ Model compression -โ”œโ”€โ”€ 18_compression/ ๐Ÿ—œ๏ธ Pruning + distillation -โ”œโ”€โ”€ 19_caching/ ๐Ÿ’พ Memory optimization -โ””โ”€โ”€ 20_capstone/ ๐Ÿ† Complete ML systems -``` - -### **Module Workflow** - -Each module follows the proven **Build โ†’ Use โ†’ Reflect** pattern: - -#### **1. Build Implementation** -```python -# In module_name_dev.py -def your_implementation(): - """Build component from scratch using only NumPy.""" - return result -``` - -#### **2. Use Immediately** -```python -# Test your implementation -from tinytorch.core.module_name import YourComponent -component = YourComponent() -result = component(data) -``` - -#### **3. Reflect on Systems** -- **Memory Analysis**: How much RAM does this use? -- **Performance Profile**: Where are the bottlenecks? -- **Scaling Behavior**: What breaks with larger inputs? -- **Production Context**: How do real systems handle this? - -#### **4. Export and Validate** -```bash -# Export your implementation to the framework -tito module complete 0X_module_name - -# Automatically runs checkpoint test -# Celebrates achievement -# Shows next steps -``` - ---- - -## โœ… Checkpoint System - -### **16 Capability Checkpoints** - -The checkpoint system validates your learning through **capability-based assessment**: - -```bash -# See all checkpoints -tito checkpoint timeline - -# Check current progress -tito checkpoint status - -# Test specific capability -tito checkpoint test 05 -``` - -### **Checkpoint Progression** - -| Checkpoint | Capability Question | Prerequisites | -|------------|-------------------|---------------| -| 00 | Can I configure my development environment? | Setup complete | -| 01 | Can I create and manipulate ML building blocks? | Module 02 | -| 02 | Can I add nonlinearity for intelligence? | Module 03 | -| 03 | Can I build neural network components? | Module 04 | -| 04 | Can I build complete multi-layer networks? | Module 05 | -| 05 | Can I process spatial data with convolutions? | Module 09 | -| 06 | Can I build attention mechanisms? | Module 13 | -| 07 | Can I stabilize training with normalization? | Module 08 | -| 08 | Can I compute gradients automatically? | Module 06 | -| 09 | Can I optimize with sophisticated algorithms? | Module 07 | -| 10 | Can I build complete training loops? | Module 08 | -| 11 | Can I prevent overfitting? | Module 11 | -| 12 | Can I implement high-performance kernels? | Module 16 | -| 13 | Can I analyze and optimize performance? | Module 15 | -| 14 | Can I deploy ML systems in production? | Module 20 | -| 15 | Can I build complete end-to-end systems? | Capstone | - -### **Checkpoint Achievement Flow** - -```bash -# Automatic flow when completing modules -tito module complete 02_tensor -# โ†“ Automatically triggers -# โ†“ Export to tinytorch package -# โ†“ Run checkpoint_01_foundation test -# โ†“ Show achievement celebration -# โ†“ Display next steps -``` - ---- - -## ๐ŸŒ Community Features - -### **Global Learning Community** - -Join thousands of learners worldwide building ML systems: - -```bash -# Join the community -tito leaderboard join - -# Submit your progress -tito leaderboard submit - -# See global rankings -tito leaderboard view -``` - -### **Leaderboard Categories** - -**๐Ÿƒโ€โ™‚๏ธ Progress Leaderboard** -- **Checkpoint completion**: How many capabilities achieved? -- **Module completion**: Which modules finished? -- **Achievement dates**: When did you reach milestones? - -**๐Ÿ† Performance Olympics** -- **Speed competitions**: Fastest training times -- **Memory challenges**: Most memory-efficient implementations -- **Accuracy contests**: Highest model performance -- **Innovation showcases**: Novel optimization techniques - -### **Community Interaction** - -```bash -# See your community profile -tito leaderboard profile - -# View achievement feed -tito leaderboard feed - -# Join competitions -tito olympics register --event cnn_marathon - -# Share achievements -tito leaderboard share --milestone "First neural network!" -``` - -### **Privacy and Inclusion** - -- **Pseudonymous participation**: Choose your display name -- **Inclusive categories**: Multiple ways to excel and contribute -- **Supportive community**: Celebration of all learning achievements -- **Privacy controls**: Share what you're comfortable sharing - ---- - -## ๐ŸŽ“ Instructor Resources - -### **Classroom Setup** - -Complete NBGrader integration for seamless course management: - -```bash -# Initial instructor setup -tito nbgrader setup-instructor -tito grade setup-course - -# Student workspace preparation -tito nbgrader create-student-repos -``` - -### **Student Progress Tracking** - -```bash -# Class overview -tito grade class-overview - -# Individual student progress -tito grade student-progress - -# Checkpoint completion rates -tito checkpoint class-stats -``` - -### **Assignment Management** - -```bash -# Release new module -tito nbgrader release 05_losses - -# Collect submissions -tito nbgrader collect 05_losses - -# Auto-grade submissions -tito nbgrader autograde 05_losses - -# Manual grading interface -tito nbgrader formgrade 05_losses -``` - -### **Course Customization** - -**Semester Planning:** -- **8-week intensive**: Modules 1-12 (foundations + one specialization) -- **16-week comprehensive**: All 20 modules with optimization -- **4-week bootcamp**: Modules 1-8 (neural network foundations) - -**Difficulty Adjustment:** -- **Beginner**: Extended explanations and scaffolding -- **Advanced**: Additional optimization challenges -- **Research**: Custom project integration - ---- - -## ๐Ÿ”ง Troubleshooting Guide - -### **Common Issues and Solutions** - -#### **Installation Problems** - -**Issue**: `tito: command not found` -```bash -# Solution: Ensure virtual environment is activated -source .venv/bin/activate # or .venv\Scripts\activate on Windows -pip install -e . -``` - -**Issue**: Import errors in modules -```bash -# Solution: Check system health -tito system doctor - -# Fix common issues -pip install -r requirements.txt --force-reinstall -``` - -#### **Module Development Issues** - -**Issue**: Notebook won't open -```bash -# Solution: Check Jupyter installation -pip install jupyter jupyterlab -jupyter lab --version -``` - -**Issue**: Tests failing after implementation -```bash -# Solution: Debug with verbose output -tito checkpoint test 03 --verbose - -# Check implementation against expected interface -python modules/source/03_activations/activations_dev.py -``` - -#### **Export and Integration Issues** - -**Issue**: `tito module complete` fails -```bash -# Solution: Check module structure -tito module validate 05_losses - -# Fix export directives -# Ensure #| default_exp tinytorch.core.losses at top of file -``` - -**Issue**: Checkpoint tests fail after export -```bash -# Solution: Check package imports -python -c "from tinytorch.core.losses import CrossEntropyLoss; print('Success')" - -# Reinstall in development mode -pip install -e . --force-reinstall -``` - -### **Getting More Help** - -1. **Interactive CLI Help**: `tito help --interactive` -2. **System Diagnostics**: `tito system doctor` -3. **Community Support**: Join the leaderboard for peer help -4. **Documentation**: Check module README files -5. **Instructor Support**: Contact course staff through established channels - ---- - -## ๐Ÿ“Š Frequently Asked Questions - -### **Learning Questions** - -**Q: How long does it take to complete TinyTorch?** -A: Depends on your goals: -- **Quick exploration**: 15 minutes - 2 hours -- **Weekend project**: Build neural networks (8-12 hours) -- **Complete journey**: 8-12 weeks for full framework -- **Instructor preparation**: 2-3 weeks for course setup - -**Q: Do I need ML experience to start?** -A: No! TinyTorch teaches ML systems from fundamentals. You need: -- Basic Python programming (functions, classes) -- High school math (matrix multiplication) -- Curiosity about how things work internally - -**Q: How is this different from PyTorch tutorials?** -A: PyTorch teaches you to USE frameworks. TinyTorch teaches you to BUILD them: -- **PyTorch**: `torch.nn.Linear(784, 128)` (black box) -- **TinyTorch**: You implement every line of Linear layer -- **Result**: Deep understanding of how frameworks actually work - -### **Technical Questions** - -**Q: What's the difference between modules and checkpoints?** -A: -- **Modules**: 20 hands-on coding sessions where you build components -- **Checkpoints**: 16 capability tests that validate your learning -- **Relationship**: Modules provide code, checkpoints verify understanding - -**Q: Can I skip modules or do them out of order?** -A: No, the progression is carefully designed: -- Each module builds on previous ones -- Checkpoints verify prerequisites -- Skipping breaks the learning flow and later modules won't work - -**Q: What if I get stuck on a module?** -A: Multiple support options: -- `tito help troubleshooting` for common issues -- `tito system doctor` for technical problems -- Community leaderboard for peer support -- Module README files for detailed guidance - -### **Community Questions** - -**Q: Is the leaderboard competitive or collaborative?** -A: Both! We celebrate all achievements: -- **Multiple categories**: Progress, speed, memory efficiency, innovation -- **Inclusive design**: Many ways to excel and contribute -- **Supportive community**: Everyone's learning journey matters -- **Privacy controls**: Share only what you're comfortable sharing - -**Q: Can I participate without sharing my progress publicly?** -A: Yes! Leaderboard participation is optional: -- All learning features work independently -- Checkpoint system tracks your progress locally -- You can join community later if you change your mind - -### **Instructor Questions** - -**Q: How much setup is required for classroom use?** -A: Minimal - TinyTorch includes complete teaching infrastructure: -- NBGrader integration works out-of-the-box -- Student repositories auto-generated -- Progress tracking built-in -- Grading workflow automated - -**Q: Can I customize the curriculum for my class?** -A: Absolutely: -- **Flexible duration**: 4-16 weeks depending on depth -- **Difficulty adjustment**: Extra scaffolding or advanced challenges -- **Custom projects**: Integration with existing coursework -- **Modular design**: Focus on specific topics as needed - ---- - -## ๐Ÿš€ Next Steps - -### **Ready to Start?** - -Choose your path and begin your ML systems engineering journey: - -๐Ÿ”ฌ **[Explorer (15 minutes)](#explorer-path)**: Quick taste with `tito demo quick` - -๐ŸŽฏ **[Builder (Weekend)](#builder-path)**: Build neural networks from scratch - -๐Ÿš€ **[Engineer (8-12 weeks)](#engineer-path)**: Complete framework development - -๐ŸŽ“ **[Instructor](#instructor-path)**: Teach TinyTorch to your students - -### **Essential First Commands** - -```bash -# System check -tito system doctor - -# Interactive guidance -tito help --interactive - -# See the journey ahead -tito checkpoint timeline - -# Start building -cd modules/source/01_setup -jupyter lab setup_dev.py -``` - -### **Join the Community** - -```bash -# Connect with learners worldwide -tito leaderboard join - -# Share your progress -tito leaderboard submit - -# Compete and learn -tito olympics explore -``` - ---- - -**You're about to build everything from tensors to transformers. Let's start your journey! ๐Ÿš€** \ No newline at end of file diff --git a/docs/archive/book-development/CLEANUP_SUMMARY.md b/docs/archive/book-development/CLEANUP_SUMMARY.md new file mode 100644 index 00000000..07911151 --- /dev/null +++ b/docs/archive/book-development/CLEANUP_SUMMARY.md @@ -0,0 +1,103 @@ +# Book Directory Cleanup Summary + +Date: November 7, 2025 +Branch: website-content-improvements + +## Files Deleted (Duplicates) + +### 1. user-manual.md (17K) +- **Reason**: Complete duplicate of quickstart-guide.md +- **Status**: quickstart-guide.md is in TOC and actively maintained + +### 2. instructor-guide.md (12K) +- **Reason**: Duplicate of usage-paths/classroom-use.md +- **Status**: classroom-use.md is in TOC ("For Instructors") + +### 3. leaderboard.md (6.2K) +- **Reason**: Old "TinyTorch Olympics" content +- **Status**: Superseded by community.md and Module 20 (MLPerfยฎ Edu Competition) + +**Total Deleted**: ~35KB of duplicate content + +## Files Archived (Development/Reference) + +Moved to: `docs/archive/book-development/` + +### Development Files: +- THEME_DESIGN.md (4.5K) - Design documentation +- convert_modules.py (17K) - Build script +- convert_readmes.py (11K) - Build script +- verify_build.py (3.2K) - Build script + +### Documentation (Not in TOC): +- faq.md (18K) - FAQ content (may add to TOC later) +- kiss-principle.md (6.7K) - Design philosophy +- vision.md (7.3K) - Project vision document + +### Unused Usage Paths: +- quick-exploration.md (2.7K) - Alternative usage path +- serious-development.md (6.6K) - Alternative usage path +- **Note**: Only classroom-use.md is in active TOC + +**Total Archived**: ~77KB of reference content + +## Images Archived + +Moved to: `book/_static/archive/` + +- Gemini_Generated_Image_1as0881as0881as0.png +- Gemini_Generated_Image_b34tigb34tigb34t.png +- Gemini_Generated_Image_b34tiib34tiib34t.png + +**Reason**: AI-generated images not used in current site + +## Files Remaining in book/ (All Active) + +### Root Level (In TOC): +- intro.md (12K) - Homepage +- quickstart-guide.md (8.4K) - Getting Started +- tito-essentials.md (8.9K) - CLI reference +- learning-progress.md (6.4K) - Progress tracking +- checkpoint-system.md (11K) - Checkpoint system +- testing-framework.md (13K) - Testing guide +- resources.md (5.4K) - Additional resources +- community.md (1.5K) - Community page + +### Subdirectories: +- chapters/ (21 files) - All 20 modules + introduction +- chapters/milestones.md - Referenced in intro +- appendices/api-reference.md - API documentation +- usage-paths/classroom-use.md - Instructor guide (in TOC) + +### Assets: +- logo-tinytorch-*.png (3 files) - Active logos +- tensortorch.png - Project image +- _static/ - CSS, JS, favicon + +## Result + +**Before Cleanup**: 39 markdown files in book/ +**After Cleanup**: 29 markdown files (26% reduction) + +**Benefits**: +- โœ… No duplicate content +- โœ… Clear separation of active vs archived content +- โœ… Easier maintenance +- โœ… Cleaner repository structure +- โœ… All active files are in TOC or properly referenced + +## Files to Consider Adding to TOC + +If we want to surface this content: +- appendices/api-reference.md - Could add to Resources section +- chapters/milestones.md - Already referenced, could add to TOC +- docs/archive/book-development/faq.md - Could add if FAQ is needed + +## Notes + +All archived files are preserved and can be: +1. Restored if needed +2. Referenced in documentation +3. Updated and added to TOC later +4. Used as reference for future content + diff --git a/book/THEME_DESIGN.md b/docs/archive/book-development/THEME_DESIGN.md similarity index 100% rename from book/THEME_DESIGN.md rename to docs/archive/book-development/THEME_DESIGN.md diff --git a/book/convert_modules.py b/docs/archive/book-development/convert_modules.py similarity index 100% rename from book/convert_modules.py rename to docs/archive/book-development/convert_modules.py diff --git a/book/convert_readmes.py b/docs/archive/book-development/convert_readmes.py similarity index 100% rename from book/convert_readmes.py rename to docs/archive/book-development/convert_readmes.py diff --git a/book/faq.md b/docs/archive/book-development/faq.md similarity index 100% rename from book/faq.md rename to docs/archive/book-development/faq.md diff --git a/book/kiss-principle.md b/docs/archive/book-development/kiss-principle.md similarity index 100% rename from book/kiss-principle.md rename to docs/archive/book-development/kiss-principle.md diff --git a/book/usage-paths/quick-exploration.md b/docs/archive/book-development/quick-exploration.md similarity index 100% rename from book/usage-paths/quick-exploration.md rename to docs/archive/book-development/quick-exploration.md diff --git a/book/usage-paths/serious-development.md b/docs/archive/book-development/serious-development.md similarity index 100% rename from book/usage-paths/serious-development.md rename to docs/archive/book-development/serious-development.md diff --git a/book/verify_build.py b/docs/archive/book-development/verify_build.py similarity index 100% rename from book/verify_build.py rename to docs/archive/book-development/verify_build.py diff --git a/book/vision.md b/docs/archive/book-development/vision.md similarity index 100% rename from book/vision.md rename to docs/archive/book-development/vision.md