{"id":702,"date":"2022-12-03T15:40:47","date_gmt":"2022-12-03T15:40:47","guid":{"rendered":"https:\/\/tbekk.com\/devstream\/?p=702"},"modified":"2022-12-03T15:42:48","modified_gmt":"2022-12-03T15:42:48","slug":"pytorch-2-0-release-accelerates-open-source-machine-learning","status":"publish","type":"post","link":"https:\/\/tbekk.com\/devstream\/2022\/12\/03\/pytorch-2-0-release-accelerates-open-source-machine-learning\/","title":{"rendered":"PyTorch 2.0 release accelerates open-source machine learning"},"content":{"rendered":"\n<hr class=\"wp-block-separator is-style-wide\"\/>\n\n\n\n<ul class=\"wp-block-list\"><li><em><strong>Link: <\/strong><a href=\"https:\/\/venturebeat.com\/programming-development\/pytorch-2-0-release-accelerates-open-source-machine-learning\/\">pytorch-2-0-release-accelerates-open-source-machine-learning<\/a><\/em><\/li><li><em><strong>Publication Date: <\/strong>September 3 rd, 2022<\/em><\/li><\/ul>\n\n\n\n<hr class=\"wp-block-separator is-style-wide\"\/>\n\n\n\n<p>Among the most widely used&nbsp;<a href=\"https:\/\/www.google.com\/url?q=https:\/\/venturebeat.com\/ai\/artificial-intelligence-ai-vs-machine-learning-ml-key-comparisons\/&amp;sa=D&amp;source=editors&amp;ust=1670000749388931&amp;usg=AOvVaw3asH9WfMaSxZ72ju-mumIv\">machine learning (ML)<\/a>&nbsp;technologies today is the open-source PyTorch framework.<\/p>\n\n\n\n<p><a href=\"https:\/\/pytorch.org\/\" target=\"_blank\" rel=\"noreferrer noopener\">PyTorch<\/a>&nbsp;got its start at Facebook (now known as Meta) in 2016 with the 1.0 release debuting in 2018. In September 2022, Meta moved the PyTorch project to the<a href=\"https:\/\/venturebeat.com\/ai\/pytorch-has-a-new-home-meta-announces-independent-foundation\/\">&nbsp;new PyTorch Foundation<\/a>, which is operated by the Linux Foundation. Today, PyTorch developers took the next major step forward for PyTorch, announcing the first experimental release of PyTorch 2.0. The new release promises to help accelerate ML training and development, while still maintaining backward-compatibility with existing PyTorch application code.<\/p>\n\n\n\n<p>\u201cWe added an additional feature called `torch.compile` that users have to newly insert into their codebases,\u201d Soumith Chintala, lead maintainer, PyTorch. told VentureBeat. \u201cWe are calling it 2.0 because we think users will find it a significant new addition to the experience.\u201d<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"h-the-new-compiler-in-pytorch-that-makes-all-the-difference-for-ml\">The new compiler in PyTorch that makes all the difference for ML<\/h2>\n\n\n\n<p>There have been&nbsp;<a href=\"https:\/\/github.com\/pytorch\/pytorch\/issues\/58910\">discussions<\/a>&nbsp;in the past about when the PyTorch project should call a new release 2.0.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">EVENT<\/h3>\n\n\n\n<p>Intelligent Security Summit<\/p>\n\n\n\n<p>Learn the critical role of AI &amp; ML in cybersecurity and industry specific case studies on December 8.&nbsp;<strong>Register for your free pass today<\/strong>.<a href=\"https:\/\/avolio.swapcard.com\/intelligentsecuritysummit2022\/registrations\/Start?utm_source=vb&amp;utm_medium=speedbump&amp;utm_content=Registration&amp;utm_campaign=Speedbump\">Register Now<\/a><\/p>\n\n\n\n<p>In 2021, for example, there was a brief discussion on whether PyTorch 1.10 should be labeled as a 2.0 release. Chintala said that PyTorch 1.10 didn\u2019t have enough fundamental changes from 1.9 to warrant a major number upgrade to 2.0.<\/p>\n\n\n\n<p>The most recent generally available release of PyTorch is version 1.13, which came out at the end of October. A key feature in that release came from an&nbsp;<a href=\"https:\/\/venturebeat.com\/ai\/ibm-research-helps-extend-pytorch-to-enable-open-source-cloud-native-machine-learning\/\">IBM code contribution<\/a>&nbsp;enabling the machine learning framework to work more effectively with commodity ethernet-based networking for large-scale workloads.<\/p>\n\n\n\n<p>Chintala emphasized that now is the right time for PyTorch 2.0 because the project is introducing an additional new paradigm in the PyTorch user experience, called torch.compile, that brings solid speedups to users that weren\u2019t possible in the default eager mode of PyTorch 1.0.<\/p>\n\n\n\n<p>He explained that on about 160 open-source models on which the PyTorch project validated early builds of 2.0, there has been a 43% speedup and they worked reliably with the one-line addition to the codebase.&nbsp;ADVERTISEMENT<\/p>\n\n\n\n<p>\u201cWe expect that with PyTorch 2, people will change the way they use PyTorch day-to-day,\u201d Chintala said.&nbsp;<\/p>\n\n\n\n<p>He said that with PyTorch 2.0, developers will start their experiments with eager mode and, once they get to training their models for long periods, activate compiled mode for additional performance.<\/p>\n\n\n\n<p>\u201cData scientists will be able to do with PyTorch 2.x the same things that they did with 1.x, but they can do them faster and at a larger scale,\u201d Chintala said. \u201cIf your model was training over 5 days, and with 2.x\u2019s compiled mode it now trains in 2.5 days, then you can iterate on more ideas with this added time, or build a bigger model that trains within the same 5 days.\u201d<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"h-more-python-coming-to-pytorch-2-x\">More Python coming to PyTorch 2.x<\/h2>\n\n\n\n<p>PyTorch gets the first part of its name (Py) from the open-source Python programming language that is widely used in data science.ADVERTISEMENT<\/p>\n\n\n\n<p>Modern PyTorch releases, however, haven\u2019t been entirely written in Python \u2014 as parts of the framework are now written in the C++ programming language.<\/p>\n\n\n\n<p>\u201cOver the years, we\u2019ve moved many parts of<a href=\"https:\/\/pytorch.org\/docs\/stable\/nn.html\">&nbsp;torch.nn<\/a>&nbsp;from Python into C++ to squeeze that last-mile performance,\u201d Chintala said.<\/p>\n\n\n\n<p>Chintala said that within the later 2.x series (but not in 2.0), the PyTorch project expects to move code related to torch.nn back into Python. He noted that C++ is typically faster than Python, but the new compiler (torch.compile) ends up being faster than running the equivalent code in C++.&nbsp;<\/p>\n\n\n\n<p>\u201cMoving these parts back to Python improves hackability and lowers the barrier for code contributions,\u201d Chintala said.ADVERTISEMENT<\/p>\n\n\n\n<p>Work on Python 2.0 will be ongoing for the next several months with general availability not expected until March 2023. Alongside the development effort is the transition for PyTorch from being governed and operated by Meta to being its own independent effort.<\/p>\n\n\n\n<p>\u201cIt is early days for the PyTorch Foundation, and you will hear more over a longer time horizon,\u201d Chintala said. \u201cThe foundation is in the process of executing various handoffs and establishing goals.\u201d<\/p>\n\n\n\n<p><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Link: pytorch-2-0-release-accelerates-open-source-machine-learning Publication Date: September 3 rd, 2022 Among the most widely used&nbsp;machine learning (ML)&nbsp;technologies today is the open-source PyTorch framework. PyTorch&nbsp;got its start at Facebook (now known as Meta)&#8230; <a class=\"read-more-link\" href=\"https:\/\/tbekk.com\/devstream\/2022\/12\/03\/pytorch-2-0-release-accelerates-open-source-machine-learning\/\">Read more &raquo;<\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[51,75,19,9],"tags":[141,161],"class_list":["post-702","post","type-post","status-publish","format-standard","hentry","category-article","category-frameworks","category-ml","category-news","tag-pytorch","tag-pytorch-2-0"],"_links":{"self":[{"href":"https:\/\/tbekk.com\/devstream\/wp-json\/wp\/v2\/posts\/702","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/tbekk.com\/devstream\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/tbekk.com\/devstream\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/tbekk.com\/devstream\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/tbekk.com\/devstream\/wp-json\/wp\/v2\/comments?post=702"}],"version-history":[{"count":1,"href":"https:\/\/tbekk.com\/devstream\/wp-json\/wp\/v2\/posts\/702\/revisions"}],"predecessor-version":[{"id":703,"href":"https:\/\/tbekk.com\/devstream\/wp-json\/wp\/v2\/posts\/702\/revisions\/703"}],"wp:attachment":[{"href":"https:\/\/tbekk.com\/devstream\/wp-json\/wp\/v2\/media?parent=702"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/tbekk.com\/devstream\/wp-json\/wp\/v2\/categories?post=702"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/tbekk.com\/devstream\/wp-json\/wp\/v2\/tags?post=702"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}