Edit: Github mentions the issue here: https://docs.github.com/en/github/copilot/research-recitatio... and here: https://copilot.github.com/#faq-does-github-copilot-recite-c... though they neatly ignore the issue of licensing :)
Hash each function, store the hashes as a blacklist. Then you can ask the model to regenerate the function until it is copyright safe.
> We found that about 0.1% of the time, the suggestion may contain some snippets that are verbatim from the training set
That's kind of a useless stat when you consider that the code it generates makes use of your existing variable/class/function names when adapting the code it finds.
I'm not a lawyer, but I'm pretty sure I can't just bypass GPL by renaming some variables.
In the AI world, unless all GPL (etc.) code is excluded from the training data, it's inevitable that some will be "copied" into other code.
Where lawyers decide what "copy" means.
Then you have the issue of attribution with more permissive licenses.
I don't, but then I didn't go first look at the GPL code, memorize it completely, do some brain math, and then write it out character by character.