Tensors and neural networks in Python with strong hardware acceleration. PyTorch is an open source project at the Linux Foundation. #PyTorchFoundation

Today marks 5 years since the public release of PyTorch! We didn't expect to come this far, but here we're🙂- 2K Contributors, 90K Projects, 3.9M lines of "import torch" on GitHub. More importantly, we're still receiving lots of love and having a great ride. Here's to the future!
59
427
3,208
We’re excited to announce support for GPU-accelerated PyTorch training on Mac! Now you can take advantage of Apple silicon GPUs to perform ML workflows like prototyping and fine-tuning. Learn more: pytorch.org/blog/introducing…
64
652
3,099
To help developers get started with PyTorch, we’re making the 'Deep Learning with PyTorch' book, written by Luca Antiga and Eli Stevens, available for free to the community: pytorch.org/deep-learning-wi…
33
870
2,474
The full version of the Deep Learning with PyTorch book from Luca Antiga, Eli Stevens, and Thomas Viehmann is now available! New chapters include in-depth real-world examples and production deployment. Grab a free digital copy on: pytorch.org/deep-learning-wi…
26
681
2,344
We’re excited to announce the release of PyTorch 2.0! This version includes: ⚙️ 100% backward compatible 📦 Out of the box performance 📶 Significant speed improvements Learn more 👇 hubs.la/Q01H4L1t0
23
582
2,047
484,576
Inside the Matrix: Use 3D to visualize matrix multiplication expressions, attention heads with real weights, and more. ⚡ Read our latest post on visualizing matrix multiplication, attention and beyond: hubs.ly/Q0230BWD0
12
382
1,921
326,657
We just introduced PyTorch 2.0 at the #PyTorchConference, introducing torch.compile! Available in the nightlies today, stable release Early March 2023. Read the full post: bit.ly/3VNysOA 🧵below! 1/5
22
491
1,748
Want to make your inference code in PyTorch run faster? Here’s a quick thread on doing exactly that. 1. Replace torch.no_grad() with the ✨torch.inference_mode()✨ context manager.
7
355
1,693
10x performance on LLaMa 7B, all in native PyTorch. No C++ needed. Check out our second blog post in a series on Accelerating Generative AI using Native PyTorch. 🔥 hubs.la/Q02bx5Bn0
14
255
1,515
198,569
PyTorch is now installed by default on Google Colaboratory. Go ahead and `import torch`, `import torchvision`, `import torchtext`
25
436
1,504
We're excited to release the torch.fft module in PyTorch 1.8. This module implements the same functions as NumPy’s np.fft module, but with support for accelerators, like GPUs, and autograd. Learn more 👉 pytorch.org/blog/the-torch.f…
17
257
1,462
Microsoft VSCode integrates deeply with PyTorch out of the box. As @aerinykim highlights: 1. It shows values inside tensors. (Left panel) 2. By simply mousing over, you can see the variable's shape, weight, bias, dtype, device, etc. code.visualstudio.com/
21
410
1,442
Announcing the alpha release of torchtune! torchtune is a PyTorch-native library for fine-tuning LLMs. It combines hackable memory-efficient fine-tuning recipes with integrations into your favorite tools. Get started fine-tuning today! Details: hubs.la/Q02t214F0
16
289
1,408
156,374
PyTorch 2.9 is now available, introducing key updates to performance, portability, and the developer experience. This release includes a stable libtorch ABI for C++/CUDA extensions, symmetric memory for multi-GPU kernels, expanded wheel support to include ROCm, XPU, and CUDA 13, and enhancements for Intel, Arm, and x86 platforms. With 3,216 commits from 452 contributors, PyTorch 2.9 continues to advance open source AI for developers worldwide. 🔗 Read the full release blog: hubs.la/Q03NNKqW0 #PyTorch #OpenSourceAI #AI #Performance
21
182
1,445
123,831
Introducing torch.profiler! New PyTorch Profiler collects both GPU and framework related info, correlates them, performs automatic detection of bottlenecks in the model, generates recommendations on how to resolve these bottlenecks, and visualize. Read 👉pytorch.org/blog/introducing…
5
320
1,314
PyTorch 1.8 is here! Highlights include updates for compiler, code optimization, frontend APIs for scientific computing, large scale training for pipeline and model parallelism, and Mobile tutorials. Blog👇pytorch.org/blog/pytorch-1.8…
1
258
1,136
Learn PyTorch on GPUs for free via Google Colaboratory each PyTorch tutorial now has a link to open it on Colab, where you can interactively execute and play with code. #thanksgoogle
3
272
1,042
Introducing VISSL (vissl.ai) - a library for reproducible, SOTA self-supervised learning for computer vision! Over 10 methods implemented, 60 pre-trained models, 15 benchmarks, and counting.
9
249
1,016
Understanding GPU Memory 1: Visualizing All Allocations over Time 👀 In part 1 of this series, we show how to use Memory Snapshot, the Memory Profiler, and the Reference Cycle Detector to debug out of memory errors and improve memory usage. Read more: hubs.la/Q02d6VZQ0
1
187
1,018
164,519
PyTorch 2.2 is here 🎉 Featuring: - SDPA support of FlashAttention-2 - New ahead-of-time extension of TorchInductor - device_mesh, a new abstraction for initializing and representing ProcessGroups - A standardized, configurable logging mechanism called TORCH_LOGS
13
182
988
107,536
A walkthrough of the PyTorch Internals by core developer @ezyang . It's a great resource if you want to contribute to PyTorch. blog.ezyang.com/2019/05/pyto…
8
293
958
PyTorch 1.9 is here! Highlights include improvements for: - torch.linalg, torch.special, and Complex Autograd - Mobile Interpreter - TorchElastic - The PyTorch RPC framework - APIs for model inference deployment - PyTorch Profiler See full details👇 pytorch.org/blog/pytorch-1.9…
6
248
970
GPU Tensors, Dynamic Neural Networks and deep Python integration. Hello world! pytorch.org
13
486
894
Introducing torchchat 🔥 A lightweight library to run LLMs locally across mobile, desktop and laptops powered by PyTorch. Learn more: hubs.la/Q02JpY6c0 #llms #mobilellms #localai #pytorchllm #edge #ondeviceai
16
185
864
160,059
Happy 3rd Birthday TensorFlow! Looking forward to competing with and complementing you over the years. #HappyBirthdayTF
Happy 3rd birthday TensorFlow! We've come a long way since the first release in 2015 & TensorFlow wouldn't be the framework it is today without you. As we work on #TensorFlow20, look at all the features we've added over the years to make TensorFlow easier to use. #HappyBirthdayTF
11
111
847
torchvision 0.3.0: segmentation, detection models, new datasets, C++/CUDA operators Blog with link to tutorial, release notes: pytorch.org/blog/torchvision… Install commands have changed, use the selector on pytorch.org
9
267
841
Stochastic Weight Averaging (SWA) is a simple procedure that improves generalization in deep learning over Stochastic Gradient Descent (SGD). PyTorch 1.6 now includes SWA natively. Learn more from @Pavel_Izmailov, @andrewgwils and Vincent: pytorch.org/blog/pytorch-1.6…
5
196
835
The full hands-on tutorials, "Building Recommender Systems with PyTorch", are now available. We show how to build deep learning recommendation system and resolve the associated interpretability, integrity, and privacy challenges. See: piped.video/playlist?list=PL…
3
188
810
PyTorch Lightning 1.0.0 is now available. This is the final stable API to train and deploy models at scale, without the boilerplate. Read more about this release below: medium.com/pytorch/pytorch-l…
5
157
776
Disney uses PyTorch for animated character recognition and to speed up its video processing pipeline. @DTCITechnology engineers also contributed new features to the Torchvision domain library. bit.ly/disney-pytorch-case-s…
176
771
If you installed PyTorch-nightly on Linux between Dec. 25 and Dec. 30, uninstall it and torchtriton immediately and use the latest nightly binaries. Read the security advisory here: pytorch.org/blog/compromised…
14
484
748
523,522
v1.6: native mixed-precision support from NVIDIA (~2x perf improvement), distributed perf improvements, new profiling tool for memory consumption, Microsoft commits to developing and maintaining Windows PyTorch. Release Notes: github.com/pytorch/pytorch/r… Blog:pytorch.org/blog/pytorch-1.6…
4
227
755
The team @WadhwaniAI has built a multi-task network that detects pest infestations in cotton crops. This technology is being put directly in the hands of more than 18,000 farmers across India using #PyTorch Mobile, TorchServe, and Weights & Biases. bit.ly/wadhwani-ai-cotton-fa…
11
165
731
Today, we made usability and content improvements to PyTorch Tutorials including additional categories, a new recipe format for quickly referencing common topics, sorting using tags, and an updated homepage. Learn more: pytorch.org/blog/updates-imp…
11
186
739
Welcome OpenAI to the PyTorch community!
We're standardizing OpenAI's deep learning framework on PyTorch to increase our research productivity at scale on GPUs (and have just released a PyTorch version of Spinning Up in Deep RL): openai.com/blog/openai-pytor…
3
137
744
Dear PyTorch users, We're sharing the roadmap for PyTorch 1.0: production ready PyTorch. Coming later this summer. pytorch.org/2018/05/02/road-…
9
276
744
DGL (Deep Graph Library) - Clean and efficient library to build graph neural networks including GCN, TreeLSTM and graph generative models. Includes auto-batching and other tricks for speed. github.com/dmlc/dgl
3
262
731
Do you want to adapt an LLM on your own data and domain? 🤔 Learn how to finetune a 7B parameter model on a typical consumer GPU (NVIDIA T4 16GB) with LoRA and tools from the PyTorch and Hugging Face ecosystem in our latest post. Details 👉 hubs.la/Q02g0x1N0
7
161
711
67,665
PyTorch 2.6 is here! This release brings key improvements, including:
 🔥 torch.compile support for Python 3.13 🔥 A new performance tuning knob: torch.compiler.set_stance
 🔥 Enhancements to AOTInductor
 🔥 FP16 support on X86 CPUs Learn more in our release blog: hubs.la/Q034zXph0 #pytorch #pytorchrelease #opensource
13
138
743
134,618
v1.7: CUDA 11 supported with binaries on PyTorch.org, updated profiling/performance for RPC, TorchScript and Stack traces in the autograd profiler, support for NumPy compatible FFT via torch.fft. Release Notes: github.com/pytorch/pytorch/r… Blog: 👇pytorch.org/blog/pytorch-1.7…
10
174
725
PyTorch 2.3 is here 😎🔥 PyTorch 2.3 offers support for user-defined Triton kernels in torch.compile, allowing for users to migrate their own Triton kernels from eager without experiencing performance regressions or graph breaks. Details: hubs.la/Q02tYcYq0
7
125
726
79,847
PyTorch 1.10 is here! Highlights include updates for: - CUDA Graphs APIs updates - Several frontend APIs moved to Stable - Automatic fusion in JIT Compiler support for CPU/GPUs - Android NNAPI now in beta Blog: pytorch.org/blog/pytorch-1.1… Release: github.com/pytorch/pytorch/r…
10
153
619
Tensorboard-PyTorch plugin now includes graph visualization of your model. Live demo here: bit.ly/2ESDQIN Github page: github.com/lanpa/tensorboard…
266
721
v1.5: autograd API for Hessians/Jacobians, C++ frontend stable and 100% parity with Python, Better performance on GPU and CPU with Tensor Format ‘channels last’, distributed.rpc stable, Custom C++ class binding Release notes: bit.ly/pytorch-1-dot-5-relea… Blog: bit.ly/pytorch-1dot5
4
211
691
We are a year old :) A post looking back at our journey, the lovely community, the engineering and love. pytorch.org/2018/01/19/a-yea…
13
196
708
vLLM Joins PyTorch Ecosystem 🎉 @vllm_project has always had a strong connection with the PyTorch project. Tight coupling with PyTorch ensures seamless compatibility and performance optimization across diverse hardware platforms. Read more: hubs.la/Q02-ZtmH0
9
101
713
53,081
Part 2️⃣: Understanding GPU Memory 🤔 In our latest post, we will use the Memory Snapshot to visualize a GPU memory leak caused by reference cycles, and then locate and remove them in our code using the Reference Cycle Detector. Read more: hubs.la/Q02drBVw0
4
139
690
93,930
Pyro, a probabilistic programming language on top of @PyTorch from Uber AI Labs eng.uber.com/pyro/ pyro.ai/
3
319
691
Announcing Flash-Decoding 🚀 Flash-Decoding makes LLM decoding much faster, and in particular allows to scale to very long sequence lengths (64k+) without slowdown! Read more on our blog: hubs.la/Q025Fldb0
2
122
685
121,144
Today we’d like to highlight features from functorch, a beta PyTorch library that provides JAX-inspired function transformations like vmap. (pytorch.org/functorch/) If you’re not sure what sort of cool new things vmap allows you to do, read on to learn more! (1/n)
5
127
672
Bolts is a new Deep Learning research and production toolbox from PyTorch Lightning. Iterate faster with pre-trained models, components, callbacks, and data sets, all modular, tested, and optimized for GPUs/TPUs. Simply subclass, override, and train. medium.com/pytorch/pytorch-l…
188
663
3x faster text-to-image diffusion models, all in pure PyTorch. No C++ needed. Check out our third blog post in the series on Accelerating Generative AI using Native PyTorch. 🔥 hubs.la/Q02f9TKh0
7
116
653
117,080
MaskRCNN-Benchmark: - A fast, modular reference of {Mask,Faster}RCNN - by @fvsmassa (PyTorch), optimized by Nvidia - reusable components, pre-trained models - optimized inference, live demo Hope to see mmdetection and other great projects reuse the code! github.com/facebookresearch/…
6
224
650
PyTorch 2.5 is here 🔥 We are excited to announce the release of #PyTorch 2.5, featuring a new CuDNN backend for SDPA, regional compilation of torch.compile, & TorchInductor CPP backend performance speedup Read more in our blog: hubs.la/Q02TRs9p0
10
149
662
50,442
✨ Low Numerical Precision in PyTorch ✨ Most DL models are single-precision floats by default. Lower numerical precision - while reasonably maintaining accuracy - reduces: a) model size b) memory required c) power consumed Thread about lower precision DL in PyTorch -> 1/11
2
129
664
Two creators of passion projects that transformed the landscape of how we code today — Linus Torvalds and @soumithchintala meet for the first time, sharing a smile and a love for the open source community. #PyTorchFoundation
8
66
632
Together with @msdev, we’ve created a PyTorch “Learn the Basics” tutorial. Familiarize yourself with PyTorch concepts and modules. Learn how to load data, build deep neural networks, train and save your models in this quick-start guide. Get started now: pytorch.org/tutorials/beginn…
6
153
631
@rstudio introduces Torch for R, an R package that allows researchers to use PyTorch functionality natively from R. No Python installation is required since torch is built directly on top of libtorch. Learn more: bit.ly/introducing-torch-for…
5
176
585
RoMa: an easy-to-to-use, stable and efficient library to deal with rotations and spatial transformations in PyTorch. Read all about this PyTorch Ecosystem Tool in our latest Medium post ⚡hubs.la/Q02hFsVf0
6
108
614
61,031
The Global PyTorch Summer Hackathon is back! This year, teams can compete in 3 categories: 1. Developer Tools 2. Web/Mobile applications 3. Responsible AI Development Tools Read more at: pytorch2020.devpost.com #PyTorchSummerHack
7
190
619
We’re happy to officially launch torchao, a PyTorch native library that makes models faster and smaller by leveraging low bit dtypes, quantization & sparsity. Our techniques are written in easy-to-read PyTorch code spanning both inference & training: hubs.la/Q02RnjwJ0
6
116
638
80,301
Today, Mark Zuckerberg announced the launch of the #PyTorchFoundation under the @LinuxFoundation & a board of @Meta @AMD @awscloud @googlecloud @Azure & @NVIDIAAI. With these leaders, learn how we're giving the AI community tools to accelerate innovation. bit.ly/3RPc2e8
7
151
601
PyTorch BigGraph: a distributed system for learning large graph embeddings - up to billions of entities and trillions of edges - Sharding and Negative Sampling - WikiData embeddings (78 mil entities, 4131 relations) - Blog: ai.facebook.com/blog/open-so… - Code: github.com/facebookresearch/…
3
193
625
Stochastic Weight Averaging: a simple procedure that improves generalization over SGD at no additional cost. Can be used as a drop-in replacement for any other optimizer in PyTorch. Read more: pytorch.org/blog/stochastic-… guest blogpost by @Pavel_Izmailov and @andrewgwils
3
177
587
Announcing PyTorch 2.1 Stable Release ⚡✨ PyTorch 2.1 offers automatic dynamic shape and NumPy compilation support in torch.compile, as well as torch.distributed.checkpoint for saving/loading distributed training jobs on multiple ranks. Learn more 👇 hubs.ly/Q024nsHY0
5
129
573
86,279
NeMo, @NVIDIA’s open-source toolkit based on #PyTorch, allows you to quickly build, train, and fine-tune conversational AI models. See how speech recognition, natural language processing and speech synthesis can be improved in this tutorial: bit.ly/nvidia-nemo-introduct…
173
571
Announcing ExecuTorch 🚀 ExecuTorch offers a compact runtime with a lightweight operator registry to cover the PyTorch ecosystem of models, and a streamlined path to execute PyTorch programs on edge devices. Details: hubs.la/Q025QtSY0
10
117
578
302,162
Hydra provides an ability to compose and override configuration from the command line and config files, helping PyTorch developers to more easily manage complex ML projects. bit.ly/3b6NV5V
7
134
546
We're excited to announce our first PyTorch Developer Day starting 8 AM on November 12, 2020 PST. Learn more: pytorch.org/blog/pytorch-dev… #PTD2
3
119
552
PyTorch now available on @pypi $ pip install torch thanks to all the devs who worked on Warehouse -- the new PyPI infrastructure
5
149
542
TorchServe v0.1.1 is available with new features and support for HuggingFace BERT, Waveglow, Model Zoo, SnakeViz Profiler, AWS CloudFormation Template, and Automated Integration regression test suite. Read the release notes for details: github.com/pytorch/serve/rel…
2
131
543
[v1.3.0] Named Tensors, iOS / Android support, Quantization, Type Promotion and more. Also available: TPU device, Detectron2, Captum for model interpretability, CrypTen for PPML research etc. Read more here: [Link to the PyTorch 1.3 blog] pytorch.org/blog/pytorch-1-d…
2
177
536
Torchmeta is a collection of extensions and data loaders for few-shot learning and meta-learning. It won first place at the Global PyTorch Summer Hackathon last year. Learn more in the blog post from Tristan Deleu, the project author: bit.ly/2unnI2w
1
141
536
Universal Music Translation Network: translating music across musical instruments and styles using unsupervised training github.com/facebookresearch/…
1
167
542
PyTorch Hub: reducing the friction in reproducing and building-upon research - Pull models with 1 line of code, and a few more to use - Curated models. Open with Google Colab and @paperswithcode - Publish your models by sending a PR Blog: pytorch.org/blog/towards-rep… #ICML2019
1
216
541
Announcing PyTorch 1.11, TorchData, and functorch! Highlights: - TorchData, a new library for common modular data loading primitives - functorch adds composable function transforms - DDP static graph optimizations in stable Learn more👇pytorch.org/blog/pytorch-1.1…
3
96
519
Catalyst is a PyTorch framework designed for reproducibility, faster experimentation and code/ideas reusing. This blog walks through MINST classifier tutorial and compare PyTorch and Catalyst code side-by-side: bit.ly/catalyst-101-pytorch
4
104
518
The PyTorch team is excited to share that our paper on PyTorch 2 has been accepted for presentation at ASPLOS 2024! The paper delves into the implementation of torch.compile and highlights the key technologies driving it, read it here 👇📝 hubs.la/Q02kKk7Q0
5
84
514
74,181
PyTorch BERT models are now 4x faster, thanks to @nvidia
Always amazed by what people do when you open-source your code! Here is pytorch-bert v0.4.0 in which - NVIDIA used their winning MLPerf competition techniques to make the model 4 times faster, - @rodgzilla added a multiple-choice model & how to fine-tune it on SWAG + many others!
1
117
515
PyTorch/XLA, a package that lets PyTorch connect to @GCPcloud TPUs and use TPU cores as devices, is now generally available. Highlights: - Support for Intra-Layer Model Parallelism - Additional XLA ops - Integrations with Colab and Kaggle notebooks bit.ly/pytorch-xla-is-now-ga…
2
137
504
Introducing @PyTorchLive, an easy to use library of tools for creating on-device ML demos on Android and iOS. With Live, you can build a working mobile app ML demo in minutes. Learn more at pytorch.org/live and post your demo with #PyTorchLive.
9
146
518
PyTorch Lightning V0.9 is available now featuring the final API with better data decoupling, shorter logging syntax, synchronized batchnorm, and more. Learn more: medium.com/pytorch/pytorch-l…
4
117
490
Torch-TensorRT is now an official part of the PyTorch ecosystem and now available on PyTorch GitHub and Documentation. Torch-TensorRT is a TensorRT integration for PyTorch that accelerates inference up to 4x on NVIDIA GPUs with just a single line of code. bit.ly/3MQbv8B
3
96
492
The Computer Vision Recipes repository by researchers at Microsoft provides examples and best practice guidelines for building CV systems. It supports classification, retrieval, tracking, action recognition, and more. Learn: medium.com/pytorch/pytorch-c…
1
170
493
Update from the PyTorch maintainers: 2.7 is out now. 🔹 Support for NVIDIA Blackwell (CUDA 12.8) 🔹 Mega Cache 🔹 torch.compile for Function Modes 🔹 FlexAttention updates 🔹 Intel GPU perf boost 🔗 Blog: hubs.la/Q03jBPSL0 📄 Release notes: hubs.la/Q03jBPlW0 #PyTorch #OpenSourceAI
12
86
504
62,564
Captum is a library for model interpretability. Its algorithms include integrated gradients, conductance, SmoothGrad and VarGrad, and DeepLift. Learn more: bit.ly/2wzCHr0
1
156
476
Github Engineering experiments with Semantic Code Search: search for code snippets using natural language. Built on top of fastai + PyTorch, it's fully open-source Read about their approach here: githubengineering.com/toward… Online Demo: experiments.github.com/seman…
3
155
469
PyTorch 1.9 extends PyTorch’s support for linear algebra operations with the torch.linalg module. The module has 26 operators, including every function from NumPy’s linear algebra module extended with accelerator and autograd support, and more. Read more: pytorch.org/blog/torch-linal…
3
97
467
This tutorial will introduce compute and data-efficient transformers and provide a step-by-step to create your own Vision Transformers. Through this guide, you'll be able to train state of the art results for classification in both computer vision & NLP. medium.com/pytorch/training-…
2
121
476
Introducing “Learn the Basics" - a guide to a complete ML workflow with detailed explanations on concepts like Tensors, DataLoaders, Transforms, and more. Thanks @sethjuarez, @subramen, @Cassieview, @shwars, @pythiccoder for your contributions! Click👇 pytorch.org/tutorials/beginn…
1
120
465
FX-based feature extraction is a new TorchVision utility that allows access to intermediate transformations of an input during the forward pass of a PyTorch Module. Read more below on what makes TorchVision's utility more versatile than existing methods. pytorch.org/blog/FX-feature-…
2
89
451
Introducing FlexAttention: a new API that lets you implement diverse attention variants in just a few lines of idiomatic PyTorch code. 🔥 Check out the blog post for more details: hubs.la/Q02KsKNR0
3
87
475
70,205