๐ฏ 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 โญ!
