← All questions
Data, Privacy & LegalMedium· Licensing· Data Curation· Legal Compliance

How do you handle code licensing in a pre-training corpus?

Managing code licensing requires a proactive approach at the repository level. Engineers should filter for permissive licenses such as MIT, Apache, and BSD before extracting data. It is also critical to perform aggressive deduplication, as copy-paste code is prevalent in open-source repositories. Most production teams avoid GPL-licensed code due to its viral nature, which can create significant legal risks. The Stack is often cited as an industry benchmark for implementing these filtering and extraction strategies.

Code playground (Python)