pytorch
Installation
SKILL.md
PyTorch
PyTorch is the dominant framework for research and production AI. v2.5 (2025) solidifies torch.compile and introduces FlexAttention.
When to Use
- Research: 99% of new papers (Arxiv) use PyTorch.
- Production: Recommended for almost all new DL projects.
- Performance:
torch.compileprovides C++ level speed with Python ease.
Core Concepts
torch.compile
Just-in-Time (JIT) compilation of your model.
model = torch.compile(model) -> 2x speedup.