Due to nature of the beast the LLM cannot backtrack an output to sources of initial training data.
Consider this, in a classical tooling scenario. You have deterministic tools that strip out code blocks from LGPL software, rename the symbols and then inject it into your codebase. For the sake of example, the tool does not and cannot simply log these inputs, it cannot tell you, I've used libX and Y for this, so I'm copying their respective LICENSE files over.
What you'd have to do to stay legally clean, is include every license file of every LGPL project your tools have access to.
It's down to basic legal principle - if you use, but not include, you're in problem. If you don't use, but include, you're in no problem.
A LLM service can use LGPL/BSD/MIT training data in that way.
However, the authors of the used code will soon find out the LLM service is using them, as the emitted 'product' will have their license in. All of them.
Then, the author can modify the license to explicitly forbid using the code as LLM training data if he wishes, for next versions.
It's actually pretty clear why AI bros are muddying the waters all the time speaking about AGI, singularity, and all of that bullshit, they want to anthropomorphize software so it gets human rights, as those human rights will ensure they can continue infringing on intellectual property. They want to paint a false big picture, where one that regulates LLM affairs red-tapes the progress and then the competitors will reach this revolutionary, never seen before quantum-leap thing faster than them.
It's all bollocks. LLM is not human and all it takes are a few good lawsuits to firmly bracket it as just a software or a software service. The inners don't matter. It takes intellectual property in, and produces a result out of it - a derivative work.
May I remind you all, when we speak about cases such as music, where some laws say this many beats or this many notes need to be different, etc...that is just arbitrary mechanism on how to tackle the problem of presumption of innocence. The court, in many cases, needs to presume I have not heard the song someone claims I ripped off, because they cannot prove I did. But even if they cannot, they guard the proprietor if I stumbled on same idea as he did before me.
What the court does here is not 'you need to minimally derive a riff three times before we let you go', but say, if I cannot prove you heard it, if it's different in three aspects, I will let you go. The three aspects thing doesn't apply without the first point. So it's firmly out of the window in the case of LLM - it can derive the input to point of no recognition, the depth doesn't matter - it is derivative work.