diff --git a/book/_toc.yml b/book/_toc.yml index c6320be8..c8b168c2 100644 --- a/book/_toc.yml +++ b/book/_toc.yml @@ -74,18 +74,14 @@ parts: title: "18. KV Caching" - file: chapters/19-benchmarking title: "19. Benchmarking" + +- caption: ๐Ÿ… Competition + chapters: - file: chapters/20-capstone - title: "20. Capstone" + title: "20. AI Olympics" -- caption: ๐Ÿ† Historical Milestones +- caption: ๐ŸŒ Community chapters: - - file: chapters/milestones - title: "Journey Through ML History" - -- caption: ๐Ÿ… Community - chapters: - - file: leaderboard - title: "Leaderboard" - file: community title: "Ecosystem" diff --git a/book/chapters/20-capstone.md b/book/chapters/20-capstone.md index 9441daca..87965cc8 100644 --- a/book/chapters/20-capstone.md +++ b/book/chapters/20-capstone.md @@ -1,444 +1,65 @@ -# 20. Capstone +# 20. AI Olympics -**TinyTorch Olympics: Compete on Systems Performance** +**Your Capstone Project** --- ## ๐ŸŽฏ Overview -The TinyTorch Olympics is your **final systems engineering challenge**โ€”a competitive capstone where you optimize your TinyTorch implementations across multiple performance dimensions. This isn't just about accuracy; it's about speed, memory efficiency, power consumption, and real-world deployment constraints. +The AI Olympics is your final capstone project where you bring together everything you've learned throughout the course. You'll optimize your TinyTorch implementation and see how it performs. -### Why a Competitive Capstone? +### What You'll Do -**Most ML courses end with:** "Build a project that works." -**TinyTorch ends with:** "Optimize your system and compete." +- **Apply your knowledge**: Use all the modules you've built (tensors through optimizations) +- **Optimize your system**: Experiment with different performance improvements +- **Benchmark your work**: Measure speed, memory, and efficiency +- **Take part in competition**: Compare your results with others (optional) -This reflects the reality of production ML engineering: -- Getting a model working is just the beginning -- Performance matters: speed, memory, power, cost -- Systems engineering skills separate good ML engineers from great ones -- Real ML teams optimize and benchmark constantly +This is about learning to care about **performance, not just correctness**โ€”which is what production ML engineering is all about. --- -## ๐Ÿ† Competition Categories +## ๐Ÿ† Competition Platform (Coming Soon) -### โšก Speed Demon -**"Fastest inference on standard hardware"** +
+

๐Ÿšง Infrastructure Under Development

+

We're building the competition platform with automated submissions, live leaderboard, and benchmarking infrastructure. You can still complete your capstone project and optimize your implementation now!

+
-- **Metric**: Inferences per second -- **Skills Tested**: Kernel optimization, parallelization, caching -- **Constraint**: Must maintain โ‰ฅ90% accuracy -- **Modules Applied**: 14-19 optimization techniques +### Planned Competition Categories -### ๐Ÿ’พ Memory Miser -**"Smallest memory footprint"** +**โšก Speed Optimization** +- Fastest inference times -- **Metric**: Peak memory usage during inference -- **Skills Tested**: Quantization, compression, efficient architectures -- **Constraint**: Must maintain โ‰ฅ85% accuracy -- **Modules Applied**: Quantization (16), Compression (17) +**๐Ÿ’พ Memory Efficiency** +- Smallest memory footprint -### ๐Ÿ“ฑ Edge Expert -**"Best performance on resource-constrained hardware"** +**๐Ÿ“ฑ Edge Performance** +- Best performance on resource-constrained devices -- **Metric**: Composite score (speed + accuracy + efficiency) -- **Skills Tested**: Complete optimization pipeline -- **Constraint**: Must run on edge devices (e.g., Raspberry Pi) -- **Modules Applied**: Full optimization suite (14-19) - -### ๐Ÿ”‹ Energy Efficient -**"Lowest power consumption"** - -- **Metric**: Energy per inference (joules/prediction) -- **Skills Tested**: Model compression, efficient algorithms -- **Constraint**: Must maintain competitive accuracy -- **Modules Applied**: Profiling (14), Optimization (15-19) - -### ๐Ÿƒโ€โ™‚๏ธ TinyMLPerf -**"Official MLPerf-style benchmark"** - -- **Metric**: Standardized benchmark suite performance -- **Skills Tested**: Complete systems optimization -- **Constraint**: Must pass all compliance tests -- **Modules Applied**: Benchmarking (19) + All optimization +**๐Ÿ† Live Leaderboard** +- Real-time rankings by category +- Semester champions and recognition --- -## ๐ŸŽฎ Competition Structure +## ๐ŸŽฏ What Makes a Good Capstone -### Phase 1: Baseline Submission -**"Establish your starting point"** +**Systems Thinking** +- Understand performance trade-offs +- Profile before optimizing +- Measure everything -```bash -# Submit your best model from modules 1-13 -tito olympics submit --baseline +**Real Optimization** +- Apply techniques from modules 14-19 +- Use data to guide decisions +- Document what works and what doesn't -# Get initial scores across all categories -tito olympics scores --category all -``` - -**What happens:** -- Your model is evaluated across all categories -- You see where you rank initially -- You identify which categories to focus on - -### Phase 2: Optimization Sprint -**"Apply modules 14-19 systematically"** - -```bash -# Profile your model -tito olympics profile - -# Apply optimization techniques -# Module 14: Profile and identify bottlenecks -# Module 15: Implement acceleration techniques -# Module 16: Add quantization for memory/speed -# Module 17: Apply compression for size -# Module 18: Implement caching strategies -# Module 19: Benchmark against production systems -``` - -**Strategy:** -1. **Week 1**: Profile and analyze bottlenecks -2. **Week 2**: Apply memory optimizations -3. **Week 3**: Implement speed improvements -4. **Week 4**: Test on edge hardware -5. **Week 5**: Final benchmarking and submission - -### Phase 3: Final Submission & Rankings -**"See how you stack up"** - -```bash -# Submit optimized models -tito olympics submit --final - -# View live leaderboard -tito olympics leaderboard - -# Generate portfolio report -tito olympics report -``` +**Portfolio Quality** +- Clear before/after metrics +- Explanation of techniques used +- Reproducible results --- -## ๐Ÿ“Š Leaderboard System - -### Real-Time Rankings - -``` -๐Ÿ† TinyTorch Olympics Leaderboard - -โšก Speed Demon Category: -1. alice_chen 847.3 inf/sec (95.2% acc) ๐Ÿฅ‡ -2. bob_smith 612.7 inf/sec (94.8% acc) ๐Ÿฅˆ -3. carol_wong 588.1 inf/sec (96.1% acc) ๐Ÿฅ‰ - -๐Ÿ’พ Memory Miser Category: -1. dave_kim 12.4 MB (91.7% acc) ๐Ÿฅ‡ -2. eve_patel 15.8 MB (93.2% acc) ๐Ÿฅˆ -3. frank_liu 18.2 MB (89.9% acc) ๐Ÿฅ‰ - -๐Ÿ“ฑ Edge Expert Category: -1. grace_lee Score: 94.5 (Composite) ๐Ÿฅ‡ -2. henry_zhao Score: 91.2 (Composite) ๐Ÿฅˆ -3. iris_tan Score: 88.7 (Composite) ๐Ÿฅ‰ -``` - -### Scoring Methodology - -**Primary Metrics:** -- Each category has its own performance metric -- Must meet minimum accuracy threshold to qualify -- Tie-breaker: Higher accuracy wins - -**Bonus Points:** -- **Innovation Award**: Novel optimization techniques (+5%) -- **Documentation Award**: Exceptional technical writeup (+3%) -- **Teaching Award**: Best educational explanation (+3%) - -**Overall Champion:** -- Best combined performance across ALL categories -- Requires competing in at least 3 categories -- Weighted by difficulty of optimization achieved - ---- - -## ๐ŸŽฏ Deliverables - -### Competition Submission Package - -**1. Optimized Model** -```bash -my_submission/ -โ”œโ”€โ”€ model.py # Your optimized TinyTorch model -โ”œโ”€โ”€ requirements.txt # Dependencies -โ”œโ”€โ”€ README.md # Setup instructions -โ””โ”€โ”€ run_benchmark.py # Evaluation script -``` - -**2. Performance Report** -- Optimization techniques applied -- Before/after measurements -- Systems engineering analysis -- Trade-offs and design decisions - -**3. Reproduction Guide** -- Clear setup instructions -- Hardware requirements -- Expected results -- Troubleshooting tips - -### Portfolio Artifacts You Get - -โœ… **Leaderboard Rankings**: Proof of competitive performance -โœ… **Technical Report**: Demonstrate systems engineering skills -โœ… **Benchmark Results**: Compare your work to industry standards -โœ… **Peer Recognition**: Rankings visible to potential employers -โœ… **GitHub Portfolio**: Complete optimization case study - ---- - -## ๐Ÿ”ง Technical Requirements - -### Submission Requirements - -**All submissions must:** -- Use ONLY TinyTorch implementations (modules 1-13) -- Run on specified reference hardware -- Include reproducible benchmarking scripts -- Meet accuracy thresholds for category -- Pass automated validation tests - -**Allowed optimizations:** -- Any technique from modules 14-19 -- Custom kernel implementations -- Novel architectural designs -- Creative caching strategies -- Hardware-specific optimizations - -**Not allowed:** -- External ML frameworks (PyTorch, TensorFlow, etc.) -- Pre-trained models from other sources -- Hardcoded test outputs -- Breaking TinyTorch API contracts - -### Evaluation Environment - -**Standard Hardware:** -- CPU: AMD EPYC 7763 (or equivalent) -- Memory: 32GB RAM -- Storage: NVMe SSD -- OS: Ubuntu 22.04 LTS - -**Edge Hardware (for Edge Expert category):** -- Raspberry Pi 4B (4GB RAM) -- Power monitoring equipment -- Standard cooling (no exotic setups) - ---- - -## ๐Ÿ“š Educational Value - -### What You Learn - -**Systems Engineering:** -- Performance profiling and bottleneck analysis -- Memory optimization techniques -- Speed vs. accuracy trade-offs -- Hardware-aware algorithm design -- Production deployment constraints - -**ML Engineering:** -- Real-world optimization priorities -- Benchmarking and measurement -- Competitive system design -- Documentation and reproducibility -- Community collaboration - -**Career Skills:** -- Portfolio-worthy competitive performance -- Systems thinking for production ML -- Technical communication and documentation -- Performance engineering mindset - -### Why This Matters - -**Most ML courses teach:** Algorithm implementation -**TinyTorch teaches:** Systems optimization - -**Most projects end with:** "Does it work?" -**TinyTorch ends with:** "How fast? How small? How efficient?" - -This is what separates ML researchers from ML engineers. You learn to care about the full system, not just the algorithm. - ---- - -## ๐Ÿš€ Getting Started - -### Prerequisites - -**Required Modules:** -- Modules 1-13: Build your base model -- Modules 14-19: Learn optimization techniques - -**Recommended Preparation:** -```bash -# Complete all modules -tito checkpoint status - -# Test your optimization skills -tito module test 14 # Profiling -tito module test 15 # Acceleration -tito module test 16 # Quantization -tito module test 17 # Compression -tito module test 18 # Caching -tito module test 19 # Benchmarking -``` - -### Quick Start - -```bash -# 1. Register for Olympics -tito olympics register - -# 2. Submit baseline -tito olympics submit --baseline - -# 3. View your scores -tito olympics scores - -# 4. Optimize and resubmit -tito olympics submit --category speed - -# 5. Check leaderboard -tito olympics leaderboard -``` - ---- - -## ๐Ÿ… Awards & Recognition - -### Category Champions ๐Ÿฅ‡ -- Top performer in each category -- Certificate of achievement -- Featured on leaderboard permanently -- LinkedIn-ready accomplishment - -### Overall Systems Engineer ๐Ÿ† -- Best combined performance across categories -- Requires competing in โ‰ฅ3 categories -- Special recognition on course website -- Strong portfolio differentiator - -### Special Awards - -**๐Ÿš€ Innovation Award** -- Most creative optimization approach -- Novel techniques or architectures -- Judged by instructors and peers - -**๐Ÿ“š Teaching Award** -- Best documented optimization process -- Helps future students learn -- Clarity and educational value - -**๐ŸŽฏ First Blood Award** -- First to beat instructor baseline -- In any category -- Special early-achiever recognition - ---- - -## ๐Ÿ’ก Strategy Tips - -### Getting Started - -**1. Profile First** -```bash -# Don't guessโ€”measure! -tito olympics profile --detailed -``` - -**2. Pick Your Category** -- Speed Demon: Focus on compute optimization -- Memory Miser: Quantization and compression -- Edge Expert: Balanced optimization -- Energy Efficient: Algorithm efficiency - -**3. Apply Systematic Optimization** -- One technique at a time -- Measure impact of each change -- Keep detailed notes -- Document trade-offs - -### Advanced Strategies - -**For Speed:** -- Vectorize operations (Module 15) -- Implement caching (Module 18) -- Optimize hot paths first -- Consider CPU instruction sets - -**For Memory:** -- Quantization (Module 16) -- Weight pruning (Module 17) -- Efficient data structures -- Activation checkpointing - -**For Edge:** -- Balance all dimensions -- Test on real hardware early -- Power profiling tools -- Thermal management - ---- - -## ๐ŸŒŸ Success Stories - -### What Past Participants Say - -> "The Olympics forced me to actually care about performance. In previous courses, I just wanted things to work. Here, I learned to optimize." - *Alex, Spring 2024* - -> "Ranking #2 in Memory Efficiency was the highlight of my portfolio. It came up in every interview." - *Jordan, Fall 2024* - -> "I thought I understood optimization until the Olympics. The leaderboard competition pushed me to learn techniques I would have skipped." - *Sam, Spring 2024* - ---- - -## ๐ŸŽ“ Final Thoughts - -### Why Olympics > Traditional Capstone - -**Traditional Capstone:** -- Build a project that works โœ“ -- Submit and move on -- Limited comparison with peers -- Optimization is optional - -**TinyTorch Olympics:** -- Build a system that performs โšก -- Compete and improve continuously -- Clear performance benchmarks -- Optimization is the point - -### The Real Goal - -The Olympics isn't just about winning. It's about: - -โœ… **Learning systems thinking** -โœ… **Caring about performance** -โœ… **Building portfolio-worthy projects** -โœ… **Joining a community of builders** -โœ… **Preparing for real ML engineering** - ---- - -**Ready to compete?** - -```bash -tito olympics register -``` - -**Build systems. Optimize relentlessly. Compete.** ๐Ÿฅ‡ - +**Build. Optimize. Measure. Repeat.** ๐Ÿ”ฅ diff --git a/book/community.md b/book/community.md index 3ca2f2f9..56a620e7 100644 --- a/book/community.md +++ b/book/community.md @@ -1,304 +1,58 @@ # ๐ŸŒ Community Ecosystem -**Who's Building with TinyTorch?** +**Building Together** --- ## ๐ŸŽฏ Overview -The TinyTorch community is a global ecosystem of students, educators, and ML engineers learning systems engineering from first principles. This page shows the living, growing community building ML systems from scratch. +TinyTorch is more than just a courseโ€”it's a growing community of students, educators, and ML engineers learning systems engineering from first principles. -
-

Live Community Dashboard (Coming Soon)

-

Real-time stats and ecosystem metrics will be displayed here at tinytorch.org

+--- + +## ๐Ÿ“Š Community Platform (Coming Soon) + +
+

๐Ÿšง Building Community Features

+

We're creating live community features including activity dashboards, study partner matching, and real-time progress tracking. Stay tuned!

---- +### Planned Features -## ๐Ÿ“Š Community Stats - -### Current Snapshot - -**Active Learners** -- Students currently working through modules -- Geographic distribution worldwide -- Universities and institutions using TinyTorch -- Self-learners building systems skills - -**Module Completion** -- Most completed modules -- Average progress through curriculum -- Success rates by module -- Time to completion statistics - -**Community Contributions** -- GitHub issues opened and resolved -- Pull requests merged -- Documentation improvements -- Bug fixes contributed - ---- - -## ๐ŸŒ Geographic Distribution - -### Where TinyTorch is Being Used - -**Vision for Live Dashboard:** -- Interactive world map showing active users -- Heatmap of module completion by region -- University partnerships and classroom adoption -- Community meetups and study groups by location - -**Example Stats:** -``` -๐ŸŒ Global Reach -โ”œโ”€โ”€ ๐Ÿ‡บ๐Ÿ‡ธ United States: 1,245 active learners -โ”œโ”€โ”€ ๐Ÿ‡ฎ๐Ÿ‡ณ India: 892 active learners -โ”œโ”€โ”€ ๐Ÿ‡จ๐Ÿ‡ณ China: 634 active learners -โ”œโ”€โ”€ ๐Ÿ‡ง๐Ÿ‡ท Brazil: 412 active learners -โ”œโ”€โ”€ ๐Ÿ‡ฉ๐Ÿ‡ช Germany: 387 active learners -โ””โ”€โ”€ ... 50+ countries -``` - ---- - -## ๐ŸŽ“ Educational Institutions - -### Universities Using TinyTorch - -**Academic Partnerships** -- Courses integrating TinyTorch curriculum -- Research groups using for ML systems education -- Student clubs and study groups -- Faculty champions and instructors - -**Classroom Success Stories** -- Course adoption case studies -- Student learning outcomes -- Instructor feedback and iterations -- Integration with existing curricula - ---- - -## ๐Ÿ“ˆ Activity Metrics - -### Community Engagement - -**Development Activity:** -- Commits per week -- Active contributors -- Module updates and improvements -- Feature requests and roadmap - -**Learning Progress:** -- Tests run per day -- Modules completed this week -- Milestone achievements -- Capstone submissions - -**Community Support:** -- GitHub Discussions activity -- Questions asked and answered -- Average response time -- Community helpfulness score - ---- - -## ๐Ÿ† Community Achievements - -### Collective Progress - -**Milestones Reached:** -- ๐ŸŽฏ 10,000+ module completions -- ๐Ÿš€ 1,000+ capstone submissions -- ๐ŸŒŸ 500+ GitHub stars -- ๐Ÿค 200+ contributors - -**Educational Impact:** -- Students trained in ML systems -- Production implementations deployed -- Research papers citing TinyTorch -- Job placements in ML engineering - ---- - -## ๐Ÿค How to Connect - -### Join the Community - -**GitHub Discussions** -- Ask questions and get help -- Share your projects and achievements -- Connect with other learners -- Discuss ML systems topics - -**Study Groups** -- Find learning partners at your level -- Form local or virtual study groups -- Collaborate on projects -- Mentor other learners - -**Contributing** -- Report bugs and issues -- Improve documentation -- Add features and optimizations -- Help other community members - ---- - -## ๐ŸŒŸ Featured Community Projects - -### Student Innovations - -**Novel Optimizations** -- Creative solutions from capstone submissions -- Performance breakthroughs -- Innovative architectures -- Educational contributions - -**Extensions and Applications** -- Real-world projects built with TinyTorch -- Research using TinyTorch implementations -- Teaching materials developed by community -- Integration with other frameworks - ---- - -## ๐Ÿ“… Community Events - -### Upcoming - -**Monthly Challenges** -- Optimization sprints -- Debugging competitions -- Code review sessions -- Systems engineering workshops - -**Quarterly Milestones** -- Semester champion announcements -- Community showcase presentations -- Office hours with instructors -- Roadmap planning sessions - ---- - -## ๐Ÿ’ฌ Community Voices - -### What Learners Say - -> "Finding a study group through the community made all the difference. We debugged together and learned faster." - *Morgan, Spring 2024* - -> "Seeing the global community map motivated me. It's inspiring to know others worldwide are on the same journey." - *Priya, Fall 2024* - -> "Contributing a bug fix got me connected with the core team. That led to an internship opportunity." - *Alex, Summer 2024* - ---- - -## ๐Ÿš€ Ecosystem Growth - -### Vision for tinytorch.org - -**Live Dashboard Features:** - -**๐ŸŒ Global Activity Map** -- Real-time module completions by region -- Active users currently online -- Test runs and benchmarks being executed -- Geographic heatmap of engagement - -**๐Ÿ“Š Community Analytics** -- Module popularity and completion rates -- Most active times and days -- Learning velocity statistics -- Community growth trends - -**๐Ÿ† Achievement Feed** -- Recent module completions -- Leaderboard position changes -- Milestone celebrations -- Community contributions +**๐Ÿ“Š Live Dashboard** +- Real-time community activity +- Global learning progress +- Module completion stats **๐Ÿค Connection Hub** -- Find study partners near you -- Join active study groups -- Connect by module or interest -- Mentor/mentee matching +- Find study partners +- Join study groups +- Connect with peers + +**๐ŸŒ Global Reach** +- See who's learning worldwide +- Geographic distribution +- Community milestones --- -## ๐Ÿ› ๏ธ Contribute to the Ecosystem +## ๐Ÿš€ Get Involved Now -### Help Build the Community +**Learn Together** +- Ask questions in [GitHub Discussions](https://github.com/harvard-edge/TinyTorch/discussions) +- Share your progress and projects +- Help others debug their implementations -**Code Contributions:** -- Fix bugs and improve performance -- Add new features and optimizations -- Improve test coverage -- Enhance documentation +**Contribute** +- Report bugs and issues on GitHub +- Improve documentation +- Submit fixes and optimizations -**Educational Contributions:** -- Write tutorials and guides -- Create explanatory videos -- Answer questions in Discussions -- Review and help debug others' code - -**Community Building:** -- Organize local study groups -- Host virtual learning sessions -- Share your learning journey -- Mentor newer learners +**Stay Connected** +- Star the project on [GitHub](https://github.com/harvard-edge/TinyTorch) +- Follow development updates +- Share TinyTorch with others --- -## ๐Ÿ“š Resources for Community Members - -### Getting Started - -**For New Learners:** -- [Quick Start Guide](quickstart-guide.md) -- [Learning Paths](learning-progress.md) -- [Community Guidelines](CONTRIBUTING.md) - -**For Contributors:** -- [Development Setup](CONTRIBUTING.md) -- [Testing Framework](testing-framework.md) -- [Code Standards](.cursor/rules/cli-patterns.md) - -**For Educators:** -- [Instructor Guide](instructor-guide.md) -- [Classroom Integration](usage-paths/classroom-use.md) -- [Course Materials](chapters/00-introduction.md) - ---- - -## ๐ŸŽฏ Community Goals - -### Our Mission - -**Build together. Learn together. Grow together.** - -**We believe:** -- Systems engineering is learned through building -- Community accelerates learning -- Open collaboration benefits everyone -- Real understanding comes from first principles - -**We value:** -- ๐Ÿค **Collaboration** over competition (except the fun kind!) -- ๐Ÿ“š **Learning** over just completing modules -- ๐Ÿ”ง **Building** over just consuming content -- ๐ŸŒ **Community** over individual achievement - ---- - -
-

๐ŸŒŸ Join the TinyTorch Community

-

Connect with thousands of learners worldwide building ML systems from scratch

-Join Discussions โ†’ -Star on GitHub โ†’ -
- ---- - -**The best way to learn ML systems is together. Welcome to the community.** ๐Ÿš€ - +**Build ML systems. Learn together. Grow the community.** ๐ŸŒ