Please enable JavaScript to use CodeHS

AI literacy

What Is Open-Source AI?Open vs. closed AI models explained

Some AI models are black boxes: you type in, answers come out, and the inside stays secret. Others are glass boxes you can download, run on your own computer, and even change. Here is what is actually inside a model, what "open" really means, and how to think about the trade-offs.

AI literacy ~14 min Middle / High school
Start here

Open-source AI in one minute

Open-source AI means an AI model whose parts are shared with the public, so anyone can use it, look inside it, change it, and pass it on. A closed AI model is the opposite: the company keeps the important parts on its own computers, and you can only use the model through its app or website.

You have probably used both kinds without knowing it. When you chat with an AI in a browser, you are usually talking to a closed model running in a giant data center far away. But thousands of other AI models can be downloaded for free and run on a regular laptop, with no internet connection at all.

So which is better? That is the wrong question. Open and closed models are good at different things, and smart people argue about which one is safer. To follow that argument, you first need to know what a model is actually made of. (New to how chatbots work? What Is an LLM? is a good warm-up.)

The short version: "open" is not a yes-or-no thing. It is a spectrum, from "you can only use the app" all the way to "here is everything, including the data we trained on." Most models people call open sit somewhere in the middle.

Under the hood

What a model is made of

An AI model has three main ingredients. A recipe is a handy way to picture them. Imagine a chef who spent months perfecting a sauce, tasting and adjusting thousands of times.

Spec sheet: one AI model3 parts

Code

= the kitchen and the steps

The program that describes how the model is built, how it learns, and how it runs. It is like the oven, the pans, and the cooking method.

Training data

= the ingredients and taste tests

The huge pile of examples the model learns from, such as text, images, or code. Like ingredients, where it came from matters. (See where AI training data comes from.)

Weights

= the final recipe card

The numbers the model learned during training. They are like the exact amounts on the finished recipe card: "2.5 grams of this, 0.3 of that," but billions of them.

So what are model weights, exactly?

Model weights (also called parameters) are numbers. During training, the computer shows the model an example, checks how wrong its guess was, and nudges every number a tiny bit so the next guess is a little better. After this happens an enormous number of times, the numbers settle into a pattern that "knows" things, like how sentences usually go. You can see this process step by step in How LLMs Are Trained.

Here is the key idea for this whole page: if you have the weights plus the code to run them, you have a working copy of the model. You do not need the training data to use it. You would need the data (and a lot of computer power) to rebuild it from scratch.

Training a big model takes huge amounts of computing power and money. Running a finished one takes far less. That is why sharing the weights is such a big deal: it hands people the expensive part for free.

Black box vs. glass box toy model: 96 weights
Send a prompt:
Input
Weights hidden

They live on the company's servers. You only see what goes in and what comes out.

Output

Pick a prompt, then try the buttons in both modes.

This toy has 96 weights. A real language model has billions, which is why its weight files can be many gigabytes. But the idea is the same: the numbers are the model. Changing them, which is called fine-tuning, changes how it behaves.

Not yes or no

The openness spectrum

Back to the recipe. A restaurant lets you order the dish, but the recipe stays in the kitchen. Some restaurants also sell you meal kits, so you can use their food in your own setting, but you still never see the recipe. Some chefs publish the final recipe card so you can cook it at home and tweak it. A few go all the way and publish the whole cookbook: the recipe, where every ingredient came from, and their test-kitchen notes.

AI models line up the same way. Slide through the levels to see what you can see and change at each one.

Openness spectrum level 1 of 4

    You can

      You can't

        The four levels

        • App only (closed). You use the model through a chat app or website. The company controls everything: features, rules, updates, and price.
        • API access (still closed). An API (application programming interface) lets programmers send requests to the model from their own code and get answers back. That is how many apps add AI features. You can build with it, but the weights never leave the company.
        • Open weights. The company posts the weights for anyone to download. You can run the model yourself, inspect it, and fine-tune it. Usually the full training data and training code are not shared. These are called open-weight models.
        • Fully open. The weights, the training code, and the training data (or a detailed description of it) are all public. In principle, a well-funded team could rebuild the model from scratch and check every step. Fewer models are this open, and many of them come from universities and research groups.

        The debate: what counts as "open source"?

        For regular software, "open source" has a clear meaning that has been around since the late 1990s: the source code is public and anyone may use, study, change, and share it. AI is messier, because a model is more than code.

        Many companies call their open-weight models "open source." Critics say that is misleading. Without the training data and training code, you cannot fully study how the model was made or rebuild it, which is the whole point of open source. In 2024 the Open Source Initiative, the group that keeps the classic definition of open-source software, published a definition for AI. It says an open-source AI system should share its weights, its code, and enough detail about its training data that a skilled person could build something substantially similar.

        Not everyone agrees with that line. Some people say a truly open model must share the actual data, not just a description. Others point out that sharing the data is often impossible because it contains copyrighted work or private information. That is why many writers use the more precise term "open-weight" when only the weights are shared. It is a good habit for you, too.

        Local vs. cloud

        Your computer vs. the cloud

        One of the coolest things about open-weight models is that you can run them locally, which means on your own device instead of on someone else's computer. Free apps let you download a small model and chat with it, even with Wi-Fi turned off. But the giant models in the cloud are usually smarter. Here is the trade.

        Small model on your computer

        • Private. Your words never leave your device.
        • Works offline. No internet needed after the download.
        • No per-use cost. You pay with electricity and your own hardware.
        • Yours to keep. It won't change or disappear unless you change it.
        • Less capable. Small models make more mistakes, especially on hard problems.
        • Needs memory. Bigger models need lots of RAM or a strong graphics chip, and can be slow.
        • You're in charge. Fewer built-in safety filters, and no one updates it for you.

        Big model in the cloud

        • Most capable. Runs on huge data-center computers your laptop can't match.
        • Easy. Open an app and go. Nothing to install.
        • Maintained. The company fixes problems and adds safety features.
        • Your words travel. What you type goes to the company's servers and may be stored.
        • Needs internet. No connection, no AI.
        • Their rules. Prices, limits, and features can change at any time.

        Privacy tip: even with a cloud chatbot, you can protect yourself by never sharing personal details like your full name, address, school, or passwords. Read What Happens to What You Tell a Chatbot? to learn where your words go. And always ask a parent, guardian, or teacher before installing AI software.

        One more thing: a local model is not automatically more accurate. Every AI model can confidently make things up. Running it yourself changes who sees your data, not whether the answers are true.

        Fair arguments, both sides

        The big debate: open vs. closed

        Researchers, companies, and governments disagree, sometimes strongly, about whether powerful models should be open. Neither side is simply right. Here are the strongest arguments each way, topic by topic. Try to explain both sides out loud before picking one.

        Safety and misuse

        Pro-open view

        Bad actors can misuse closed models too, by tricking them with clever prompts. Keeping models closed gives a false sense of safety, and open models let defenders build protections and test them in the open.

        Pro-closed view

        Once weights are posted, they can never be taken back. Researchers have shown that safety training can often be weakened by fine-tuning. A company running a closed model can watch for misuse and cut off bad users.

        Transparency and research

        Pro-open view

        Scientists can study an open model's insides to find bias, test claims, and understand how AI works. "Trust us" is not science. Students can learn on real models instead of just reading about them.

        Pro-closed view

        Closed labs can still share research and let outside experts test their models before release. Careful, controlled access can give researchers what they need without handing everyone the full model.

        Competition and power

        Pro-open view

        If only a few huge companies control the best AI, they get enormous power over prices and rules. Open models let small companies, schools, and countries build their own tools.

        Pro-closed view

        Training top models costs a fortune. Companies need a way to earn money back to keep improving and to pay for safety work. Selling access to a closed model is one way to do that.

        Privacy and control

        Pro-open view

        Hospitals, schools, and families can run a model on their own machines, so sensitive information never leaves the building.

        Pro-closed view

        Big providers can afford strong security teams. A model running on a poorly secured home or office computer is not automatically safer.

        Many experts land somewhere in the middle: share most models openly, but take extra care, with testing and staged releases, for the most powerful ones. The deeper question of how to make any AI behave the way people intend is covered in AI Safety and Alignment.

        The fine print

        Licenses in plain words

        "You can download it" is not the same as "you can do anything with it." Every model comes with a license, a set of rules from the creator about how it may be used. Think of it like the rules printed on a borrowed library book. The license lives in a file next to the weights, and it is worth reading.

        Permissive

        Use it for almost anything, including in a business, as long as you keep the credit notice. Common software licenses like MIT and Apache 2.0 work this way, and some models use them.

        Open with rules

        Free to download and use, but with conditions. A model might ban certain harmful uses, require very large companies to ask permission, or forbid using its answers to train a rival model.

        Research or limited

        You can study or test it, but you can't use it in a product or business. Some require you to sign up or agree to terms before downloading.

        Licenses are one more reason people argue about the word "open." A model with strict rules about who may use it is not open source in the traditional sense, even if anyone can download it.

        Three questions to ask about any license: Can I use it for a project I share or sell? Are there uses it forbids? Do I have to credit the creator?

        Put it together

        Which model fits?

        There is no single best model. The right choice depends on what you need. Pick the things that matter most for your situation and see how four common setups compare.

        Model chooser pick your needs

        Pick at least one need to see which setup fits best.

        Questions to ask before you pick

        • What will I share with it? Anything private points toward a local model or a provider whose privacy rules you have read.
        • How hard is the task? Writing a quick poem is easy for a small model. Solving a tough multi-step problem may need a big one.
        • Where will I use it? No reliable internet means you need something that runs locally.
        • What does the license allow? Especially if you plan to build and share an app.
        • What do my school's or family's rules say? Many AI services have age limits, and those rules come first.

        Being able to weigh choices like these is a big part of AI literacy: understanding AI well enough to use it wisely, not just use it.


        Glossary

        Key terms

        AI model
        A program that has learned patterns from data so it can make predictions or generate things like text and images.
        Weights (parameters)
        The numbers a model learns during training. Together they decide how it responds.
        Training data
        The examples a model learns from, such as text, pictures, or code.
        Training
        The process of adjusting a model's weights again and again until its guesses get good.
        Closed model
        A model whose weights stay private. You use it only through the company's app or API.
        Open-weight model
        A model whose weights anyone can download and run, often without the training data.
        Fully open model
        A model that shares its weights, code, and training data or detailed data information.
        API
        A way for one program to send requests to another, like an app asking an AI model for an answer.
        Running locally
        Using a model on your own device instead of on a company's servers.
        Fine-tuning
        Training an existing model a little more on new examples to change or specialize its behavior.
        License
        The rules from a model's creator about how you may use, change, and share it.
        Open source
        Sharing something so anyone may use, study, change, and pass it on. For AI, people still debate exactly what that requires.

        FAQ

        Quick answers

        What is open-source AI?

        Open-source AI is an AI model whose parts are shared publicly so anyone can use, study, change, and share it. At minimum that usually means the model weights, the learned numbers that make the model work. A fully open model also shares the code used to train it and detailed information about, or a copy of, its training data.

        What are model weights?

        Model weights are the numbers an AI model learns during training. A large language model has billions of them. Together they decide how the model turns your input into an answer. If you have the weights and the code to run them, you have a working copy of the model.

        What is an open-weight model?

        An open-weight model is one whose weights you can download and run yourself, on your own computer or a server you choose. The company usually does not share its full training data or every piece of training code, which is why many people say open-weight is not the same as fully open source.

        What is the difference between open and closed AI models?

        With a closed AI model, the weights stay on the company's computers. You use it through an app or an API, and the company controls updates, rules, and price. With an open-weight model, you can download the weights, run the model offline, inspect it, and fine-tune it, but you also take on the job of running it safely.

        Is open-source AI safe?

        It depends on the model and how it is used, and experts disagree. Open models let many researchers check for problems and keep your data on your own device. But once weights are posted they cannot be taken back, and safety training can be weakened by people who fine-tune the model. Closed models let a company watch for misuse, but outsiders cannot inspect them.

        Can I run an AI model on my own computer?

        Yes. Many smaller open-weight models run on an ordinary laptop or desktop using free apps, with no internet needed after the download. Smaller models are usually less capable than the biggest cloud models, and bigger models need a lot of memory. Always ask a parent, guardian, or teacher before installing software.


        Check yourself

        Quick quiz

        1. In the recipe analogy, what are a model's weights most like?

        2. A company lets anyone download its model's weights but keeps its training data private. What is the most precise name for this?

        3. Maya wants an AI to help with her diary-style journal, and she doesn't want her words leaving her laptop. What fits best?

        4. Which is a fair argument people make for keeping powerful models closed?

        Keep learning

        Keep learning

        Go from using AI to understanding it

        Knowing what's inside a model is the first step to building one. CodeHS courses teach the programming, data, and machine learning ideas behind modern AI, from your first line of code to training your own models.

        Part of the AI Literacy Skills tutorial series.