PyTorch is an open-source deep learning framework released in 2016 by FAIR, the AI research group of Facebook (now Meta). A Python redesign of the Lua-based Torch library, it provides GPU-accelerated tensor operations and the autograd automatic differentiation engine. Its define-by-run approach builds the computation graph as code executes, so models can be debugged like ordinary Python programs.
In the standard training loop, a model is defined as a torch.nn.Module class, loss.backward() computes gradients, and optimizer.step() updates the parameters. Governance moved to the PyTorch Foundation under the Linux Foundation in 2022. It is the de facto standard framework for most LLM research and open-model implementations, including Hugging Face Transformers.