Lessons from Building Open Source Libraries

Thomas Wolf, co-founder of Hugging Face, discusses his journey from physics to AI, the power of open-source models to accelerate innovation, the practical challenges of productionalizing AI demos, and why the biggest opportunities for founders now lie in the application layer on top of powerful foundation models.

4 min read
Lessons from Building Open Source Libraries
source: https://www.youtube.com/watch?v=6g8qRhCI8AU

Thomas Wolf, co-founder and Chief Science Officer of Hugging Face, has a unique background that shaped the company’s open-source ethos. His journey through physics taught him to go deep into topics, while his time as a lawyer instilled the importance of valuing one’s time. Hugging Face itself was born almost by accident, pivoting from a game company to a platform built around a viral open-source deep learning library. This evolution led to a core mission: fostering a collaborative, win-win ecosystem through open science and open source, where the distribution of power acts as a catalyst for the entire community.

The Power of Open Source in AI

Wolf argues that open source is one of the most significant contributions of computer science. Its collaborative nature is a fundamental accelerator for AI research and development.

  • Accelerated Progress: When models and code are open, researchers can build upon existing work—tweaking, experimenting, and improving—rather than reinventing the wheel every time. This iterative process is crucial for rapid advancement.
  • Creative Exploration: Open models serve as powerful starting points for applications the original creators never envisioned. By providing access to the underlying architecture, developers can fine-tune models for specific domains or add new modalities, such as interactivity to an image model.
  • Overcoming Limitations: Closed models, like ChatGPT, confine users to the intended application. If a use case falls outside the training domain, the model often fails. Open models provide the necessary access to “tweak it,” making them vital for true entrepreneurial and technical creativity.

From Demo to Production: The Reality for Startups

A common challenge for founders is the significant gap between a compelling AI demo and a robust, production-ready product. This hurdle exists for both open and closed models.

“There is no super shortcut from demo to production. It’s still a painful process. But… part of the moat and the knowledge and what you’re building is also the pain. Once you made it work, you actually solved something non-trivial, and that’s where your company value lies.”

Most companies must build significant “scaffolding” around a model, which involves pre-processing data, handling edge cases, and applying specific domain knowledge. The key difference lies in the tools available:

  • Closed Models: Primarily rely on building this external scaffolding.
  • Open Models: Offer the powerful option to fine-tune or even continue training the model. While this is a non-trivial operation requiring resource allocation, it’s essential when the core desired feature doesn’t exist in the base model.

Designing Widely-Used Developer Tools

Drawing from his experience creating the transformers library, Wolf emphasizes that building great open-source tools is a product design challenge. The key is to obsess over the developer experience.

  1. The Onboarding Experience: A developer’s first interaction with a library should be as seamless and intuitive as unboxing a new Apple product. The goal is to minimize the number of new abstractions a user must learn and shorten the distance to a “wow” moment. Wolf stresses that users don’t want to read documentation, so the tool should be self-evident.
  2. The Level of Abstraction: Finding the right balance between ease of use, user control, and complexity is an art. A great library is “extremely design opinionated” and hits a sweet spot of flexibility and intuitiveness, which can only be found through extensive testing across diverse use cases.

The Future: Open Models and the Application Layer

Wolf is confident that open-source models are rapidly approaching, and in some cases matching, the capabilities of their closed-source counterparts. As the performance of foundation models begins to converge, the primary arena for innovation and value creation will shift.

The most significant opportunities for founders will be in the application and interaction layer. While foundation model labs are also building products, startups can compete effectively by focusing on creating novel user interfaces and applications on top of powerful base models without the massive overhead of training them from scratch. This is where the next wave of billion-dollar companies in AI will be built.

Share post

Stay In The Loop! Subscribe to Our Newsletter.

Get updates straight to your inbox. No spam, just useful content.

Recommended for You

The Little Tech Agenda for AI

The Little Tech Agenda for AI

Matt Perault and Colin McCune from a16z discuss the "Little Tech Agenda," advocating for AI policies that support startups. They argue for regulating the harmful use of AI, not its development, to foster competition and innovation while ensuring the U.S. maintains its global leadership against rivals like China.

Graph Neural Networks Just Solved Enterprise AI?

Graph Neural Networks Just Solved Enterprise AI?

Jure Leskovec introduces Relational Foundation Models (RFMs), a new class of models based on graph neural networks that learn directly from raw, multi-table enterprise data. This approach bypasses manual feature engineering, leading to more accurate, faster-to-deploy, and easier-to-maintain predictive models for tasks like churn prediction, fraud detection, and recommendation systems.