2 ms·
If the model is learning the nature of code and synthesizing new code then it may not violate some licenses. When people do this its usually fine. However, if
by soraki_soladead 4y ago
If the model is learning the nature of code and synthesizing new code then it may not violate some licenses. When people do this its usually fine.
However, if the model is simply compressing code it sees into the model weights, just memorizing snippets, then outputting those snippets, that’s much more likely to violate licenses. Like when people copy+paste from some licensed code without attribution (even if realistically nothing is enforced most of the time).
The truth is likely somewhere in the middle. Lets say 20% of code is stored directly in the weights but the rest is synthesized. That’s a problem for the whole product.
We already know models do a little bit of both depending on the data coverage. Common structures like if/then, loops, etc. are probably “understood” because the model saw them in lots of contexts. However, specific functions, especially those that are seen only a few times in much the same contexts are more likely to be copied. There’s a spectrum here from shortcut learning to understanding.
OSS doesn’t really have the access or resources to evaluate this. Github isn’t really incentivized to share any analysis they’ve done here.
What’s interesting to me is that their solution to this problem is to put the issue on their users/customers. By default, crawl everything public, ignorant of licenses, and if the customer has license concerns its on them to disable public code matching.
- kromem 4y agoThe problem only occurs when you are using it to fill mostly empty files, particularly in empty projects. In an actual codebase the frequency you are getting 'snippets' is less than 1%, not 20%. This was discussed in the FAQ for the beta. The straw man around this topic is wild. Anyone who has actually used it should know that in an existing project, it very heavily matches the output flavoring to the existing codebase. When there isn't anything to match, it only has the training data to pull from. Demoing the edge case where it is set up to fail and then pointing and saying "look at how it failed" is a bit silly. And continuing to harp on it in the comments on a piece about how now there's literally a setting to prevent even those edge cases is perhaps even moreso.