Licenses used for AI model weights

Andrew Marble
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: x
apache-2.0 1807 Standard open source: x
other 833 Includes many variations of OPT models (created by Facebook). Example license (non-open source):
openrail 163 Non open-source license with use restrictions essentially imposing the world view of the creator on downstream users:
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):
cc-by-nc-sa-4.0 97 Non-commercial copyleft-style:
cc-by-sa-4.0 69 Copyleft style open source:
Note that cc licenses are not recommended for source code:
x x
creativeml-openrail-m 67 Non open-source license with use restrictions, a variant of openrail
gpl-3.0 64 Copyleft open source: 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: 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: x x
cc-by-4.0 33 Attribution only required for derivative works: x
afl-3.0 31 Academic freedom license, open source: x
agpl-3.0 28 Affero GPL: Copyleft GPL-V3 requiring distribution of source code if you run a modified version on a server: x x
gpl 21 Unspecified version of open source GPL: x x
wtfpl 19 Unrestricted license (open source): x
unlicense 12 Unrestricted license (open source): x
cc-by-nc-nd-4.0 7 You can share but can't make derivatives (not open source):
artistic-2.0 6 An open source license with a re-licensing clause: x
cc-by-3.0 5 An earlier version of the cc-by license: 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:
lgpl 4 Lesser GPL allows linking as a module without applying the license to the rest of the project: x x
bsd-2-clause 4 Simplified version of the BSD open source license: x
cc0-1.0 3 Opt out of copyright protection: x
cc-by-2.0 3 Earlier version of license above: x
cc-by-nc-3.0 3 Earlier version of license above:
gpl-2.0 3 GPL version 2 open source license: x x
osl-3.0 2 Copyleft open source license similar to AGPL: x x
ecl-2.0 2 Educational open source license with modified patent terms: x
mpl-2.0 1 A hybrid open-source license with a compromise on viral application: x x
pddl 1 An open data license placing data in the public domain: x
lgpl-3.0 1 Lesser GPL allows linking as a module without applying the license to the rest of the project: x x
bsl-1.0 1 An open source license: x
bsd-3-clause-clear 1 BSD license with explicit statement that no patent rights are granted: x
llama2 1 Meta (Facebook) specific restricted license for their language model