I posted some library in public repository on github. Say, I do not want it to be used for machine learning purposes. General question: How could this be achieved?

Spoiler: I found some collection of "Non-AI" licenses here: https://github.com/non-ai-licenses/non-ai-licenses If I publish my work under AGPL-3.0, could those licenses interfere with my current license?

Update: by "interfering" I mean that some terms on non-AI license may may weaken or strengthen some terms of AGPL license. Or vice-versa.


1 Answer 1


Let me clarify, again, the old misunderstanding, by pointing out that licences don't inhere in code, their obligations attach to recipients through the act of conveyance.

If you are the sole rightsholder in some code, and you release it under some non-AI (and thus non-free) licence, and you also release it under AGPLv3, those recipients that receive it under AGPLv3 are completely unaffected by any restrictions that applied to those who received it under, say, Apache2-nonAI. Conversely, those who received it under Apache2-nonAI are completely unaffected by the requirements of AGPLv3.

So hopefully that deals with your second question, "If I publish my work under AGPL-3.0, could those licenses interfere with my current license?". No, they couldn't.

As for the larger question of how to prevent your code from being used for machine training, well, the licences you list should achieve that, but at the expense of making your code non-free when so licensed (and given a solution to the detection-and-enforcement problem, which is non-trivial). The larger question of whether the output of an LLM is a copyright derivative of its training inputs is still very much a live legal question, and I don't think anyone knows how the chips are going to come down. If it is eventually decided the output is a derivative of the inputs, that will completely torpedo proprietary LLMs, as it's a rare one that won't have scooped up some copyleft-licensed inputs in its training maw.

I personally think the problem's going to go away fairly soon anyway, as the internet fills up with the output of trained machine models which is then used in turn as training input for the next generation of machine models. There is some very interesting work from the University of Cambridge showing that "using model-generated content in training causes irreversible defects", and that within a few generations the outputs become indistinguishable from garbage (and they're clear the work is not limited to natural language models, or even to text-based models). Since there is no generally-reliable way to distinguish model-generated content from human-generated content (see many long discussions here on meta.SE) I don't see how this effect can be long avoided, and the whole problem will disappear up its own tail.

  • 1
    Thank you for the answer. It triggered me to ask some more questions, I probably will post them separately.
    – BorisV
    Nov 23, 2023 at 11:07
  • 1
    @BorisV thank you for not just editing this question again and again in response to answers; we call those chameleon questions, and they're very annoying. I hope you get some answers to your follow-up question, as well.
    – MadHatter
    Nov 23, 2023 at 11:19
  • Why do you assume that adding AI limitation rules makes a program license non-Free or non-OSS? Maybe you're right, but to me it's not obvious without clarification. As far as I can tell, a rule like "not as inputs for AI training datasets" is not a restriction on running the program, but rather on how the source code may be re-used. Of course, for (A)GPLv3, one could reason that Section 7 allows removing the "non-AI" rules by interpreting them as "additional restrictions", but again this should be made explicit, if that's the interpretation you're going with.
    – Brandin
    Nov 24, 2023 at 9:58
  • @Brandin because it's a restriction on reuse, which is a specific case of restriction on use, which (as I think there is general agreement) is not allowed in free licences. After all, licences that forbid commercial use are non-free, and don't suddenly become free if instead they only forbid commercial reuse.
    – MadHatter
    Nov 24, 2023 at 10:05
  • As for AGPLv3 s7 removal of other restrictions, that would be germane if the OP had proposed issuing the software under a combination of AGPLv3 and a non-AI licence. But (s)he has not done so, asking instead only whether offering the code under either AGPLv3 or non-AI terms risks one set "contaminating" the other.
    – MadHatter
    Nov 24, 2023 at 10:06

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.