PyTorch - AshokBhat/ml GitHub Wiki
About
- Popular Machine Learning Framework
- Free and Open source - Modified BSD license.
- Primary developer: Meta
- Interface: Python interface (polished and primary focus), C++ frontend
- 90-day release cycle (major releases)
Versions
See PyTorch Versions
Modes
Mode |
Work |
Eager mode |
Default execution mode. Operations are executed immediately. Allows for dynamic computation graphs Easy debugging. |
Graph mode |
FX Graph ("Function Exchange Graph") mode Operators are first synthesized into a graph, which will then be compiled and executed as a whole. Typically delivers higher performance and hence is heavily used in production. Useful for quantization tasks |
Feature level
Feature |
Desc |
Backwards Compatibility |
Future |
Stable |
|
Yes |
Yes |
Beta |
(previously Experimental) |
No |
Aim to become Stable |
Prototype |
(previously Nightlies) |
No |
Collect feedback, Fail fast |
Backend libraries
Library |
Features |
Performance on x86 |
Performance on Arm |
NNPACK |
ML operators |
|
Convolution (2x-3x) faster than standard im2col/sgemm implementation |
XNNPACK |
ML operators |
|
|
QNNPACK |
Quantized operators |
Not optimized |
Optimized for Arm |
Eigen |
|
|
fastest BLAS benchmarked on ARM |
FBGEMM |
Quantized GEMM |
|
Not optimized |
OpenBLAS |
BLAS and LAPACK |
|
Optimized on Arm for FP32 |
Source: https://caffe2.ai/docs/mobile-integration.html
Key libraries
Libraries |
Domain |
Description |
TorchServe |
Serving |
Tool for serving PyTorch models |
TorchVision |
Computer Vision |
Consists of popular datasets, model architectures, and common image transformations for computer vision. |
TorchAudio |
Audio |
Consists of I/O, popular datasets and common audio transformations. |
TorchText |
NLP |
Consists of data processing utilities and popular datasets for natural language processing |
TorchElastic |
Scaling |
For distributed training jobs to be executed in a fault-tolerant and elastic manner |
Components
Component |
Domain |
Description |
TorchInductor |
Compiler for PyTorch models |
|
TorchDyanmo |
Python-level JIT compiler for PyTorch |
To make unmodified PyTorch programs faster by generating machine code from the Python bytecode. |
Ecosystem
History
- Facebook operated both PyTorch and Caffe2, but models defined by the two frameworks were mutually incompatible.
- Caffe2 was merged into PyTorch at the end of March 2018.
See also