Module 6 Lesson 2: Model Types and Licenses
Know your rights. A guide to AI licenses (MIT, Apache, Llama) and what they mean for your business.
AI Licenses: Can You Use That Model?
Because you are running models locally via Ollama, it's easy to feel like "everything is free." However, every model comes with a legal agreement. If you are building a commercial application, you must understand the difference between Open Source, Open Weights, and Proprietary-Open.
1. The "Big Three" Licenses
Apache 2.0 / MIT
- Examples:
Mistral 7B,Falcon,Phi-3. - Meaning: These are the "True" open-source licenses. You can use them for commercial projects, modify them, and even sell services based on them without paying anyone.
- Verdict: The safest choice for businesses.
The "Llama 3" License (Meta)
- Examples:
Llama 3,Code Llama. - Meaning: Free for almost everyone. However, if your company makes more than $700 Million/month (e.g., Apple or Google), you have to pay Meta for a license.
- Verdict: Safe for 99.9% of the world.
The "Gemma" License (Google)
- Examples:
Gemma 2. - Meaning: Similar to Llama. Free for commercial and research use, but includes some "Safety" restrictions (e.g., you can't use it to build weapons or for certain harmful activities).
2. "Open Source" vs. "Open Weights"
This is a technical distinction that matters to lawyers:
- Open Source: You have the code used to train the model, the data list, and the weights.
- Open Weights: You only have the final "Brain" (the weights). You don't know exactly what books or websites the AI read to get that smart.
Most models in Ollama are Open Weights.
3. License Metadata in Ollama
Ollama makes it easy to check the license of what you are running.
Run: ollama show [model] --license
It will output the full text of the legal agreement associated with that specific model file.
4. Why This Matters for Hugging Face
When you download a random model from Hugging Face, check the "License" tag on the repository.
- Some researchers release models for "Research Use Only" (non-commercial).
- If you use one of these to build a paid SaaS product, you could face legal consequences.
Summary Checklist
- Commercial Project? Stick to Apache 2.0 or official Llama/Gemma licenses.
- Enterprise? Ensure you don't cross the Meta $700M revenue threshold.
- Always Check: Run
ollama show --licenseon every new model you pull.
Key Takeaways
- Apache 2.0 is the gold standard for full commercial freedom.
- Llama/Gemma are free but have revenue-based or usage-based restrictions.
- Always verify the License field on Hugging Face before downloading experimental models.
- Local AI doesn't mean "Lawless AI"—respect the work of the researchers!