Commit Graph

377 Commits

Author SHA1 Message Date
Vijay Janapa Reddi
f77db43975 Production: Standardize test naming in optimization and deployment modules
- Compression: test_compression_metrics → test_unit_compression_metrics
- Compression: test_magnitude_pruning → test_unit_magnitude_pruning
- Compression: test_quantization → test_unit_quantization
- Compression: test_distillation → test_unit_distillation
- Compression: test_structured_pruning → test_unit_structured_pruning
- Compression: test_comprehensive_comparison → test_unit_comprehensive_comparison
- Kernels: All test_* → test_unit_* except test_kernel_integration_* → test_module_*
- Benchmarking: All test_* → test_unit_* except test_comprehensive_* → test_module_*
- MLOps: All test_* → test_unit_* except test_comprehensive_integration → test_module_*
- Finalizes test naming standardization across production-ready modules
2025-07-20 08:39:27 -04:00
Vijay Janapa Reddi
53abd2a1e9 🚀 Training System: Standardize test naming in ML training pipeline
- DataLoader: test_integration_* → test_module_* (module dependency tests)
- Autograd: test_variable_class → test_unit_variable_class
- Autograd: test_add_operation → test_unit_add_operation
- Autograd: test_multiply_operation → test_unit_multiply_operation
- Autograd: test_subtract_operation → test_unit_subtract_operation
- Autograd: test_chain_rule → test_unit_chain_rule
- Autograd: test_neural_network_training → test_module_neural_network_training
- Optimizers: test_integration_* → test_module_* (module dependency tests)
- Training: All test_* → test_unit_* except test_training → test_module_training
- Completes test standardization for complete training pipeline
2025-07-20 08:39:13 -04:00
Vijay Janapa Reddi
dfad756278 🧠 Core ML: Standardize test naming in neural network building blocks
- Activations: test_integration_* → test_module_* (module dependency tests)
- Layers: test_matrix_multiplication → test_unit_matrix_multiplication
- Layers: test_dense_layer → test_unit_dense_layer
- Layers: test_layer_activation → test_unit_layer_activation
- Dense: test_integration_* → test_module_* (module dependency tests)
- Spatial: test_integration_* → test_module_* (module dependency tests)
- Attention: test_integration_* → test_module_* (module dependency tests)
- Establishes unit vs module test distinction for neural network components
2025-07-20 08:39:00 -04:00
Vijay Janapa Reddi
82e18761fe Foundation: Standardize test naming in setup and tensor modules
- Rename test functions to follow test_unit_<name> convention
- Setup module: test_personal_info → test_unit_personal_info_basic
- Setup module: test_system_info → test_unit_system_info_basic
- Tensor module: test_tensor_* → test_unit_tensor_*
- Establishes consistent unit test naming for core foundation modules
2025-07-20 08:38:46 -04:00
Vijay Janapa Reddi
556e98edcb Fix book conversion script to handle dynamic module names
- Replace hardcoded module names array with dynamic reading from module.yaml files
- Add get_module_names() function to read actual module structure
- Fix IndexError in get_prev_module_name() and get_next_module_name() functions
- Update navigation logic to use actual module count instead of hardcoded assumptions
- Successfully converts all 16 modules to chapters with proper navigation
- Book build now completes without errors
2025-07-18 15:01:16 -04:00
Vijay Janapa Reddi
2ebf52ffd5 Update intro page and rebuild book 2025-07-18 13:28:39 -04:00
Vijay Janapa Reddi
883cb3a588 Update capstone chapter and rebuild book 2025-07-18 12:25:09 -04:00
Vijay Janapa Reddi
3bd57ff4f3 Rebuild book with streamlined resources page 2025-07-18 12:18:47 -04:00
Vijay Janapa Reddi
44bd4a4df3 Streamline resources page: remove fluff, keep concrete value
- Remove generic learning communities section
- Remove vague 'next steps' career advice
- Remove fluffy usage instructions
- Keep focused: academic courses, books, alternative implementations, production internals
- Result: curated reference for students who built ML systems from scratch
2025-07-18 11:13:36 -04:00
Vijay Janapa Reddi
acba270f9b 🔧 Fix MLOps over-emphasis and repetitive differentiation statements
✂️ Reduced MLOps Focus:
- Renamed 'MLOps & Production' → 'Development Tools'
- Removed redundant 'MLOps Community' link
- Focuses on practical development tools instead

🎯 Made Framework Differentiations Distinct:
- Micrograd: 'shows you the math, TinyTorch shows you the systems'
- Tinygrad: 'optimizes for speed, TinyTorch optimizes for learning'
- NNFS: 'focuses on algorithms, TinyTorch focuses on complete systems engineering'

💡 Benefits:
- Each differentiation now highlights specific strengths vs repetitive vehicle analogy
- Less MLOps emphasis (appears in course already)
- More concise and memorable comparisons

Result: Cleaner resource organization with unique, specific differentiations
that avoid repetition and over-emphasis on any single topic.
2025-07-18 10:55:26 -04:00
Vijay Janapa Reddi
2ea0627bc9 📚 Complete resources page restructure for maintainability and focus
🔥 Major Improvements:
- Removed research papers section (belongs in specific labs as context)
- Added clear differentiation for alternative implementations with vehicle analogy
- Moved ML Systems book to books section with prominent positioning
- Added actual book links (O'Reilly, deeplearningbook.org) where available
- Focused on maintainable, stable resources

🎯 Key Differentiations Added:
- 'Micrograd teaches engine parts, TinyTorch teaches you to design the whole vehicle'
- 'NNFS teaches engine parts, TinyTorch teaches the whole vehicle and drive it'
- 'Tinygrad optimizes for speed, TinyTorch optimizes for learning systems thinking'

🏭 Production Focus:
- Added industrial tools: W&B, MLOps Community, Papers with Code
- Reorganized into: Courses, Books, Alternative Implementations, Production Tools
- Removed quickly-outdated content, kept stable educational resources

📖 ML Systems Book Positioning:
- Moved Vijay's book from courses to books section
- Positioned as 'the perfect companion to TinyTorch'
- Added proper book links for maintainability

Result: Much more focused, maintainable resource page that complements
TinyTorch without duplicating content that belongs in specific labs.
2025-07-18 10:51:14 -04:00
Vijay Janapa Reddi
17f9819b2b 📚 Improve resources page organization and add tinyML course
🎓 Course Additions:
- Added CS 249r: Tiny Machine Learning (Harvard) to course list
- Covers TinyML systems, edge AI, and resource-constrained machine learning
- Complements existing MIT TinyML course with Harvard perspective

📖 Section Naming Fix:
- Changed 'Essential Books' → 'Recommended Books'
- Avoids prescriptive language and duplication issues
- More inclusive and less hierarchical phrasing

🔄 Organization Benefits:
- Eliminates potential confusion with ML Systems book already in courses
- Creates clearer separation between course materials and supplementary books
- Better reflects that these are helpful additions, not requirements

Result: More thoughtful resource organization with key Harvard tinyML
course addition and improved section naming.
2025-07-18 10:38:45 -04:00
Vijay Janapa Reddi
4bd58acda3 🏷️ Fix duplicate title in browser tab
🔧 Title Configuration Fix:
- Changed book/_config.yml title from long form to simple 'Tiny🔥Torch'
- Eliminates duplicate title in browser tab (was showing 'Tiny🔥Torch — Tiny🔥Torch')
- Now Chrome tab displays clean 'Tiny🔥Torch' once

Result: Clean, professional browser tab title without duplication.
2025-07-18 08:58:51 -04:00
Vijay Janapa Reddi
62a2706cca 📂 Reorganize chapter files to match new 16-module structure
🔄 Chapter File Reorganization:
- Renamed 05-networks.md → 05-dense.md
- Renamed 06-cnn.md → 06-spatial.md
- Created 07-attention.md with transformer-focused content
- Renumbered all subsequent chapters (7→8, 8→9, 9→10, etc.)
- Updated final module: 15-capstone.md → 16-capstone.md

📚 Attention Chapter Content:
- Added comprehensive attention module introduction
- Covers self-attention, multi-head attention, transformer foundations
- Explains Query-Key-Value mechanism and scaled dot-product attention
- Connects to previous modules (tensors, activations, layers, dense)
- Positions attention as foundation for modern AI (GPT, BERT, ViTs)

 Build Verification:
- Jupyter Book builds successfully with no missing file errors
- All 16 chapters now properly indexed in table of contents
- New structure: Foundation (1-3), Building Blocks (4-7), Training (8-11),
  Inference & Serving (12-16)

Result: Complete alignment between repository structure, book chapters,
and table of contents. Students can now navigate the full 16-module course
with proper attention coverage and updated section organization.
2025-07-18 08:57:33 -04:00
Vijay Janapa Reddi
2eda47d287 📚 Add comprehensive Learning Resources page and update TOC structure
📖 New Resources Page:
- Created book/resources.md with curated external learning materials
- Academic courses: Stanford CS329S, Harvard ML Systems, MIT TinyML
- Essential books: Chip Huyen, Andriy Burkov, Deep Learning textbook
- Framework deep dives: PyTorch/TensorFlow internals and architecture
- Research papers: Autograd, Adam, Attention, TensorFlow/PyTorch papers
- Implementation guides: micrograd, tinygrad, Neural Networks from Scratch
- Communities: MLOps, r/MachineLearning, technical blogs
- Next steps: Post-TinyTorch learning paths and advanced specializations

🔄 Updated Table of Contents:
- Fixed module names: networks → dense, cnn → spatial
- Added 07_attention to Building Blocks section
- Updated all numbering to reflect 16-module structure
- Renamed 'Production & Performance' → 'Inference & Serving'
- Added new 'Additional Resources' section with 📚 Learning Resources

🎯 Educational Value:
- Provides context for TinyTorch implementations
- Bridges from educational framework to production systems
- Offers multiple learning paths for different interests
- Connects TinyTorch concepts to broader ML systems ecosystem

Result: Students now have comprehensive resources to deepen their
understanding and apply TinyTorch knowledge to real-world systems.
2025-07-18 08:55:51 -04:00
Vijay Janapa Reddi
931ad09a09 📚 Update intro.md to reflect current 16-module structure
🔄 Module Structure Updates:
- Updated from 15 to 16 modules in course journey
- Fixed module names: Networks → Dense, CNNs → Spatial
- Added new 07_attention module to Building Blocks section
- Updated all subsequent module numbering (8-16)

🎨 Section Improvements:
- Renamed 'Production & Performance' → 'Inference & Serving' (more accurate)
- Added 16_capstone to final section with 'advanced framework engineering'
- Updated descriptions to include attention mechanisms and capstone project

📊 Accurate Course Progression:
- Foundation: 01-03 (Setup, Tensors, Activations)
- Building Blocks: 04-07 (Layers, Dense, Spatial, Attention)
- Training Systems: 08-11 (DataLoader, Autograd, Optimizers, Training)
- Inference & Serving: 12-16 (Compression, Kernels, Benchmarking, MLOps, Capstone)

Result: Book intro now accurately reflects the current repository structure
and improved section naming for better clarity.
2025-07-18 08:54:30 -04:00
Vijay Janapa Reddi
738ec2a2fa 🎨 Apply full blockquote styling to all FAQ answers for better readability
📖 Enhanced Visual Design:
- Wrapped entire FAQ content in blockquotes (>) for consistent grey background
- All bullet points, headers, and content now have improved readability
- Code blocks within blockquotes maintain proper formatting
- Consistent visual styling across all 8 FAQ entries

 User Experience Benefits:
- Grey background makes content much easier to read when expanded
- Better visual separation from surrounding text
- Professional appearance with improved contrast
- Reduces eye strain and improves content scanning

🎯 Technical Implementation:
- Added > prefix to all content lines within FAQ answers
- Maintained proper markdown formatting for headers, lists, and code
- Preserved existing structure while enhancing visual presentation

Result: FAQ dropdowns now have beautiful, consistent grey styling
that makes expanded content significantly easier to read and scan.
2025-07-18 08:49:07 -04:00
Vijay Janapa Reddi
af932fe682 📖 Minor formatting improvements to book intro
 Title Formatting:
- Split title into main header and subtitle for better readability
- Enhanced visual hierarchy in book introduction

🚀 Content Updates:
- Changed 'rocket ship' to 'AI rocket ship' for more specific branding
- Added '(Harvard)' to Prof. Vijay Janapa Reddi reference for clarity
- Maintains professional attribution while being more informative

Result: Cleaner book intro formatting with improved readability and attribution.
2025-07-18 08:29:36 -04:00
Vijay Janapa Reddi
69a63a1541 🚀 Add Binder badge for interactive browser-based access
📱 New Access Method:
- Added Binder badge linking to mybinder.org launch
- Users can now run TinyTorch directly in browser without local setup
- Links to main branch: mybinder.org/v2/gh/MLSysBook/TinyTorch/main

🎯 User Experience Benefits:
- Zero-installation access for quick exploration
- Perfect for workshops, demos, and trying before installing
- Complements existing Jupyter Book documentation
- Positioned logically between Python and Jupyter Book badges

Result: Users now have multiple ways to engage with TinyTorch -
local installation, online documentation, and live interactive environment.
2025-07-18 08:25:10 -04:00
Vijay Janapa Reddi
a3fee3a473 🤝 Rewrite tutorial comparison FAQ to be respectful and constructive
 Tone Improvements:
- Removed dismissive 'build toys' language about other tutorials
- Reframed as 'isolated components vs integrated systems' approach
- Much more respectful to other educators and learning resources

🏗️ Better Systems Engineering Analogy:
- Added compiler/OS analogy to explain systems thinking
- Helps readers understand why building integrated systems matters
- Concrete example: 'like understanding how every part of a compiler interacts'

📊 Enhanced Comparison:
- Updated comparison table to be more constructive
- Focus on 'Component vs Systems Approach' rather than dismissive contrasts
- Emphasizes integration and how everything connects

🎯 Educational Value:
- Explains WHY systems engineering matters without putting down alternatives
- Shows TinyTorch's unique value through positive comparison
- Maintains respectful tone while highlighting differentiating approach

Result: FAQ now educates about systems thinking benefits without
disrespecting other valuable learning resources. Much more professional
and constructive messaging.
2025-07-18 08:24:18 -04:00
Vijay Janapa Reddi
3b3b431c06 Dramatically improve FAQ dropdown readability and visual hierarchy
🎨 Visual Design Improvements:
- Added proper spacing with <br> tags after each summary
- Used blockquotes (>) for key opening statements
- Added emoji section headers for better visual organization
- Added horizontal rules (---) to separate content sections

📖 Content Organization:
- Restructured answers with clear section headers
- Improved bullet point formatting and emphasis
- Added context headers like '🧪 Challenge Test', '🎯 Key Outcome'
- Made key phrases bold for easier scanning

🔍 Readability Enhancements:
- Eliminated wall-of-text appearance when expanded
- Created clear visual hierarchy within each answer
- Consistent formatting pattern across all FAQ entries
- Better information architecture for quick scanning

Result: FAQ dropdowns now transform from dense text blocks into
well-organized, scannable content that's actually pleasant to read
when expanded. Much better user experience
2025-07-18 08:23:20 -04:00
Vijay Janapa Reddi
a1d0d550fc 📚 Comprehensive README update to match current repository structure
🔧 Module Structure Updates:
- Updated from 15 to 16 modules throughout documentation
- Fixed module names: 05_networks → 05_dense, 06_cnn → 06_spatial
- Added 07_attention module to documentation and flowchart
- Corrected module numbering in all sections (Deep Learning now 06-10, Production 11-15)

📊 Course Organization:
- Updated repository structure diagram with correct module names
- Fixed mermaid flowchart to show actual module dependencies
- Updated capstone references (15 core modules → 15 core modules + capstone = 16 total)
- Corrected learning path recommendations (core modules 01-10 for foundations)

📦 Package References:
- Added exports for dense.py, spatial.py, attention.py in tinytorch/core/
- Updated all module counts and difficulty progressions
- Fixed references to complete framework capabilities

Result: README now accurately reflects the actual 16-module structure with
correct naming, dependencies, and learning progression. No more confusion
between documentation and actual repository state.
2025-07-18 08:19:17 -04:00
Vijay Janapa Reddi
3fc9a9d20f 🔧 Fix critical installation instructions in README
📦 Dependency Management Fix:
- Added 'pip install -r requirements.txt' before 'pip install -e .'
- Explains that requirements.txt has all dependencies (numpy, jupyter, pytest, etc.)
- Clarifies that 'pip install -e .' installs TinyTorch package in editable mode

🐛 Problem Solved:
- Previously: 'pip install -e .' only installed numpy (from pyproject.toml)
- Students were missing matplotlib, PyYAML, pytest, rich, jupyter, nbdev, etc.
- Now: Proper two-step installation ensures all dependencies are available

Result: Students get working installation with all required dependencies
2025-07-18 08:17:04 -04:00
Vijay Janapa Reddi
d4d6277604 🔧 Complete module restructuring and integration fixes
📦 Module File Organization:
- Renamed networks_dev.py → dense_dev.py in 05_dense module
- Renamed cnn_dev.py → spatial_dev.py in 06_spatial module
- Added new 07_attention module with attention_dev.py
- Updated module.yaml files to reference correct filenames
- Updated #| default_exp directives for proper package exports

🔄 Core Package Updates:
- Added tinytorch.core.dense (Sequential, MLP architectures)
- Added tinytorch.core.spatial (Conv2D, pooling operations)
- Added tinytorch.core.attention (self-attention mechanisms)
- Updated all core modules with latest implementations
- Fixed tensor assignment issues in compression module

🧪 Test Integration Fixes:
- Updated integration tests to use correct module imports
- Fixed tensor activation tests for new module structure
- Ensured compatibility with renamed components
- Maintained 100% individual module test success rate

Result: Complete 14-module TinyTorch framework with proper organization,
working integrations, and comprehensive test coverage ready for production use.
2025-07-18 02:10:49 -04:00
Vijay Janapa Reddi
13ac7ee885 Complete comprehensive capstone README rewrite
🎯 Major improvements to 16_capstone module documentation:

📚 Enhanced Structure:
- Updated to reflect actual 14-module progression (not 15)
- Celebrates complete ML framework students built
- Shows concrete working code examples using TinyTorch components

🚀 5 Specialized Tracks:
1. Performance Ninja - Speed/memory optimization, GPU acceleration
2. Algorithm Architect - Modern ML algorithms, Vision Transformers
3. Systems Engineer - Production infrastructure, distributed training
4. Benchmarking Scientist - Scientific framework comparison
5. Developer Experience Master - Debugging tools, visualization

 Professional Framework:
- 4-phase timeline: Analysis → Implementation → Optimization → Evaluation
- Concrete project examples with code samples for each track
- Clear success criteria and measurable goals
- Comprehensive deliverables structure (Technical Report, Code, Analysis, Demo)
- Pro tips for framework engineering success

🎓 Outcome: Transforms basic optimization into comprehensive framework
engineering specialization that demonstrates production ML systems mastery
2025-07-18 02:07:30 -04:00
Vijay Janapa Reddi
442e860d5f Fix module file naming and tensor assignment issues
- Updated module.yaml files for 05_dense and 06_spatial to reference correct dev file names
- Fixed #| default_exp directives in dense_dev.py and spatial_dev.py to export to correct module names
- Fixed tensor assignment issues in 12_compression module by creating new Tensor objects instead of trying to assign to .data property
- Removed missing function imports from autograd integration test
- All individual module tests now pass (01_setup through 14_benchmarking)
- Generated correct module files: dense.py, spatial.py, attention.py
2025-07-18 01:56:07 -04:00
Vijay Janapa Reddi
87dcf5083a fix: Python 3.8 compatibility for CLI
- Replace str | None with Optional[str] in export.py
- Replace list[str] with List[str] in config.py
- Add missing typing imports for compatibility
- Ensures CLI works on Python 3.8 systems
2025-07-18 00:40:04 -04:00
Vijay Janapa Reddi
9a0ba3cca8 docs: Add comprehensive integration testing rules
- Create focused integration testing rule (256 lines, under 500-line limit)
- Establish core principle: interface compatibility over functionality re-testing
- Define 4 integration test categories: Foundation, Architecture, Training, Inference
- Provide clear DO/DON'T examples with code snippets
- Document testing anti-patterns to avoid
- Include educational testing principles and workflow guidelines
- Reference 17 existing integration test files in tests/ directory
- Update rules README to include new integration-testing.md rule
2025-07-18 00:33:26 -04:00
Vijay Janapa Reddi
5c20608776 refactor: Focus integration tests on cross-module interfaces not functionality
 Refactored test_tensor_activations_integration.py:
- Changed from re-testing activation math to testing Tensor-Activation interfaces
- Focus on: Tensor input → Activation → Tensor output compatibility
- Test dtype preservation, shape preservation, chaining, error handling
- Test activation outputs work with further Tensor operations

 Refactored test_layers_networks_integration.py:
- Changed from re-testing layer/network logic to testing Layer-Dense interfaces
- Focus on: Dense layer → Sequential network → MLP composition
- Test layer output as network input, network output as layer input
- Test multi-stage pipelines, parallel processing, modular replacement

Integration tests now properly focus on:
 Cross-module interface compatibility (not individual functionality)
 Data flow and pipeline integration between modules
 Shape/dtype preservation across module boundaries
 System-level workflows and architectural patterns
 Error handling when modules are incompatibly connected
 Component modularity and interchangeability

Establishes proper integration testing philosophy: test that modules work TOGETHER, not what individual modules do (that's for inline tests).
2025-07-18 00:29:52 -04:00
Vijay Janapa Reddi
f7ae25771f refactor: Focus attention integration tests on cross-module interfaces
 Refactored test_tensor_attention_integration.py:
- Changed from re-testing attention functionality to testing interface compatibility
- Focus on: Tensor.data → Attention → numpy → Tensor roundtrip compatibility
- Test data type preservation across modules (float32, float64)
- Test shape preservation and error handling at interfaces
- Test that attention outputs can be converted back to Tensors

 Refactored test_attention_pipeline_integration.py:
- Changed from testing transformer algorithms to testing module pipelines
- Focus on: Attention → Dense → Activation integration workflows
- Test encoder-decoder patterns using multiple TinyTorch modules
- Test multi-layer workflows with residual connections
- Test data flow compatibility and modular component replacement

Integration tests now properly focus on:
 Interface compatibility (not functionality re-testing)
 Cross-module data flow and pipeline integration
 System-level workflows using multiple modules
 Shape/dtype preservation across module boundaries
 Error handling when modules are incompatibly connected

Follows integration testing best practices: test that modules work together, not what individual modules do.
2025-07-18 00:27:51 -04:00
Vijay Janapa Reddi
a9ee348355 feat: Add comprehensive integration tests for attention module
 Created test_tensor_attention_integration.py:
- Basic tensor-attention integration with real TinyTorch components
- Self-attention wrapper testing with proper Tensor objects
- Attention masking integration (causal, padding, bidirectional)
- Batched tensor processing and different data types
- Numerical stability and gradient flow compatibility

 Created test_attention_pipeline_integration.py:
- Complete transformer-like pipeline testing
- Multi-layer attention stacks (transformer encoders)
- Causal masking for language modeling workflows
- Encoder-decoder architecture integration
- Cross-module integration with dense layers and activations
- Real-world scenarios: sequence classification, seq2seq translation
- Scalability testing across different sequence lengths and dimensions

 Updated tests/README.md:
- Documented new attention integration tests (15→17 total tests)
- Organized tests by category (Foundation, Architecture, Training, Inference Serving)
- Added specific usage examples for attention tests
- Clear documentation of test coverage and purpose

Integration tests ensure:
- Attention works with real Tensor objects (not mocks)
- Cross-module compatibility with dense, spatial, activations
- Complete ML workflows (classification, translation, transformers)
- Realistic transformer architectures and patterns
- System-level regression detection for attention functionality
2025-07-18 00:21:48 -04:00
Vijay Janapa Reddi
59d58718f9 refactor: Implement learner-focused module progression with better naming
 Renamed modules for clearer pedagogical flow:
- 05_networks → 05_dense (multi-layer dense/fully connected networks)
- 06_cnn → 06_spatial (convolutional networks for spatial patterns)
- 06_attention → 07_attention (attention mechanisms for sequences)

 Shifted remaining modules down by 1:
- 07_dataloader → 08_dataloader
- 08_autograd → 09_autograd
- 09_optimizers → 10_optimizers
- 10_training → 11_training
- 11_compression → 12_compression
- 12_kernels → 13_kernels
- 13_benchmarking → 14_benchmarking
- 14_mlops → 15_mlops
- 15_capstone → 16_capstone

 Updated module metadata (module.yaml files):
- Updated names, descriptions, dependencies
- Fixed prerequisite chains and enables relationships
- Updated export paths to match new names

New learner progression:
Foundation → Individual Layers → Dense Networks → Spatial Networks → Attention Networks → Training Pipeline

Perfect pedagogical flow: Build one layer → Stack dense layers → Add spatial patterns → Add attention mechanisms → Learn to train them all.
2025-07-18 00:12:50 -04:00
Vijay Janapa Reddi
7b85000c18 refactor: Remove '_comprehensive' suffixes from test function names
- test_attention_mechanism_comprehensive() → test_attention_mechanism()
- test_self_attention_wrapper_comprehensive() → test_self_attention_wrapper()
- test_attention_masking_comprehensive() → test_masking_utilities()

Follows standard TinyTorch naming conventions without unnecessary suffixes.
2025-07-18 00:03:40 -04:00
Vijay Janapa Reddi
190181306d feat: Complete attention module with auto testing and comprehensive summary
 Added standardized auto testing section with run_module_tests_auto()
 Added comprehensive module summary with detailed explanations
 Added test functions for comprehensive validation
 All core attention functionality working perfectly (100% success rate)

Module now complete with:
- Scaled dot-product attention implementation
- Self-attention wrapper class
- Complete masking utilities (causal, padding, bidirectional)
- Integration tests and behavior analysis
- Standardized TinyTorch testing framework integration
- Comprehensive educational summary covering:
  * Mathematical foundations (Attention formula)
  * Real-world applications (ChatGPT, BERT, GPT-4)
  * Architecture patterns and performance characteristics
  * Next steps and transformer building blocks

Ready for student use and NBGrader processing. Foundation for advanced transformer modules.
2025-07-18 00:01:59 -04:00
Vijay Janapa Reddi
b3b02eb07f refactor: Restructure attention module to match TinyTorch NBGrader patterns
 NBGrader solution/test structure: ### BEGIN/END SOLUTION blocks
 Educational TODO sections: STEP-BY-STEP, HINTS, EXAMPLES, LEARNING CONNECTIONS
 Immediate unit tests: proper assertions after each solution
 TinyTorch consistency: same patterns as tensor, layers, activations modules
 All tests passing: 100% success rate with comprehensive coverage

Module now follows established TinyTorch educational format:
- Detailed TODO instructions for student implementation
- Solution blocks wrapped in NBGrader tags
- Immediate feedback with unit tests after each piece
- Progress tracking with emojis and clear status messages

Ready for NBGrader processing and student use.
2025-07-17 23:17:06 -04:00
Vijay Janapa Reddi
05f59ca56a refactor: Simplify attention module to follow TinyTorch patterns
CHANGED: Simplified attention module to focus on core concepts
- Remove multi-head attention, positional encoding, layer norm, transformer block
- Keep only: scaled_dot_product_attention, SelfAttention, masking utilities
- Reduce complexity from  to  (matches CNN level)
- Cut from 885 lines to ~440 lines (aligned with other modules)
- Update dependencies: only requires tensor (not layers/activations/networks)
- Change pedagogical framework: 'Build → Use → Understand' (not Reflect)
- Focus on single concept per module (following established TinyTorch pattern)

RESULT: Clean, focused attention module teaching core mechanism
- Students master fundamental attention before advanced concepts
- Consistent with TinyTorch's one-concept-per-module approach
- Foundation for future multi-head attention and transformer modules
- All tests passing (100% success rate)
2025-07-17 23:11:33 -04:00
Vijay Janapa Reddi
25e9c2e74b feat: Add comprehensive attention module (06_attention)
- Implement scaled dot-product attention with masking support
- Build multi-head attention with learnable projections
- Create sinusoidal positional encoding for sequence understanding
- Add layer normalization for training stability
- Complete transformer block with residual connections
- Include self-attention wrapper and utility functions
- Full inline testing with 100% pass rate
- Educational content explaining attention mechanisms
- Foundation for modern AI architectures (GPT, BERT, etc.)

This module bridges classical ML (tensors, layers, networks) with
modern transformer architectures that power ChatGPT and contemporary AI.
2025-07-17 22:58:19 -04:00
Vijay Janapa Reddi
cf275112b2 UPDATE: Git workflow rules for dev-first development
- Emphasize always working in dev branch
- Main branch for stable releases only
- Recommend feature branches for all changes
- Add YAML-style description for Cursor
- Clear workflow steps and quick reference
2025-07-16 12:18:29 -04:00
Vijay Janapa Reddi
81acafb091 Remove FAQ section from website intro
- Keep intro focused and clean
- Let the content speak for itself
- Avoid over-explaining before people even start
2025-07-16 12:15:33 -04:00
Vijay Janapa Reddi
e48565e219 Replace FAQ with real student concerns
- Address math anxiety: explain math learning approach
- Address validation fears: highlight testing and feedback
- Address flexibility concerns: explain module dependencies
- Address toy project skepticism: emphasize real data and results
- Focus on actual questions students ask vs generic course info
2025-07-16 12:14:00 -04:00
Vijay Janapa Reddi
2acd428cf6 Add focused FAQ to website intro
- 4 key questions for students already interested in the course
- Focus on practical learning concerns vs skepticism
- Shorter than GitHub FAQ - appropriate for committed learners
- Covers time investment, skill level, support, modern relevance
2025-07-16 12:10:37 -04:00
Vijay Janapa Reddi
1f7d3ce7f7 Reorganize FAQ to be material-focused and compact
- Remove career projections and salary mentions (too sales-y)
- Add dropdown format for compact presentation
- Logical order: basic skepticism → advanced concerns → practical details
- Focus on learning benefits and technical substance
- More concise and scannable format
2025-07-16 12:00:39 -04:00
Vijay Janapa Reddi
915ee1f327 Add comprehensive FAQ addressing real concerns about building from scratch
- Address Transformer dominance vs foundations learning
- Explain why not just use PyTorch/TensorFlow
- Differentiate from basic tutorials - emphasize systems thinking
- Show concrete ROI and career impact
- Bridge academic vs practical concerns
- Provide realistic time investment and career paths
- Address common objections with evidence-based responses
2025-07-16 11:58:31 -04:00
Vijay Janapa Reddi
a01184f5ec Simplify system integration diagram
- Remove overwhelming visual styling and colored subgraphs
- Keep clear flow arrows showing module dependencies
- Cleaner, less intimidating presentation
- Maintains waterfall concept without visual complexity
2025-07-16 11:55:13 -04:00
Vijay Janapa Reddi
c29317a16c Add visual waterfall diagram for system integration
- Replace dry text description with engaging Mermaid flowchart
- Show clear progression through 4 educational layers: Foundation → Deep Learning → Production → Mastery
- Use color coding and visual flow arrows to demonstrate module dependencies
- Make it immediately clear how each module builds into the next
2025-07-16 11:54:04 -04:00
Vijay Janapa Reddi
dc77c3de0e docs: Clean up whitespace and formatting in module READMEs
- Fixed trailing whitespace in several module README files
- Ensures consistent formatting across all documentation
2025-07-16 11:50:23 -04:00
Vijay Janapa Reddi
59f550d163 build: Update generated book content with all improvements
- Regenerated all chapters with YAML-based difficulty ratings
- Updated book with improved navigation and fixed appendix links
- Applied copyright year 2025 across all pages
- Integrated inclusive language changes throughout generated content
- Book now reflects all UX and consistency improvements
2025-07-16 11:48:38 -04:00
Vijay Janapa Reddi
7b620d98aa refactor: Replace "Master" with "Reflect" in learning framework
- Updated learning philosophy from "Build, Use, Master" to "Build, Use, Reflect"
- Changed setup module: "Build → Use → Reflect"
- Changed capstone module: "Build → Optimize → Reflect"
- Promotes inclusive language and emphasizes metacognition over dominance
- Better pedagogical approach focusing on thoughtful analysis and system thinking
2025-07-16 11:48:28 -04:00
Vijay Janapa Reddi
7625de3d0c feat: Improve landing page UX and navigation consistency
- Fixed navigation by removing missing appendix references from _toc.yml
- Moved complementary learning section up for better visibility (after astronaut hook)
- Fixed duplicate rocket icons: 🎯 Capstone, 🛤️ Learning Path,  Ready to Start
- Improved visual hierarchy with unique, meaningful icons for each section
- Enhanced readability and scannability of landing page content
2025-07-16 11:48:19 -04:00
Vijay Janapa Reddi
507cdf50f5 refactor: Implement YAML-based difficulty and time system
- Added educational metadata (difficulty, time_estimate) to all module.yaml files
- Updated convert_readmes.py to read from YAML instead of hardcoded mappings
- Standardized difficulty progression: 🥷
- Fixed path resolution for YAML reading in book build process
- Eliminated duplication: single source of truth for educational metadata
- Capstone gets special ninja treatment (🥷) as beyond-expert level
2025-07-16 11:48:09 -04:00