Skip to content

Professional PyTorch CLI learning tool with 24 comprehensive lessons - From tensor basics to ExecutorTorch deployment with interactive examples

License

Notifications You must be signed in to change notification settings

umitkacar/pytorch-interactive-learning

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

12 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

๐Ÿ”ฅ PyTorch Teaching - Professional CLI Learning Tool ๐Ÿš€

PyTorch Logo

Master Deep Learning from Basics to Production โœจ

๐ŸŽฏ NEW in v2.0: Complete CLI Rewrite with ExecutorTorch & 24 Lessons!

GitHub stars GitHub forks License PyTorch Python

๐Ÿ† Code Quality & Testing

Tests Coverage Ruff Black MyPy Pre-commit

What's New โ€ข Features โ€ข Installation โ€ข Usage โ€ข Curriculum โ€ข Contributing


๐ŸŽฏ What's New in v2.0

๐Ÿš€ Complete Rewrite: Transformed from Jupyter notebooks to a professional CLI tool!

  • โœ… Modern CLI Interface: Interactive command-line tool with typer and rich
  • โœ… Professional Structure: src layout + 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

Quick Start

# 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

๐ŸŒŸ Features

๐ŸŽฏ Professional CLI Tool

  • ๐Ÿ–ฅ๏ธ Interactive command-line interface
  • ๐ŸŽจ Beautiful Rich formatting
  • โšก Fast and responsive
  • ๐Ÿ“Š Real-time diagnostics

๐Ÿš€ Modern Development

  • ๐Ÿ”ฌ PyTorch 2.x features
  • ๐Ÿง  Production patterns
  • ๐Ÿ† Industry best practices
  • ๐Ÿ“ฆ Easy pip/hatch install

๐Ÿ“š Curriculum

24 Comprehensive Lessons - From Basics to Production

Run any lesson with: pytorch-teach run <lesson_number>

๐Ÿ“– Foundation (Lessons 1-7)

  • โœ… 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

โšก Performance Optimization (Lessons 8-10)

  • ๐Ÿšง Lesson 8: Automatic Mixed Precision (AMP)
  • ๐Ÿšง Lesson 9: torch.compile & Model Compilation
  • ๐Ÿšง Lesson 10: Profiling & Performance Analysis

๐ŸŒ Distributed Training (Lessons 11-13)

  • ๐Ÿšง Lesson 11: DistributedDataParallel (DDP)
  • ๐Ÿšง Lesson 12: Fully Sharded Data Parallel (FSDP)
  • ๐Ÿšง Lesson 13: Advanced Distributed Strategies

๐Ÿ”ง Model Optimization (Lessons 14-16)

  • ๐Ÿšง Lesson 14: Quantization (INT8/INT4)
  • ๐Ÿšง Lesson 15: Model Pruning & Sparsity
  • ๐Ÿšง Lesson 16: Knowledge Distillation

๐Ÿ—๏ธ Modern Architectures (Lessons 17-19)

  • ๐Ÿšง Lesson 17: Transformer Architectures from Scratch
  • ๐Ÿšง Lesson 18: CNNs Best Practices
  • ๐Ÿšง Lesson 19: RNNs & Sequence Modeling

๐Ÿš€ Production Deployment (Lessons 20-22)

  • ๐Ÿšง Lesson 20: Model Export & Deployment Strategies
  • โœ… Lesson 21: ExecutorTorch - Mobile & Edge AI ๐Ÿ”ฅ - pytorch-teach run 21
  • ๐Ÿšง Lesson 22: Custom Operators & C++ Extensions

๐ŸŽฏ Advanced Topics (Lessons 23-24)

  • ๐Ÿšง Lesson 23: Memory Optimization Techniques
  • ๐Ÿšง Lesson 24: Production Best Practices & Patterns

Legend: โœ… Available Now | ๐Ÿšง Coming Soon


๐ŸŽฎ Usage

CLI Commands

# 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

Interactive Experience

$ 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...]

๐Ÿ”ฅ 2024-2025 Trending Resources

๐Ÿ† Must-Follow Repositories

๐Ÿค– Large Language Models

LLaMA GPT-NeoX Transformers

๐ŸŽจ Computer Vision

YOLOv10 SAM 2 GroundingDINO

๐Ÿš€ Training & Optimization

DeepSpeed Flash-Attention Axolotl

๐ŸŒ Advanced PyTorch Frameworks (2024-2025)

Framework Description Stars Use Case
๐Ÿ”ฅ PyTorch Lightning High-level PyTorch framework Stars Production-ready training
โšก TorchTune Native PyTorch LLM fine-tuning Stars LLM fine-tuning
๐ŸŽฏ Diffusers State-of-the-art diffusion models Stars Image/Video generation
๐Ÿง  Unsloth 2x faster LLM training Stars Efficient fine-tuning
๐Ÿ”ฌ torchao PyTorch native quantization Stars Model optimization
๐ŸŽช Torchvision Computer vision library Stars Vision tasks

๐ŸŽ“ Learning Resources 2024-2025

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 โญโญโญโญโญ

๐ŸŽฌ Hot Topics 2024-2025

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
Loading

๐Ÿ› ๏ธ Installation

Quick Start โšก

# 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

Docker Setup ๐Ÿณ

# 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

๐ŸŽฏ Roadmap

โœ… 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

๐Ÿ’ป System Requirements

Minimum Requirements

  • ๐Ÿ–ฅ๏ธ CPU: Intel Core i5 or equivalent
  • ๐Ÿง  RAM: 8 GB
  • ๐Ÿ’พ Storage: 5 GB free space
  • ๐Ÿ Python: 3.9+
  • ๐Ÿ“ฆ PyTorch: 2.0+

Recommended Requirements

  • ๐Ÿ–ฅ๏ธ CPU: Intel Core i7/AMD Ryzen 7
  • ๐Ÿง  RAM: 16 GB+
  • ๐ŸŽฎ GPU: NVIDIA RTX 3060+ (8GB VRAM)
  • ๐Ÿ’พ Storage: 20 GB SSD
  • ๐Ÿ Python: 3.11+
  • ๐Ÿ“ฆ PyTorch: 2.9+

๐Ÿค Contributing

We welcome contributions! ๐ŸŽ‰

  1. ๐Ÿด Fork the repository
  2. ๐ŸŒฟ Create your feature branch (git checkout -b feature/AmazingFeature)
  3. ๐Ÿ’พ Commit your changes (git commit -m 'Add some AmazingFeature')
  4. ๐Ÿ“ค Push to the branch (git push origin feature/AmazingFeature)
  5. ๐ŸŽฏ Open a Pull Request

See: DEVELOPMENT.md for detailed contribution guidelines.


๐Ÿ“– Documentation

Complete Documentation Set

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

Quick Links


๐Ÿ“Š GitHub Stats

GitHub Stats Last Commit Issues


๐Ÿ“œ License

This project is licensed under the MIT License - see the LICENSE file for details.


๐ŸŒŸ Show Your Support

If you find this project helpful, please consider giving it a โญ!

Made with โค๏ธ for the PyTorch Community

Star History Chart


Happy Learning! ๐Ÿš€โœจ

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •