🎯 NEW in v2.0: Complete CLI Rewrite with ExecutorTorch & 24 Lessons!
What's New • Features • Installation • Usage • Curriculum • Contributing
🚀 Complete Rewrite: Transformed from Jupyter notebooks to a professional CLI tool!
- ✅ Modern CLI Interface: Interactive command-line tool with
typerandrich - ✅ Professional Structure:
srclayout +pyproject.toml+hatch+ pre-commit hooks - ✅ 24 Comprehensive Lessons: ExecutorTorch, Quantization, Distributed Training & more
- ✅ Production-Ready: Real-world patterns, best practices, testing
- ✅ Zero Notebooks: Pure Python for better collaboration and version control
# Install
pip install -e .
# Run a lesson
pytorch-teach run 1 # Tensor Fundamentals
pytorch-teach run 21 # ExecutorTorch (🔥 Mobile AI!)
# List all lessons
pytorch-teach list-lessons
# Health check
pytorch-teach doctor
# Show system info
pytorch-teach info
|
|
Run any lesson with: pytorch-teach run <lesson_number>
- ✅ Lesson 1: Tensor Fundamentals -
pytorch-teach run 1 - ✅ Lesson 2: Mathematical Operations -
pytorch-teach run 2 - ✅ Lesson 3: Device Management (CPU/CUDA/MPS) -
pytorch-teach run 3 - 🚧 Lesson 4: Autograd & Automatic Differentiation
- 🚧 Lesson 5: Neural Networks with nn.Module
- 🚧 Lesson 6: DataLoaders & Efficient Data Pipelines
- 🚧 Lesson 7: Training Loops & Optimization
- 🚧 Lesson 8: Automatic Mixed Precision (AMP)
- 🚧 Lesson 9: torch.compile & Model Compilation
- 🚧 Lesson 10: Profiling & Performance Analysis
- 🚧 Lesson 11: DistributedDataParallel (DDP)
- 🚧 Lesson 12: Fully Sharded Data Parallel (FSDP)
- 🚧 Lesson 13: Advanced Distributed Strategies
- 🚧 Lesson 14: Quantization (INT8/INT4)
- 🚧 Lesson 15: Model Pruning & Sparsity
- 🚧 Lesson 16: Knowledge Distillation
- 🚧 Lesson 17: Transformer Architectures from Scratch
- 🚧 Lesson 18: CNNs Best Practices
- 🚧 Lesson 19: RNNs & Sequence Modeling
- 🚧 Lesson 20: Model Export & Deployment Strategies
- ✅ Lesson 21: ExecutorTorch - Mobile & Edge AI 🔥 -
pytorch-teach run 21 - 🚧 Lesson 22: Custom Operators & C++ Extensions
- 🚧 Lesson 23: Memory Optimization Techniques
- 🚧 Lesson 24: Production Best Practices & Patterns
Legend: ✅ Available Now | 🚧 Coming Soon
# Show help
pytorch-teach --help
ptt --help # Short alias
# Display system info
pytorch-teach info
# List all lessons
pytorch-teach list-lessons
# Run lessons
pytorch-teach run 1 # Tensor Fundamentals
pytorch-teach run 2 # Math Operations
pytorch-teach run 3 # Device Management
pytorch-teach run 21 # ExecutorTorch 🔥
# Run in batch mode (non-interactive)
pytorch-teach run 1 --batch
# Run with verbose output
pytorch-teach run 1 --verbose
# Health check your PyTorch installation
pytorch-teach doctor$ pytorch-teach run 21
╔═══════════════════════════════════════════════════════════╗
║ 🔥 PyTorch Teaching - Professional Learning CLI 🔥 ║
║ Master Deep Learning from Basics to Production ║
╚═══════════════════════════════════════════════════════════╝
✓ CUDA Available: 12.1 (1 device(s))
GPU: NVIDIA GeForce RTX 4090
[Beautiful, interactive lesson on ExecutorTorch deployment...]| Framework | Description | Stars | Use Case |
|---|---|---|---|
| 🔥 PyTorch Lightning | High-level PyTorch framework | Production-ready training | |
| ⚡ TorchTune | Native PyTorch LLM fine-tuning | LLM fine-tuning | |
| 🎯 Diffusers | State-of-the-art diffusion models | Image/Video generation | |
| 🧠 Unsloth | 2x faster LLM training | Efficient fine-tuning | |
| 🔬 torchao | PyTorch native quantization | Model optimization | |
| 🎪 Torchvision | Computer vision library | Vision tasks |
| Resource | Type | Level | 🌟 Rating |
|---|---|---|---|
| Deep Learning with PyTorch | Official Tutorials | Beginner-Advanced | ⭐⭐⭐⭐⭐ |
| Fast.ai Practical Deep Learning | Course | Intermediate | ⭐⭐⭐⭐⭐ |
| d2l.ai - Dive into Deep Learning | Interactive Book | All Levels | ⭐⭐⭐⭐⭐ |
| PyTorch Recipes | Code Snippets | All Levels | ⭐⭐⭐⭐ |
| Papers with Code | Research + Code | Advanced | ⭐⭐⭐⭐⭐ |
mindmap
root((PyTorch 🔥))
Large Language Models
LLaMA 3.3
Mixtral 8x7B
Gemma 2
Phi-4
Computer Vision
SAM 2
YOLOv10
DINO v2
Depth Anything
Generative AI
Stable Diffusion 3.5
FLUX
Sora-like models
ControlNet
Optimization
INT4/INT8 Quantization
Flash Attention 3
LoRA/QLoRA
Model Pruning
# Clone the repository
git clone https://github.com/umitkacar/Pytorch-Teaching.git
cd Pytorch-Teaching
# Create virtual environment
python -m venv venv
source venv/bin/activate # On Windows: venv\Scripts\activate
# Install PyTorch (CPU version)
pip install torch torchvision torchaudio
# Install PyTorch (GPU version - CUDA 12.1)
pip install torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cu121
# Install additional dependencies
pip install jupyter matplotlib numpy pandas# Pull official PyTorch image
docker pull pytorch/pytorch:2.5.0-cuda12.1-cudnn9-runtime
# Run Jupyter
docker run -it --gpus all -p 8888:8888 -v $(pwd):/workspace pytorch/pytorch:2.5.0-cuda12.1-cudnn9-runtime jupyter notebook --allow-root✅ Lesson 1: Tensor Fundamentals
✅ Lesson 2: Math Operations
✅ Lesson 3: CPU/CUDA Conversion
🚧 Lesson 4: Neural Networks Basics (Coming Soon)
🚧 Lesson 5: Convolutional Neural Networks
🚧 Lesson 6: Recurrent Neural Networks
🚧 Lesson 7: Transformers & Attention
🚧 Lesson 8: Transfer Learning
🚧 Lesson 9: Generative Models
🚧 Lesson 10: Production Deployment
|
|
We welcome contributions! 🎉
- 🍴 Fork the repository
- 🌿 Create your feature branch (
git checkout -b feature/AmazingFeature) - 💾 Commit your changes (
git commit -m 'Add some AmazingFeature') - 📤 Push to the branch (
git push origin feature/AmazingFeature) - 🎯 Open a Pull Request
See: DEVELOPMENT.md for detailed contribution guidelines.
| Document | Description | Status |
|---|---|---|
| README.md | Main project overview and quickstart | ✅ Current |
| INSTALL.md | Detailed installation instructions | ✅ Complete |
| DEVELOPMENT.md | Developer setup and contribution guide | ✅ Complete |
| TEST_RESULTS.md | Comprehensive QA report | ✅ Complete |
| lessons-learned.md | Project insights and best practices | ✅ Complete |
| CHANGELOG.md | Version history and changes | ✅ Updated |
- 🚀 Getting Started: INSTALL.md
- 🧪 Testing: TEST_RESULTS.md
- 🛠️ Development: DEVELOPMENT.md
- 📝 Changes: CHANGELOG.md
- 🎓 Lessons Learned: lessons-learned.md
This project is licensed under the MIT License - see the LICENSE file for details.
If you find this project helpful, please consider giving it a ⭐!
