Shopping and sourcing open source AI models – where do you find them: Hugging Face

Jon AI Document Generator
by Stélio Inácio, Founder at Jon AI and AI Specialist

The Grand Library of AI: Finding Models on Hugging Face

In our last lessons, we talked about the "how" of running open-source AI—either on your own computer or in the cloud. Now we need to answer the "what" and the "where." If open-source AI is a world of ingredients, where do you go shopping? The answer, overwhelmingly, is Hugging Face.

Think of Hugging Face as the giant, bustling, public library for the entire AI community. It's a central hub where researchers, companies, and hobbyists from all over the world share their work. It's not just a place to download models; it's a collaborative ecosystem where you can find the datasets the models were trained on, and even try them out live in your browser.

If you want to find an open-source model for virtually any task—from generating text to creating images or analyzing audio—Hugging Face is the first place you should look.

Navigating the Library: What's Inside Hugging Face?

When you visit the Hugging Face website, you'll find a few key sections that are the pillars of the community:

  • Models: This is the main attraction. It's a searchable collection of hundreds of thousands of AI models. You can filter them by task (like text generation or translation), language, size, and more.
  • Datasets: An AI model is only as good as the data it's trained on. This section contains a vast collection of the datasets used to train many of the models on the platform, which is crucial for transparency and research.
  • Spaces: These are like live demos. "Spaces" are applications built by the community to showcase what the AI models can do. It's a great way to see models in action and play with them in a more user-friendly interface.
  • Docs: The documentation section contains all the guides and tutorials you need to learn how to use the models and tools available on the platform.

How to Find the Right Model for You

With so many options, "shopping" for a model can seem daunting. Here’s a simple process to follow.

  1. Start with a Task: Go to the Models section of the site. On the left-hand side, you'll see a list of "Tasks." Start by clicking the one you're interested in. For example, if you want a chatbot, click "Text Generation."
  2. Filter and Sort: After selecting a task, you can further refine your search. You can filter by language, license (e.g., to find models that are free for commercial use), and more. A common practice is to sort the results by "Most Downloads" to see which models are the most popular and widely used.
  3. Read the Model Card: When you click on a model, you'll be taken to its "Model Card." This is the most important step. Don't just download a model blindly; read its card to understand what it is and how to use it responsibly.

Concept Spotlight: The Model Card

A "Model Card" is like a nutrition label and instruction manual for an AI model. It's a crucial document that promotes transparency and responsible AI use. A good model card will tell you:

  • Model Description: What the model is and what it was designed to do.
  • Intended Uses & Limitations: How you should (and should not) use the model. This section often discusses potential risks and biases.
  • How to Use: Code snippets and instructions on how to get the model running.
  • Training Data: Information about the data used to train the model, which helps you understand its potential biases and knowledge base.

Reading the model card is the most important part of "sourcing" a model. It helps you evaluate if a model is suitable, safe, and effective for your specific needs.

Try This Now: Test Drive an AI Model

You can try many models directly in your browser without installing anything! Let's try a popular one.

  1. Go to the Hugging Face model page for Meta-Llama-3-8B-Instruct.
  2. Scroll down on the right-hand side until you see the "Hosted inference API" section.
  3. Type a prompt into the text box, like "Write a short poem about planet Earth," and click "Compute."

You'll see the AI generate a response right on the page. You are now interacting directly with a powerful open-source model!

Quick Check

What is the most important document to read when evaluating an AI model on Hugging Face to understand its purpose, limitations, and potential biases?

Recap: Shopping for AI on Hugging Face

What we covered:
  • Hugging Face is the central public library for the open-source AI community.
  • How to navigate its key sections: Models, Datasets, and Spaces.
  • A step-by-step process for finding a model by filtering for a specific task.
  • The critical importance of reading the "Model Card" to understand a model's capabilities and limitations before using it.

Why it matters:
  • Knowing how to find and evaluate open-source models empowers you to move beyond just using proprietary tools. It opens up a world of customization and allows you to select the perfect AI for any project, with a clear understanding of how it works.

Next up:
  • With so many models available, how do you know which one is the "best"? We'll look at AI model rankings and where to go to see how different models stack up against each other.