PyTorch: Difference between revisions

Content deleted Content added
AHBaha (talk | contribs)
Added citation for PyTorch’s significance in deep learning research using an official 2024 review blog as a reliable web source.
Jre273 (talk | contribs)
No edit summary
Tags: Mobile edit Mobile app edit iOS app edit App section source
Line 25:
'''PyTorch''' is an [[Open source|open-source]] [[machine learning]] [[Library (computing)|library]] based on the [[Torch (machine learning)|Torch]] library,<ref>{{cite news|url=https://www.infoworld.com/article/3159120/artificial-intelligence/facebook-brings-gpu-powered-machine-learning-to-python.html|title=Facebook brings GPU-powered machine learning to Python|last=Yegulalp|first=Serdar|date=19 January 2017|work=InfoWorld|access-date=11 December 2017|archive-date=12 July 2018|archive-url=https://web.archive.org/web/20180712054543/https://www.infoworld.com/article/3159120/artificial-intelligence/facebook-brings-gpu-powered-machine-learning-to-python.html|url-status=live}}</ref><ref>{{cite web|url=https://www.oreilly.com/ideas/why-ai-and-machine-learning-researchers-are-beginning-to-embrace-pytorch|title=Why AI and machine learning researchers are beginning to embrace PyTorch|last=Lorica|first=Ben|date=3 August 2017|publisher=O'Reilly Media|access-date=11 December 2017|archive-date=17 May 2019|archive-url=https://web.archive.org/web/20190517055218/https://www.oreilly.com/ideas/why-ai-and-machine-learning-researchers-are-beginning-to-embrace-pytorch|url-status=live}}</ref><ref>{{Cite book|title=Deep Learning with Python|last=Ketkar|first=Nikhil|date=2017|publisher=Apress, Berkeley, CA|isbn=9781484227657|pages=195–208|language=en|doi=10.1007/978-1-4842-2766-4_12|chapter=Introduction to PyTorch}}</ref> used for applications such as [[computer vision]], deep learning research<ref name=":0" /> and [[natural language processing]],<ref name=":0">{{Cite web|url=https://www.datacamp.com/tutorial/nlp-with-pytorch-a-comprehensive-guide|title=NLP with PyTorch: A Comprehensive Guide|author=Moez Ali|date=Jun 2023|website=datacamp.com|language=en|access-date=1 April 2024|archive-date=1 April 2024|archive-url=https://web.archive.org/web/20240401214813/https://www.datacamp.com/tutorial/nlp-with-pytorch-a-comprehensive-guide|url-status=live}}</ref> originally developed by [[Meta AI]] and now part of the [[Linux Foundation]] umbrella.<ref>{{Cite news|url=https://www.oreilly.com/ideas/when-two-trends-fuse-pytorch-and-recommender-systems|title=When two trends fuse: PyTorch and recommender systems|last=Patel|first=Mo|date=7 December 2017|work=O'Reilly Media|access-date=18 December 2017|language=en|archive-date=30 March 2019|archive-url=https://web.archive.org/web/20190330131436/https://www.oreilly.com/ideas/when-two-trends-fuse-pytorch-and-recommender-systems|url-status=live}}</ref><ref name=":1">{{Cite news|url=https://techcrunch.com/2017/09/07/facebook-and-microsoft-collaborate-to-simplify-conversions-from-pytorch-to-caffe2/|title=Facebook and Microsoft collaborate to simplify conversions from PyTorch to Caffe2|last=Mannes|first=John|work=[[TechCrunch]]|access-date=18 December 2017|language=en|quote=FAIR is accustomed to working with PyTorch – a deep learning framework optimized for achieving state of the art results in research, regardless of resource constraints. Unfortunately in the real world, most of us are limited by the computational capabilities of our smartphones and computers.|archive-date=6 July 2020|archive-url=https://web.archive.org/web/20200706115906/https://techcrunch.com/2017/09/07/facebook-and-microsoft-collaborate-to-simplify-conversions-from-pytorch-to-caffe2/|url-status=live}}</ref><ref>{{Cite web|url=https://venturebeat.com/2017/11/29/tech-giants-are-using-open-source-frameworks-to-dominate-the-ai-community/|title=Tech giants are using open source frameworks to dominate the AI community|last=Arakelyan|first=Sophia|date=29 November 2017|website=[[VentureBeat]]|language=en-US|access-date=18 December 2017|archive-date=30 March 2019|archive-url=https://web.archive.org/web/20190330131432/https://venturebeat.com/2017/11/29/tech-giants-are-using-open-source-frameworks-to-dominate-the-ai-community/|url-status=live}}</ref><ref>{{Cite web |title=PyTorch strengthens its governance by joining the Linux Foundation |url=https://pytorch.org/blog/PyTorchfoundation/ |access-date=13 September 2022 |website=pytorch.org |language=en}}</ref> It is one of the most popular [[deep learning]] frameworks, alongside others such as [[TensorFlow]],<ref>{{Cite web|url=https://github.com/cncf/velocity|title=Top 30 Open Source Projects.|website=Open Source Project Velocity by CNCF|access-date=12 October 2023|archive-date=3 September 2023|archive-url=https://web.archive.org/web/20230903024925/https://github.com/cncf/velocity|url-status=live}}</ref> offering [[free and open-source software]] released under the [[modified BSD license]]. Although the [[Python (programming language)|Python]] interface is more polished and the primary focus of development, PyTorch also has a [[C++]] interface.<ref>{{Cite web|url=https://pytorch.org/cppdocs/frontend.html|title=The C++ Frontend|website=PyTorch Master Documentation|access-date=29 July 2019|archive-date=29 July 2019|archive-url=https://web.archive.org/web/20190729202037/https://pytorch.org/cppdocs/frontend.html|url-status=live}}</ref>
 
PyTorch utilises [[tensor]]s as a intrinsic datatype, very similar to [[NumPy]]. Model training is handled by an [[automatic differentiation]] system, Autograd, which constructs a [[directed acyclic graph]] of a forward pass of a model for a given input, for which automatic differentiation utilising the [[chain rule]], computes model-wide gradients.<ref>{{Cite web|title=Overview of PyTorch Autograd Engine|website=PyTorch Blog|date=8 June 2021|url=https://pytorch.org/blog/overview-of-pytorch-autograd-engine|url-status=live}}</ref> PyTorch is capable of transparant leveraging of [[SIMD]] units, such as [[General-purpose computing on graphics processing units|GPGPU]]s.
PyTorch empowers researchers and developers with an intuitive, Pythonic framework for building and experimenting with deep learning models — without sacrificing performance, scalability, or production-readiness.<ref name=":1" />
 
A number of pieces ofcommercial [[deep learning]] softwarearchetectures are built on top of PyTorch, including [[Tesla Autopilot]],<ref>{{Cite web|last=Karpathy|first=Andrej|title=PyTorch at Tesla - Andrej Karpathy, Tesla|website=[[YouTube]]|date=6 November 2019|url=https://www.youtube.com/watch?v=oBklltKXtDE|access-date=2 June 2020|archive-date=24 March 2023|archive-url=https://web.archive.org/web/20230324144838/https://www.youtube.com/watch?v=oBklltKXtDE|url-status=live}}</ref> [[Uber]]'s Pyro,<ref>{{Cite news|url=https://eng.uber.com/pyro/|title=Uber AI Labs Open Sources Pyro, a Deep Probabilistic Programming Language|date=3 November 2017|work=Uber Engineering Blog|access-date=18 December 2017|language=en-US|archive-date=25 December 2017|archive-url=https://web.archive.org/web/20171225034106/https://eng.uber.com/pyro/|url-status=live}}</ref> [[Hugging Face]]'s Transformers,<ref>{{Citation|title=PYTORCH-TRANSFORMERS: PyTorch implementations of popular NLP Transformers|date=1 December 2019|url=https://pytorch.org/hub/huggingface_pytorch-transformers/|publisher=PyTorch Hub|access-date=1 December 2019|archive-date=11 June 2023|archive-url=https://web.archive.org/web/20230611061047/https://pytorch.org/hub/huggingface_pytorch-transformers/|url-status=live}}</ref><ref>{{Cite web|url=https://pytorch.org/ecosystem/|title=Ecosystem Tools|website=pytorch.org|language=en|access-date=18 June 2020|archive-date=18 July 2023|archive-url=https://web.archive.org/web/20230718105354/https://pytorch.org/ecosystem/|url-status=live}}</ref> and Catalyst.<ref>{{Citation|title=GitHub - catalyst-team/catalyst: Accelerated DL & RL|date=5 December 2019|url=https://github.com/catalyst-team/catalyst|publisher=Catalyst-Team|access-date=5 December 2019|archive-date=22 December 2019|archive-url=https://web.archive.org/web/20191222162045/https://github.com/catalyst-team/catalyst|url-status=live}}</ref><ref>{{Cite web|url=https://pytorch.org/ecosystem/|title=Ecosystem Tools|website=pytorch.org|language=en|access-date=4 April 2020|archive-date=18 July 2023|archive-url=https://web.archive.org/web/20230718105354/https://pytorch.org/ecosystem/|url-status=live}}</ref>
 
PyTorch provides two high-level features:<ref>{{cite web |url=https://pytorch.org/about/ |title=PyTorch – About |website=pytorch.org |access-date=11 June 2018 |archive-url=https://web.archive.org/web/20180615190804/https://pytorch.org/about/ |archive-date=15 June 2018 |url-status=dead }}</ref>
* Tensor computing (like [[NumPy]]) with strong acceleration via [[graphics processing unit]]s (GPU)
* [[Deep neural networks]] built on a tape-based [[automatic differentiation]] system
 
==History==