Licenses used for AI model weights

Andrew Marble
marble.onl
andrew@willows.ai
July 21, 2023

AI model weights are the parameters that define how an AI model calculates its output. There is not a clear consensus about how they should be treated with respect to copyright and licensing. But there are already thousands of extant models that have been released under various licenses, mostly those that have been used with software and data.

Below is a table of the licenses that have been applied to large language models weights (specifically text generation models) on Hugging Face model hub1 a popular public repository for sharing models.

The data comes from the HFApi python API and is from the morning of July 21, 2023. The license is based on the “license” tag for each shared model repository and set to “unspecified” when no tag is found. I summarized the data to look at what kinds of licenses are most popular, and to what extent copyleft is being employed. The data is skewed by popularity of models because most of these are derivatives or variants. If we really wanted to know what licenses were most popular when releasing a new model we’d have to separate originals from fine-tuned versions.

The majority of models don’t have a license specified. I think this is because it’s a public model hub that anyone can upload to and many are using it as storage or for experiments rather than releasing models with complete information. I sampled the ones that did not have licenses attached and what I saw looked mostly like junk – as in someone had uploaded weights but not documented anything.

Of the 4,789 models where a license is specified, 4,029 are open source by the accepted definition (for software). Of the non-open source licenses, 471 are variations of RAIL, a license that restricts how the model can be used. (I should note there is also an “other” category not included in the breakdown but containing many Facebook OPT licenses that have similar restrictions). The other non-open models are mainly versions of Creative Commons licenses with commercial restrictions.

Copyleft (open source licenses that require sharing of all derivative works under similar licenses) clauses are present in only 228 of the licenses. Copyleft has been a powerful force in keeping software open (for example keeping Linux as a viable open source operating system). I believe it can be used as a strategic option in keeping AI open as well2. There is some uptake currently, although the 228 licenses represent only about 5% of the total. I’ll speculate a bit to say that I’d guess awareness of copyleft as a strategic choice is still low, and current licenses designed for software would need to be modified to provide clarity about how they apply to model weights.

A small overall number are released under licenses that opt out of any copyright and have no restrictions, such as wtfpl, unlicensed, and CC0.

A total of 436 models are Creative Commons licensed – some of these are open source while others have incompatible restrictions. Interestingly, Creative Commons more popular as an artistic license and not recommended for software due to lack of specific terms about source code and incompatibility with other software licenses3. They are however recommended for databases. One model in the list is released under pddl, another data license, although its documentation isn’t complete. There is an ongoing discussion about how licenses apply to model weights and not a clear consensus on how they should be licensed4, so it is interesting to see some people choosing database licenses over software licenses, though the majority still defaults this way.

License Count Notes Open Source Copy left
unspecified 12884 Tag added when no license tag was present in the repo
mit 1819 Standard open source: https://opensource.org/license/mit/ x
apache-2.0 1807 Standard open source: https://www.apache.org/licenses/LICENSE-2.0 x
other 833 Includes many variations of OPT models (created by Facebook). Example license (non-open source): https://huggingface.co/facebook/opt-6.7b/blob/main/LICENSE.md
openrail 163 Non open-source license with use restrictions essentially imposing the world view of the creator on downstream users: https://www.licenses.ai/blog/2022/8/18/naming-convention-of-responsible-ai-licenses
bigscience-bloom-rail-1.0 149 Non open-source license with use restrictions, a variant of openrail
cc-by-nc-4.0 126 Non-commercia (and so not open source): https://creativecommons.org/licenses/by-nc/4.0/
cc-by-nc-sa-4.0 97 Non-commercial copyleft-style: https://creativecommons.org/licenses/by-nc-sa/4.0/
cc-by-sa-4.0 69 Copyleft style open source: https://creativecommons.org/licenses/by-sa/4.0/
Note that cc licenses are not recommended for source code: https://opensource.stackexchange.com/questions/1717/why-is-cc-by-sa-discouraged-for-code
https://creativecommons.org/faq/#can-i-apply-a-creative-commons-license-to-software
x x
creativeml-openrail-m 67 Non open-source license with use restrictions, a variant of openrail
gpl-3.0 64 Copyleft open source: https://www.gnu.org/licenses/gpl-3.0.en.html x x
bigscience-openrail-m 53 Non open-source license with use restrictions, a variant of openrail
cc 50 Appears to be a catch-all for CC license where variant is not specified ? ?
bsd-3-clause 49 Standard open source: https://opensource.org/license/mit/ x
bigcode-openrail-m 39 Non open-source license with use restrictions, a variant of openrail
unknown 37 License tag in repo indicates "unknown"
cc-by-sa-3.0 35 Earlier version of license above: https://creativecommons.org/licenses/by-sa/3.0/ x x
cc-by-4.0 33 Attribution only required for derivative works: https://creativecommons.org/licenses/by/4.0/ x
afl-3.0 31 Academic freedom license, open source: https://opensource.org/license/afl-3-0-php/ x
agpl-3.0 28 Affero GPL: Copyleft GPL-V3 requiring distribution of source code if you run a modified version on a server: https://www.gnu.org/licenses/agpl-3.0.en.html x x
gpl 21 Unspecified version of open source GPL: https://www.gnu.org/licenses/licenses.html#GPL x x
wtfpl 19 Unrestricted license (open source): http://www.wtfpl.net/about/ x
unlicense 12 Unrestricted license (open source): https://en.wikipedia.org/wiki/Unlicense x
cc-by-nc-nd-4.0 7 You can share but can't make derivatives (not open source): https://creativecommons.org/licenses/by-nc-nd/4.0/
artistic-2.0 6 An open source license with a re-licensing clause: https://opensource.org/license/artistic-2-0/ x
cc-by-3.0 5 An earlier version of the cc-by license: https://creativecommons.org/licenses/by/3.0/ x
bsd 5 No specified version of BSD license x
cc-by-nc-2.0 5 An earlier version of the cc-by-nc (non-commercial) license: https://creativecommons.org/licenses/by-nc/2.0/
lgpl 4 Lesser GPL allows linking as a module without applying the license to the rest of the project: https://www.gnu.org/licenses/lgpl-3.0.en.html x x
bsd-2-clause 4 Simplified version of the BSD open source license: https://opensource.org/license/bsd-2-clause/ x
cc0-1.0 3 Opt out of copyright protection: https://creativecommons.org/share-your-work/public-domain/cc0/ x
cc-by-2.0 3 Earlier version of license above: https://creativecommons.org/licenses/by/2.0/ x
cc-by-nc-3.0 3 Earlier version of license above: https://creativecommons.org/licenses/by-nc/3.0/
gpl-2.0 3 GPL version 2 open source license: https://www.gnu.org/licenses/old-licenses/gpl-2.0.en.html x x
osl-3.0 2 Copyleft open source license similar to AGPL: https://opensource.org/license/osl-3-0-php/ x x
ecl-2.0 2 Educational open source license with modified patent terms: https://opensource.org/license/ecl-2-0/ x
mpl-2.0 1 A hybrid open-source license with a compromise on viral application: https://www.mozilla.org/en-US/MPL/2.0/ x x
pddl 1 An open data license placing data in the public domain: https://opendatacommons.org/licenses/pddl/ x
lgpl-3.0 1 Lesser GPL allows linking as a module without applying the license to the rest of the project: https://www.gnu.org/licenses/lgpl-3.0.en.html x x
bsl-1.0 1 An open source license: https://choosealicense.com/licenses/bsl-1.0/ x
bsd-3-clause-clear 1 BSD license with explicit statement that no patent rights are granted: https://spdx.org/licenses/BSD-3-Clause-Clear.html x
llama2 1 Meta (Facebook) specific restricted license for their language model

  1. https://huggingface.co/models↩︎

  2. http://marble.onl/posts/motivations_for_open_source.html↩︎

  3. https://creativecommons.org/faq/#can-i-apply-a-creative-commons-license-to-software↩︎

  4. https://opencoreventures.com/blog/2023-06-27-ai-weights-are-not-open-source/↩︎