Why PyTorch Won

By The New Stack

Share:

Key Concepts

  • PyTorch: A Python library for building and training neural networks, known for its ease of use, Pythonic nature, and GPU acceleration capabilities.
  • PyTorch Foundation: An initiative to foster a vendor-neutral ecosystem around foundational AI projects.
  • Technical Advisory Committee (TAC): A council within the PyTorch Foundation providing technical guidance.
  • Hosted Projects: Projects that have transferred intellectual property and assets to the Linux Foundation for management under the PyTorch Foundation.
  • Ecosystem Projects: Projects that build upon or are related to foundational PyTorch projects, meeting specific criteria for inclusion.
  • VLLM: An inference framework for Large Language Models (LLMs) and Vision Language Models (VLMs), now a hosted project of the PyTorch Foundation.
  • DeepSpeed: A library for optimizing large-scale deep learning training, originally from Microsoft and now a hosted project.
  • Ray: A framework for distributed computing and orchestrating computations across different locations, now joining the PyTorch Foundation.
  • Reinforcement Learning (RL): A type of machine learning where an agent learns to make decisions by receiving rewards or penalties for its actions.
  • Large Language Models (LLMs): AI models trained on vast amounts of text data, capable of understanding and generating human-like text.
  • Miniaturization (in AI): The concept of making AI models smaller, more efficient, and less resource-intensive for wider accessibility.
  • Intelligence Per Watt: A metric for the efficiency of AI models in terms of computational power consumed per unit of intelligence or task completion.

PyTorch Foundation and its Ecosystem

Introduction to PyTorch and its Role

PyTorch is described as a Python library that simplifies the process of running programs requiring automatic optimization, fast GPU execution, and extensive computation. Its core functionality lies in enabling neural networks to compute outcomes (errors) and then minimize these errors by adjusting parameters. A key differentiator for PyTorch, especially in its early days, was its "researcher-friendly" and "Pythonic" approach, which contrasted with other frameworks that often required coding in a meta-language, making debugging more challenging. This ease of use and iteration speed brought the power of neural networks and backpropagation to the Python ecosystem.

The Evolution of the PyTorch Ecosystem

The PyTorch ecosystem has evolved significantly. Initially focused on computer vision, it has become integral to various AI revolutions, including the rise of large language models. While other frameworks like JAX exist, PyTorch has established a strong industry presence. A notable development is the increasing use of PyTorch for inference, not just training. Frameworks like VLLM and TensorRT-LLM, which are popular for inference, now run on PyTorch. This means that many chatbots and AI applications encountered daily likely utilize PyTorch under the hood, even in production environments.

The PyTorch Foundation: Mission and Structure

The PyTorch Foundation, established a few years ago with the initiative to host projects dating back only a few months, aims to create a vendor-neutral space for foundational AI technologies. This allows companies and individuals to contribute to these projects without concerns about licensing changes or vendor lock-in.

The foundation has two main components:

  1. Hosted Projects: These are projects that have transferred their intellectual property and assets to the Linux Foundation for management. This ensures a neutral governance model. VLLM and DeepSpeed are examples of hosted projects.
  2. Ecosystem Projects: These are projects that build upon or are related to the foundational PyTorch projects. They undergo a review process to ensure they meet certain criteria, focusing on user experience, documentation, and support for PyTorch versions. The goal is to foster a thriving community of developers and users.

Current Hosted Projects

As of the recording, the PyTorch Foundation hosts four projects:

  • PyTorch: The core library itself.
  • VLLM: An inference engine for LLMs and VLMs, known for its efficiency.
  • DeepSpeed: A library developed by Microsoft for large-scale distributed training, focusing on techniques like parameter sharding for efficient scaling across GPUs and machines.
  • Ray: A framework for distributed computing and orchestrating computations, particularly useful for complex workloads beyond single training jobs, such as reinforcement learning. Ray's primitives are general-purpose and can be used for any Python workload, including massive data processing.

The Significance of Vendor Neutrality

The move of projects like VLLM into the PyTorch Foundation under the Linux Foundation is highlighted as a crucial step. It provides a neutral ground where more companies can contribute without the "unease feeling" of potential license changes or vendor control. This fosters a more collaborative environment where everyone can benefit from the advancements and contribute to elevating the playing field.

Emerging Trends and Future Directions

The Rise of LLM-Based Agents and Reinforcement Learning

A significant trend discussed is the convergence of LLMs and Reinforcement Learning (RL) to create intelligent agents. While RL has been around for a long time, its application to complex environments with sparse rewards was challenging. LLMs, with their pre-existing understanding of the world, provide a strong initial policy for RL agents, making the learning process more efficient and less prone to starting from scratch. This allows for a greater focus on building robust agent systems rather than solely on fundamental learning algorithms.

The Challenge of Miniaturization and Efficiency

A key challenge and area of passion for the speaker is the "miniaturization" of AI models. This refers to making models smaller, more efficient, and less energy-intensive, enabling wider accessibility. The current paradigm of large-scale training is contrasted with the human brain's efficiency. The speaker expresses a desire for AI models that can ingest knowledge more effectively and efficiently, similar to how humans learn, rather than relying on massive datasets and computational power. This "intelligence per watt" problem is considered of paramount importance.

Interaction with Linux AI/ML Foundation

The relationship between the PyTorch Foundation and the broader AI/ML initiatives within the Linux Foundation is seen as complementary. The PyTorch Foundation focuses on foundational projects for developers and builders, while the AI/ML part of the Linux Foundation might encompass a broader range of layers, from applications to perception and communication. The speaker perceives no evident overlap currently, with the PyTorch Foundation maintaining a focused approach.

Personal Insights and Future Outlook

Personal Focus and Lightning AI

The speaker, Luca, is the CTO of Lightning AI, a company that provides a development platform for training and inference, with a strong focus on PyTorch. Their work involves optimizing compute usage for customers, ensuring they get the most out of their resources. This optimization spans various levels, from kernel-level to data loading and model architecture.

The PyTorch Conference Experience

The speaker reflects positively on the PyTorch Conference, noting its significant growth since 2018. The event is described as a gathering of welcoming and passionate individuals who have contributed to building PyTorch, fostering a strong sense of community. The record attendance of 3,333 registered participants underscores the event's success.

Key Takeaways

The PyTorch Foundation is strategically positioning itself as a steward of essential AI infrastructure, fostering a vendor-neutral ecosystem for foundational projects like PyTorch, VLLM, DeepSpeed, and Ray. The increasing integration of PyTorch into inference, the rise of LLM-powered agents, and the critical need for model miniaturization and efficiency are key trends shaping the future of AI development. The foundation's dual approach of hosting core projects and nurturing an ecosystem of related tools aims to empower developers and users, driving innovation in a collaborative and accessible manner.

Chat with this Video

AI-Powered

Hi! I can answer questions about this video "Why PyTorch Won". What would you like to know?

Chat is based on the transcript of this video and may not be 100% accurate.

Related Videos

Ready to summarize another video?

Summarize YouTube Video