DEV Community

Cover image for Closed, open-source, and open-weight AI models: What’s the difference and what should I use?
Michelle Duke
Michelle Duke

Posted on

Closed, open-source, and open-weight AI models: What’s the difference and what should I use?

Off the back of Hacktoberfest—which focused on building with open-source and open-weight AI models—I wanted to highlight the differences between these two distinct ways of working with AI models. Some people might think they are interchangeable words, and you'll often see them used that way online, but there are some key differences.

When you're deciding which AI model to use for your next hackathon project, side hustle, or work app, knowing what "open" means can save you a lot of headaches later on. Let's break down what both terms mean, how they compare, and how to pick the right one for what you're building.

First, how does an AI model actually work?

Before we dive into "open-weight" versus "open-source," it helps to understand how an AI model works in the first place. Think of of building an AI model like baking a cake 🍰 from scratch:

  • The Ingredients (Training Data): Massive collections of text, code, images, or audio that the AI reads and learns patterns from. This is where the term "Large Language Model" (LLM) comes from.
  • The Recipe & Kitchen Equipment (Training Code & Architecture): The software code, scripts, and setup instructions used to feed ingredients into the system and teach it how to learn.
  • The Finished Cake (Model Weights): After days or months of training on massive computers, the model ends up with billions of numerical settings. These are called weights (or parameters). These numbers represent everything the model learned. When you ask an AI a question, it uses these weights to predict the best answer.

With the cake 🍰 analogy in mind, let's look at the different ways companies share their AI models with developers.

AI baking

What is a closed (proprietary) AI model?

To understand what makes a model "open," let's break down what a "closed" model is. These closed (or proprietary) models are those that the company keeps everything behind locked doors. You don't see the ingredients, nor recipe, and you don't even get to take the cake home. Instead, you visit their bakery and buy a slice of the specific cake you want.

In developer terms, this means you interact with the model through a website or an API (Application Programming Interface), which is a bridge that lets your app send a question to the company's servers and get an answer back.

Some examples of closed models include OpenAI's GPT models, Anthropic's Claude, and Google's Gemini.

Since you can't download these models to our own laptop, you can't see how it was built, and you have to send your data to someone else's servers to use it; in the same way that "closed" software doesn't just let you look at the code and how you built it.

Digital bakery

What is an open-weight AI model?

An open-weight model on the other hand, is when a company publishes the learned numerical settings—the weights—online so anyone can download them.

Using the above cake 🍰 analogy, you can purchase the finished cake. You can take it home, slice it up, add your own frosting on top, and serve it at your own party. However, the baker didn't give you the exact recipe they used to bake it, nor did they give you the list of ingredients they bought at the store.

When a model is open-weight, you can download the model files (often from platforms like Hugging Face) and run them on your own computer or private cloud server using tools like Ollama or LM Studio. Because you can run the model offline, you can keep all your user data private on your own hardware, and fine-tune the model (train it a little extra on your own specific data, like adding your own frosting) to what you want.

Terminal output from Ollama running locally

What you can't do however is see the exact training data it learned from, inspect the full code used to train it from scratch, or easily recreate the exact same model yourself.

Some examples of open-weight models include Meta's Llama series, Google's Gemma, DeepSeek, and Qwen.

Even though people casually call these models "open source" all the time, they are technically open-weight because the ingredients and recipe are missing.

What is an open-source AI model?

True open-source AI goes all the way back to the core values of traditional open-source software. According to the Open Source Initiative (OSI)—the stewards of the official open source definition—an AI system is only truly open source if you have the freedom to use, study, modify, and share it without restrictions.

"An Open Source AI is an AI system made available under terms and in a way that grant the freedoms to: Use the system for any purpose... Study how the system works... Modify the system... Share the system for others to use"
— The Open Source Initiative (OSI), Open Source AI Definition 1.0

To be able to study and recreate an AI model, having just the weights isn't enough. Going back to our cake: you get the finished cake, the exact recipe, AND the full shopping list of ingredients.

For an AI model to be truly open source, the creators must release:

  • The Model Weights: The trained parameters so you can run it
  • The Complete Source Code: Everything used to process data, train the model, and run it, under an OSI-approved license (like Apache 2.0 or MIT)
  • Training Data Information: Either the actual datasets used to train the model, or detailed documentation explaining exactly what data was used and where developers can get it

Some examples of open-weight models include Ai2's OLMo (Open Language Model), SmolLM, or Open-R1 community reproductions.

open source cake

Closed vs. Open-Weight vs. Open-Source

If you want a quick cheat sheet to reference while building your next project, here is how they stack up:

Feature Closed / Proprietary Open-Weight Open-Source AI
Download & run locally? No (API/Cloud only) Yes Yes
Fine-tune on your data? Sometimes (via vendor) Yes Yes
Model weights included? No Yes Yes
Training code included? No Usually no (or partial) Yes
Training data / details? No No (or very limited) Yes
Check the license? Vendor Terms of Service Varies (read carefully!) OSI-approved license

🍰 Click here for a quick cake analogy Cheat Sheet
  • Closed AI: Buying a slice at the bakery (API only)
  • Open-Weight AI: Taking the whole cake home to add your own frosting (weights included, no recipe)
  • Open-Source AI: Getting the cake, the exact recipe, and the full grocery list (weights + training code + data info)

Why does the license still matter?

Here is a trap that can catch developers off guard: "open" does not always mean "do whatever you want with it".

Whether you are using an open-weight or open-source model, always check the license attached to it before you launch a product.

Some models use permissive licenses like Apache 2.0 or MIT, which basically say, "Go ahead, use this for personal projects, hackathons, or commercial startups, just don't sue us".

"THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE."
— The Open Source Initiative (OSI), The MIT License

Other open-weight models use custom licenses written by the company that made them. These might restrict how you use the model if your app suddenly gets millions of users, or prevent you from using the model's outputs to train another competing AI.

Taking two minutes to read the license on the model's repository page will save you from accidental legal headaches if your hackathon project turns into a real business!

Which one should you use for your project?

Neither option is automatically "better". It all comes down to what you're building and what you care about most. For example:

  • Choose a closed model (via API) if: You want the absolute smartest, most capable model right out of the box without worrying about buying expensive graphics cards (GPUs) or managing servers
  • Choose an open-weight model if: You want to run AI locally on your machine, keep sensitive data completely private, avoid paying per-token API fees, or you want to customise a strong model for a specific task
  • Choose a true open-source AI model if: You are doing research, building tools where transparency and auditing matter (such as healthcare, education, or public sector apps), or you want to learn how AI models are built and trained from the ground up.

You can also check out my short Instagram reel on open-source vs. open-weight AI models:

Go build something cool 😎

Now you know the difference between closed, open-weight, and open-source AI models, and also why they aren't quite the same thing.

Which models have you been experimenting with lately, and are you running them locally or via the cloud?
Drop a comment below and let me know what you're building. Happy hacking 💖.

Top comments (0)