PyTorch is an open source machine learning library used to build and train neural networks, originally developed by Meta. It runs tensor maths on the GPU and computes gradients automatically, which is why most AI research and model training is done in it.