transcribe

1h 21m · transcribed Jun 2026
𝕏 Share ▶ YouTube 📥 PDF 🤖 .md

Transcript

0:04 So, today we're going to talk about data. And where we are is that you know how to train a model given data. Last time we saw evaluation, so we know what a good model is. And the for the next two lectures this week we're going to focus on what data should we train on. And I want to argue that data is the most important thing to get right in language models. And one justification for this is if you look at what companies actually disclose. So, here is the Llama 3 paper.

0:37 Um they have full transparency into architecture. Well, of course, because it's open weight model. Um they even tell you about the training procedures. Um but they don't say anything about their data. So, they just say we train from a variety of data sources. Um and do some stuff. And there's good reasons for this secrecy. One is that um data is is kind of your competitive secret sauce, uh competitive dynamics. You don't want to let your competitors what you're doing.

1:11 And the second thing, which we'll talk a little bit more about, is is copyright liability. You don't want to get sued if you tell people you're training on certain types of data. So, data is a long topic in in machine learning. And before foundation models, data working meant you annotate label data for supervised learning. Um nowadays there's less um manual annotation, at least in pre-training. But there's still a lot of curation and cleaning work that needs to be done. And so, fundamentally this hasn't really changed. Data has always been a bottleneck and always will be a bottleneck because it's in some sense of long-tail problem.

1:53 And that scales with human effort. So, if you have a lot of people trying to work on a problem, well, there's only so many people that can work on architectures and systems, but data, well, that's like, you know, especially if you're training a foundation model that's trying to do all these things, you can paralyze that effort easily. So, that's why these data teams and these model developers are actually quite quite big. So, so data comes in at different stages of a of the pipeline. Today, we're focusing mostly on pre-training.

2:26 So, pre-training, you take raw data, these are documents from the web, then you move into mid-training where you train on more high-quality data to enhance certain capabilities and give long context, things like that. And then finally, post-training where you're training on things like chat transcripts or if you're doing reinforcement learning, you get some environments that you're training on. This becomes more task-specific. In practice, the lines are a bit blurry. Um and there could be more than three stages, but this is sort of a basic template. Um the trend is that we go from training on large amounts of low-quality data to smaller amounts of high-quality data.

3:10 So, as a result of this process, you'll see in the literature some people talk about a base model. This usually means after pre-training and mid-training. Instruct models or chat models are after post-training. Um but of course, the lines are becoming blurry enough that what is a base model anymore is really kind of unclear and more recently, the largest models are there's no base model. There's just Qwen 3.5 397B and that's it. There's you don't see the intermediate checkpoints.

3:44 So, for models that are open source, like Olmo from AI2, you can see everything that's happening. And so, we'll study some of these models. Um so for example, in pre-training, there's a bunch of sources, which we'll talk about what these mean, but you know, some web pages, academic papers, math pages, proofs, and so on. There's mid-training. Um higher-quality web data, instruction data, um a bunch of synthetic data often goes here.

4:14 And then finally, post-training, there is a bunch of um you know, chat uh logs. There's more math and reasoning and coding and and you do safety at this at this point as well. So, you know, what are all these data sets? You know, how do you choose them, and how do you process them? So, that's that's the main question. Okay, so in the spirit of the class, we're going to talk about data. I'm going to go start from scratch. So, where does data come from?

4:45 Okay, so um you know, one might hear in the hallway, "Oh, language models are trained on the entire internet." So, so first of all, this doesn't really quite type check because for that to be true, it would have to be an agent that like an RL agent that goes on the internet and like does stuff, but that's not actually how pre-training works. Um slightly more accurately, it's trained on the public World Wide Web. Um this is not quite accurate uh for reasons I'll explain.

5:16 Okay, so first of all, the web is actually uh a bunch bunch of live servers that just exist in the world, and you can connect to. So, take any website, you can go and download a page. Or you can basically send a request and get back a response. So, you can't actually train on these live uh servers unless you're training an RL agent. Um so typically, what you do is you you have a crawler, or someone builds a crawler, not necessarily you.

5:42 Um the crawler needs to discover what web pages are out there, starting with a seed seed set, and it downloads this discovered web pages as it's it's crawling. So, um but now still you can't just run a crawl and download all the web pages on the internet. And there's a few reasons for this. Um one is that a lot of the web content is actually dynamic. So, especially these days a lot of sites are apps. Um the URL isn't even as full a specification of the content. It's just um an app that you interact with. Um and you need to often click buttons or submit forms to access content.

6:24 Um for example, if you're on, you know, Discord or something, it's not like you can just like crawl Discord and get a um all the content out of Discord. Okay? So, so that's one kind of thing, and a lot of content is actually known as kind of in the deep web, um which is not just like you're, you know, doing um uh web page crawling and following hyperlinks, which is a very kind of traditional model of web crawling.

6:52 The second thing is that um you know, authentication. So, some pages need a login and account, and generally you have to to pay. Um for example, there's Facebook, X, LinkedIn, New York Times. Um there's actually huge amounts of content that are actually locked up behind these walled gardens. So, these are technically on the internet or on the web, but uh you can't just build a crawler and go crawl uh you know, Facebook. I guess if you're Facebook, you can crawl Wait, you don't need to crawl Facebook. You have the data and you can train a model. Or if you're you're X XAI, you can train on X. But if you're anyone else, you can't actually access this content.

7:34 So, okay, suppose you don't have the authentication issue, there's still potential restrictions here. Um so, so there's something called robots.txt. And this is a file that um is usually placed at the root level of a directory such such as nytimes.com. And it basically tells you what you're allowed to crawl and what not. So, this things are a lot of things are disallowed such as uh OAI search bot or perplexity bot, Cora bot.

8:06 Um, I think basically uh chat GPT user, Claude bot, and all these things. Okay? So, um this is not a tech This is not a legal restriction. This is just like you're supposed to be a good citizen and look at robots.txt. And if your name is on that list, then you should not crawl. That's That's basically the um the contract not even a contract. That That is the thing you're supposed to do. Um A lot of websites now use um something like Cloudflare to detect and block bot activity.

8:43 So, sometimes you go on to a website and it gives you a capture, right? That's because it's somehow some algorithm has detected that you might be a bot and then it's making sure you're human. And um if you're actually a bot there then well, you can't I mean, you could try to get around this, but it generally this is a obstacle in your way. A website might block certain IP addresses um or or countries and they might have rate limits. So, there's technical restrictions on what you can actually uh crawl.

9:13 Um And then there's also legal restrictions. So, um there's websites have terms of service that say, "If you go to a website, you have to obey this contract to use the website." And the terms of service often will say, "If you are a bot, go away." Um, "You cannot use this the content of the site for AI training or um whatever it might be." And um And also, if the if you even if terms of service don't say anything, the content of the website might have, you know, a license uh or you might not have a license to train. And we'll talk more about this in a bit.

9:52 So, there's legal restrictions on what you can uh allowed to train on. These things are also evolving over time. Um so, there's a nice paper um by Shane Lampray called uh Consent Consent in Crisis. And what they did is they examined the restrictions, both the technical restrictions, robots.txt, and the legal restrictions, the terms of service, um for various URLs in common data sets which we'll talk about later. And the conclusion was that the restrictions have increased over time.

10:22 So, here's a graphic that shows The top one shows robots.txt. Um and if you just look at this red, that's the full restrictions. Um and up until 2023, um everything was fairly fairly constant. And then up until 20 mid-2023, all of a sudden you see the amount of the fraction of websites that have full restrictions on it has grown to almost like, you know, 50% here. And for terms, um this there's a similar trend where I guess um in 2016, no one really put any terms on their pages, and now most pages put some terms, and um most of the terms say uh you can't uh use this for AI.

11:12 Okay, so even though it was possible to crawl the internet back uh in, you know, let's say 20 2020, the internet actually, at least what you can legally uh crawl is actually much smaller. So, of course, these are you know, guidelines and sometimes either intentionally or unintentionally you could violate these things. So, this is sometimes you get into these situations where there's this guy who um uh what was this I forget the name of this the site was complaining about Anthropic crawling them hitting their servers a million times in 24 hours which was not good. And then read the docs was also getting hammered. So, there's a period where which I think probably has hopefully been corrected by now that crawlers were hammering you know, websites. And and there the here this is interesting is like even before talking about copyright issues. There's I think problems with crawling because either violating terms of service or robots.txt or just just blow up down you know, generating a lot of server load which this costs money for the person hosting it and also degrade service for everyone else trying to use it. So, there are you know, issues with with crawling and then of course there's copyright which will talk about soon.

12:46 That's a whole another complex can of worms. Okay, and then finally there's these things called shadow libraries there which are also part of the web. Um so, examples are Libgen or Anna's Archive and these they completely disregard copyright and bypass paywalls. So, someone has collected a ton of of data usually books and articles that are all copyright and people have to pay for these and have made them available for free.

13:19 Um and these there have been a lot of takedown orders, lawsuits and these are blocked but Um, these are circumvented because um, they just make servers in other countries. Um, and the people doing this argue that this is making free what's freely available, what should have been freed. But, generally from a legal perspective, this is piracy and copyright infringement. And we'll come back to this point later. So, there are a lot of books and papers on this uh on these uh shadow libraries.

13:54 Okay, so the summary so far, the internet is a huge and messy and you know, scary place. Um, and you can't actually get all of it. Um, there are technical restrictions, there's legal restrictions on what um data one can access. So, now it's next time someone says uh I trained on the internet, you can tell them all of these things you uh learned. Okay, so now let's go to the the second uh part of you know, what data can we use? Um, and this has to do with uh copyright.

14:31 So, suppose you were able to obey the terms of service um and you are really a good citizen and you obey the rate limits. Um, now there's still a question of are you allowed to train on this data? And this is a ongoing uh question that has not been fully resolved, but there has been a bunch of developments in the last uh year. So, the legal uh context for thinking about this question falls into intellectual property law.

15:03 And this is a system of you know, system that is trying to incentivize the creation of intellectual goods. So, I think it's remember to uh remember the spirit of the law is to not just say, you know, technically say no to everything, but to incentivize the creation of uh intellectual goods. And there's many forms of intellectual property that are covered. There's copyrights, patents, trademarks trademarks and secrets. Trade trademarks and trade secrets.

15:36 The thing that has is most relevant for language model data is copyright law. So copyright law has a fairly long history going back to the 1700s in England. And so 1709 was the first time that governments and courts started actually regulating a copyright for this goal of incentivizing you know innovation and creation. And in the US more recently the Copyright Act of 1976 is what think of defines a lot of kind of modern copyright. So copyright protection applies to original works of authorship authorship fixed in any tangible medium of expression. Yada yada yada.

16:20 Okay? So a few notes. So not everything is copyrightable. In particular collections are not copyrightable. So for example, if you have a a telephone you know directory unless there is some creativity in how you arrange things, this is not really a copyrightable. And furthermore copyright applies to an expression not the idea. So you can't copyright an an idea like you can't copyright the quicksort algorithm. You can copyright the like implementation of a quicksort algorithm, but not the quicksort algorithm.

17:01 So one thing that happened in 1976 is that the barrier to getting a copyright was relaxed a lot. So more things are copyright. So it used to be that you had to publish something to have something copyright. Now um, just have to be fixed. And what that means is that registration of any sort is not required for copyright protection. This is in contrast to patents. Patents, you have to go pay a a lot of money to get a patent and you would have to file a patent. But, the threshold for copyright is very low. For example, you put something on your website, it's copyrighted.

17:40 That's it. Um, now, you if you want to sue someone, you have to go get it registered, but it only costs $65. So, um, which is much smaller than the lawyer fees that you'll probably pay. So, um, it's really still a very low low bar. So, one thing to know about copyright is that it lasts, uh, 75 years and then the copyright expires and whatever that content gets released into the public domain and this is now you permiss- everyone can use it freely.

18:15 Okay, so a lot of, um, people who have, uh, lived in the past, um, all of their great works are in the public domain, which is great for everyone. So, the rationale here is that you're incentivizing innovation. Um, so, when an artist or a creator creates something, you want to protect their You don't want to have someone else to just take it. So, you protect them for a while, but, you know, after 75 years, presumably, it's not worth protecting or they're passed away or something. So, it doesn't make sense to keep things, uh, copyrighted anymore.

18:50 Okay, so So, basically, everything on the internet is, uh, copyrighted. Okay, so you're saying, "Hm, wait a minute. So, that means is every everything just if I train on anything, that's a copyright violation?" Well, not necessarily. So, everything is copyrighted, but you can use copyrighted works. And the way you do it is A, you either get a license for it or B, you appeal to appeal to the fair use clause. Okay, so a license is from contract law is something that a licensor grants to a licensee. Basically says, don't sue me.

19:30 Like you can uh you can use this this work in the ways that the license permits. So there's a really nice license called you know creative commons which allows something to kind of act like it was in the public domain. Um enables free distribution of copyrighted work. So your examples include like Wikipedia, OpenCourseWare, Khan Academy, um all these all these things. It was created in 2001 to essentially bridge public domain and existing copyright because otherwise you have to wait 75 years. But what if the creator says, I don't I will actually want people to use it. They can now have a means a legal means of saying, I put a creative commons license on it. It's going to act like it's in the public domain and uh you know, and everyone can use it.

20:27 So so far things in the public domain and things that have creative commons licenses are uh uh you can use it. Um but there's many other things that uh times where you don't have it's not a creative commons license, it's not in the public domain. You have to get a license. So um if you have money, you can pay someone uh to give you a license. So there's a bunch of deals between model developers and content uh I guess platforms that uh license allow the model developers to license the data for training foundation models.

21:06 Okay, so that's the first thing. You can get a license, either Creative Commons or you can pay someone for a license. Now, if you don't want to pay, you can appeal to fair use, which is a more complicated matter. Um so, this is section 107 of the Copyright Act. And there are basically, fair use says, I can use this anyway, even if I don't have a license. And there's four factors determine whether four fair use applies.

21:36 So, the first one is the purpose or character of the use, like what are you trying to do with it? And none of these are, you know, hard rules. They're just tendencies which have to be weighed in in court if it comes to that. So, for example, if you're trying to do something for education, it is more likely to be fair use than if you're trying to sell and make money off of it. If you're trying to if you transform something, then that's going to be more favored than if you just literally host the identical copy.

22:07 Um the nature of the actual copyrighted work is also important. So, things that are more factual are more likely to be fair use than fictional works. Right? Because if you write a summary of World War, you know, facts about page about facts about World War II is is less There's less um protection over a you know, my you know, really creative poem. Um And then uh you know, the amount of portion of the original work. So, using a snippet is uh favored over the whole work. So, if you just take a little bit, that's not as bad as taking everything. So, that's fairly straightforward.

22:48 And the final thing is um is kind of related to original motivation. It was like, why do you why copyright at all? It's to protect uh and align economic incentives. So, the effect that um what the the use has on the market for the original work. So, if you take author's work and you provide an alternative and that decreases amount that the original author could monetize their work, that is seen as potentially bad. But, if you're transforming in a way and adding, you know, going to a new market or doing something else with it, then that's going to be treated more favorably.

23:30 Okay. So, here's some examples of fair use. You can watch a movie and write a summary of it. You can reimplement an an idea like an algorithm, not copy the code. And then there was this famous you know lawsuit between Authors Guild and Google. So, if you go to Google Books, you can see snippets of of various books, which are copyright. So, there was a huge um uh you know uh deal about whether this was deemed fair use because you're sort of redistributing um you know, other copyrighted work. And and eventually eventually meaning after 11 years, this lawsuit was settled in favor of Google, which is why this thing exists.

24:23 And this has set some precedent for thinking about whether you know language model training is fair use. Um one thing to note is that copyright is is not about verbatim memorization. So, this might be I think for ML audience, this might be a little bit new because a lot of papers are focused on verbatim memorization, but that's that's one way you can violate copyright, but not the only one. So, for example, plots and characters can be copyrightable.

24:55 So, you can copyright Harry Potter, the the character, not any particular um you know, book or anything. But, uh there are some exceptions. For example, if you're parodying something, uh so, you're creating something that is looks like a derivative, but as long as you're making fun of it, it's actually more likely to be fair use. So, this Yeah. So, a lot of copyright is about semantics. It's definitely not about n-gram overlap. Um and also about uh the economics.

25:27 Okay. So, what is the implication for language models? So, first off, um copying data, like even if you're not training, like even the mere fact of copying, which is in the word copyright, is potentially a violation already, even if you don't do anything with it. Okay? Um training a model, um you know, I guess this is This is not really a Let's see how I would have to take that. This is not necessarily a a fact, but is intuitively has a transformative uh flavor, right?

26:06 Because it certainly not It certainly seems different than just like re-hosting uh another work, right? It's doing something uh transformative. Um and you know, in some sense, the models are really trained on this data as a means to the end. You know, we're trying to extract the general idea, learn about the world and how it works, rather than only just the uh concrete expression. Um and the other thing is that regardless of cop- copyright, language models can definitely affect um you know, the market. So, so I think this is also, remember, that's the fourth uh item for for fair use. So, by negatively affecting the market, you're you know, more likely to be ruled um not fair use.

26:56 Okay, so so fair use is kind of a little bit, you know, slippery. Um Um suppose you have fair use or you have a license, um remember that there's still terms of service that allow prevent you from actually just uh getting a piece of work. For example, YouTube has all these videos which are um licensed. But the terms of service um forbid prohibits just downloading the videos uh as a using a bot or like scraping.

27:29 Right? So, which is another layer. So, there's multiple layers of um restrictions here. Okay, so let me talk a little bit about where things are on the legal landscape. So, back in 2023, New York Times filed suit against OpenAI saying, "You trained on our news articles and look, here's evidence we were able to actually prompt uh ChatGPT to generate a news article almost verbatim." Uh I don't think this is this is still pending. There's uh a case against Anthropic where um the allegation was you pirated millions of books and you trained on these books to to make Claude.

28:08 Um just last year uh this was a kind of a landmark ruling um that said, "Actually, this particular instance of training is is fair use. However, Anthropic, you're still in trouble because you pirated all these books um and that is a no-no. Right? So, notice that this is has nothing to do with training. Just a mere a fact of cop- pirating, I mean, which is this is not a a new thing, is is is um illegal.

28:42 Um Anthropic, actually, interestingly, had bought and scanned all of the books, um which is actually fair use. So, the court said, "You're allowed to scan. You buy a bunch of books, rip off the binding, scan and digitize it for your own use. That's fair use." But, that doesn't absolve you of your sin of uh pirating. So, you can't pirate and then buy it and say like, "Actually, never mind what I just uh did first." Um so, the outcome is that Anthropic paid 1.5 billion to settle um the authors. So, this is like about $3,000 a book.

29:17 Um so, there's also a lawsuit against Meta. Um The allegation was that you trained on our books. Um sorry. And uh this was, as we'll see later, actually revealed in the the Llama paper. And the judgment, which came right after Anthropic, was um yes, training is fair use. Um and then they also torrented some books, so that's still pending. So, that's probably um if precedent holds, this is also not going to be uh good for for Meta.

29:50 Um Okay, so the summary so far is um training, you know, so to speak, has been deemed uh fair use or at least has been not deemed not fair use. Um The new rulings have so far been, you know, narrow. It's not to say that any training on any copyrighted content is is fair use. Um but in these cases, it's fine. Uh pirating books is clearly illegal. I guess we already knew that.

30:23 And but this is still a very active and evolving uh area. Okay, any questions about the the sources of data? I think before we get into the actual data sets, I just want to kind of um set the stage with this kind of a more general uh social context. Yeah.

30:55 Um the question is what do I think of voice dating at 11 labs? Um I don't know too much about that, so um so we can talk offline. Yeah. >> [clears throat] >> Yeah, so the question is what happens with time if you have one license and then it gets changed, uh what happens?

31:40 So, first I'm not a lawyer. Um however, uh second, so this um so the first license, I believe you're still allowed to train on it, but what happens is that the license usually applies to not just let's say a fixed set of documents, for example, Reddit. There's constantly new content being created um and the license being changed means that you wouldn't be able to train on the the later things.

32:10 Um Okay, so let's look at various uh sources of uh data. So, let's go back to crawling. Um so most model developers um have their own crawler uh because they want to have control over full control over what the data is. Um Um fortunately for the rest of us, if you don't want to uh build your own crawler, um there's something called Common Crawl, which has been around for quite some time since 2007.

32:42 Um, and every month they run a web crawl. Uh, gets about 3 to 5 billion web pages. Um, each crawl has some overlap with a previous crawl, but they try to diversify and get new pages. Um, so there's 300 billion pages so far. Um, which seems This was from their website. It seems a little bit big because if you multiply this number by 20, um, you don't really get a 300 billion, but that's what they say.

33:09 Um, so how many URLs are out there? That's really hard to estimate. So, uh, the Google search index is at least 100 petabytes, uh, according to them. And um, you know, each Common Crawl, uh, dump has about two, uh, billion, you know, web pages. So, that's about 372, um, terabytes. And this is not including images. This is just mostly focused on the, um, the text.

33:41 So, crawling is is conceptually straightforward, but all the, uh, gory details are in the implementation. You start with a bunch of URLs, um, and then you you iterate. It's basically graph traversal. You pop a URL from a queue, you download it, and then you look at all the hyperlinks in that page, and then you add them to the queue. And generally this is done in parallel, uh, over many machines. Um, and uh, there's many decisions here.

34:09 Which paper, which pages to download. Um, to respect You have to respect our robots.txt. Don't overload the server. Um, sometimes, uh, the websites change, and so you want a policy that will download, um, you know, frequently change pages, but not spend time downloading pages that don't change. So, there's some policy around that. And like I mentioned before, URLs are dynamic, so um both sometimes the same URL leads to different content depending on like some state of the the browser, but also different many URLs might lead to the same content, so there's a lot of duplication that um happens if you're not you know, careful.

34:55 Um in particular, mirror sites um explicitly is about duplication. So, Common Crawl releases their dumps in two formats. One is a WARC uh file. So, this is the raw HTTP response. Right? So, this remember HTTP protocol is that you send a a get you know, here's a a a URL uh and then out comes a a HTTP kind of response. And it's just the WARC file is that response. Um they also do some processing, they convert to a WAT file, uh which is necessarily a lossy process.

35:31 Um it turns out that this is not necessarily the best way to use uh the web. Um the HTML to text uh there are many tools for this, including Trafilatura and Brazilia Parser. And the way you convert actually does matter. So, this is from the Data Comp at WLM paper, which we'll talk a little about. It is ablation, where you look at the WAT files that Common Crawl releases versus these other um these other tools. And it seems like Trafilatura and Brazilia Parser are um you know, better.

36:08 Okay, so one thing you can do is just rely on general web crawls. But often, the the web is not a uniform place. It's not like you there's uh a bunch of websites and you just like get some random fraction of them and that's your data set. And there are specific pockets of really interesting high quality content, and I'll talk about three of those, Wikipedia, GitHub, and archive. So, Wikipedia, all of you know about um it's been around since 2001, and now there's 67 million articles of around all these different languages.

36:45 Um and it is it doesn't Wikipedia is not all um content by any means. There's no You can't have original thought um in it because everything has to be kind of referenced and cited. So, in some sense, you could argue that Wikipedia is doesn't contain anything because that's not already on on the on the web. Well, actually, that's not true because they can also cite books, which are, you know, obviously, you can't easily get them. So, Wikipedia is so good. Um So, and also there's articles based on notability.

37:27 So, not everything Not everyone can get a Wikipedia article about them. Um So, anyone on the internet can write this content. This was the radical thing about wikis, and it's sort of still a miracle, I think, to me that this this actually works. It just happens that any vandalisms gets reverted by administrators or bots, I guess, these days. There's um you know, a small number of Wikipedians, like as any sort of peer production system, there's a small set of people who do most of the work.

38:03 Um And for example, this guy has like 5 million edits. Um and one thing about Wikipedia is that every few weeks they do a periodic dump. So, basically, take all Wikipedia, package into a nice um tar file, and then you can just download that. So, this is important because you don't need to crawl Wikipedia. In fact, they don't want you to crawl Wikipedia. They just want you to download this if you're going to crawl. And this is much uh better than crawling.

38:31 One kind of just a fun aside or um good to know is that there's this paper um that says um you can actually poison uh Wikipedia. So, you might think that this vandalism um gets reverted. So, if you do attacker tries to do something fishy uh you'll just get it rolled back. But, what um Carlini uh realized is that these periodic dumps um happen at a regular cadence. And so, what what you can do is you can go in and you can just edit it right before the dump happens.

39:08 And then the dump ha- the it happens and then um and then the edits get rolled back, but the dump still has the malicious content. Um and with if you're able to inject things into uh web pages, that means you can cause there's works that's uh show that you can cause um the model to, let's say, ascribe negative sentiment to any sort of uh trigger uh phrase like the iPhone. So, my one takeaway here is that um if you can consider adversaries, even so-called high-quality contents might contain um bad things in them.

39:44 I think this has been uh a fix uh since then. Okay, so GitHub is a good place for code and code is important um not just for if you want coding capabilities for your language model, but if you want general um you know, reasoning. Um so, GitHub, all of you know um again, it's a live service for hosting code repositories. Uh been around for since 2008, about the same age as uh Common Crawl.

40:15 Um it has 400 uh 20 million repositories, 28 million are public. Um, each repository contains an It's not a file. It's as you know, it's it's a directory with commit history, issues, pull requests, and comments. Um, code has generally a lot of um, you know, duplicates um, and this because either copying code or or forking code. Um, and um, GitHub has deemed it you're allowed to train on any public repository with a permissive uh, you know, license. So, MIT or Apache licenses are are fine.

40:55 Um, so you there's uh remember there's two types of data when you talk about GitHub. There's like the repository data which you can uh just uh go and download through the GitHub Git protocol. And again, you know, you shouldn't scrape GitHub. Uh you should just download the repository. And then the metadata associated with each repository, issues, and pull requests, and so on. These are made actually via the GitHub archive which gives you hourly snapshots of this event stream, which I think is interest- really interesting data. It's basically every single comment or star or um action on GitHub gets uh that gets recorded.

41:33 There's this uh Software Heritage Foundation that um is focused on the repository, not the metadata. And they aggregate GitHub um GitHub is not the only place where code shows up. There's also smaller um entities like GitLab, Bitbucket, and so on. And they aggregate all that those repositories. Um, okay, so archive uh just very briefly, everyone knows archive. This has been around as a site that allows people to share papers since 1991, started with physics, and now has a lot of uh other areas in it. Um, each uh of the 3 million submissions has the metadata, a PDF, and optional LaTeX source.

42:21 Okay, so already you should be thinking, well, what does it mean to train on archive? It's uh not clear because this is well, you have to convert the PDF into a text or you can use a LaTeX source, which is a bunch of files. Um there it's not peer-reviewed, but there is some approval process, and authors can choose to maintain the rights uh or put in the Creative Commons, which uh so everything is actually very clearly licensed. Um all the metadata is under permissive license, so you can use that regardless, and then you can go and you look at all the papers that are Creative Commons licensed, you download those, and you can use them.

43:01 And I think most archive papers are uh Creative uh you know, Commons. Um and then again, this is available, you don't crawl archive, you just go down to uh bulk download it from some uh website. Okay. So, any questions about um source of data? Yeah. Are there restrictions on data generated by models?

43:33 Generated by models? Yeah, by using that data. Oh, oh, I see. Uh we'll talk about that uh later on. So, the question is, what about model generated, like synthetic data, are you allowed to use it? Um the short answer is probably yes. Yeah. Are you using crawlers like Open or crawl and stuff like that? Um I guess like the cuz you mentioned earlier that there are websites that have a lot of pirated books on it, right? How do you like How do you ensure that those types of websites don't show up in your crawl of the internet. Yeah.

44:08 Yeah, so the question is there's a lot of websites with pirated books. So, if you're just doing a web crawl, you can't look at all the websites. So, how do you make sure that everything is kosher? And that's part of the difficulty is you can't. And and so there's most likely in Common Crawl there are copyrighted books and content that uh you are not supposed to train on and you can appeal to you appeal Well, you appeal to fear it. So, remember everything is copyright. Books are not uh remarkably different from your your website.

44:41 Uh for example, both are uh you know, copyrighted. Probably a book author has more of a uh you know, if they want to go into court, they'll probably be able to protect that better because it's published than your uh your website, but um but but still. Um and I'll talk a little little bit about later. If you really want to be careful, um you can do something I'll um show later. Okay, so what I'm going to do now is to now talk about the various uh data sets that are actually used in building models starting all the way back to 2019. So, we've talked about the origin of data and source of data. So, you have a feeling for just the general um data you know, landscape. Um and so let's start with BERT. Okay, so BERT was from 20 um 18 and they trained back in the day, they just trained on Wikipedia and books. So, what is this books?

45:38 Um so, there's this website called Smashwords. It was uh created that allow anyone to just put a ebook uh up for to publish and they had about half a million books in 2024. So, in 2015 there is this paper um who just scraped uh Smashwords. Um uh so sorry, took the books that were free and um and just made a corpus.

46:08 This was back in the innocent days when no one was paying attention to any of this. So, this books corpus was around for many years in the academic computer academic community. Um, since then it has been taken down because it violated the terms of service. Okay? Just because it was free and you can get it doesn't mean it's it was legally allowed. Um, so one thing about to note about BERT is that the sequences were documents rather than sentences. All the language modeling research before that was focused on sentences.

46:50 Okay, so in 2019 GPT-2 came around and so what did they do? Um, so they wanted to get high quality web content. And at that time people knew about Common Crawl, but somehow the Common Crawl data was too messy. So, what they did was came up with this clever idea where you can take you look at pages that are outgoing links from Reddit posts with greater than three karma.

47:20 So, good posts must link to good good good websites. So, you grab those those pages and you get 40 GB of text, a million pages. Um, they never released this data, but there was an open replication of web text which people use quite a bit. Um Okay, so so that's a GPT-2. So, as you're going through this, I guess think about both uh you know, there's many methods of filtering and collecting data and it's interesting to look at these design choices and um okay, so CCNet was developed by um at that time Facebook. Um so the goal was to create large high-quality data sets for pre-training and they were interested especially interested in um low-resource languages.

48:18 Um so they didn't want some very manual process that only worked for for English. Um so they did did a bunch of things. They did deduplication um and uh language identification. They trained a classifier to detect a language um and keep the only the language that you you're looking for. Um and for quality filtering uh the idea that they had was they wanted to keep documents that look like Wikipedia.

48:50 So Wikipedia um at the time was deemed good high-quality content and they use the language model that was trained on Wikipedia and you score probability of a a new document under that language model to gauge how Wikipedia-like it was. So rather than outgoing links to Reddit, they use a language model on Wikipedia. Um and uh they you know show that uh because you can get much more more data, you can actually outperform uh training uh performing just training on Wikipedia and this was a tool that will later uh appear in some other papers.

49:29 So um here is another work. This is from Google uh 2019. Um so this is called C4. So this paper is actually more famous for the T5 model um which pushes the idea that you should just treat all the NLP tasks in a world as text-to-text. But actually a big contribution of this paper, which is a very long report, was the C4 data set. And the observation, which was very clear at that time, was that Common Crawl is mostly not useful for natural language.

50:08 Right? There is sort of this idea that you had these small data sets, and they were high-quality, and then all you had Common Crawl, which was a mess. And any attempt to train on Common Crawl just led to to junk results. So, people were thinking like, "How do I get a larger but high-quality subset of Common Crawl?" So, we saw the Reddit idea, we saw the the Wikipedia-like language model idea. C4 used a different idea, and this is saying, "Let's just define a bunch of rules."

50:40 Which turned out to be fairly effective. So, um basically, they keep lines that end in punctuation, have more than five words, remove pages with fewer than three sentences, remove pages that contain any bad words. Um Uh remove things like terms of use, you know, boilerplate. Interestingly, remove the curly brace, which, you know, filters out a lot of code. So, they weren't clearly at that time they weren't thinking about code models.

51:11 Um and they filtered out anything that was not English. Okay, so the end result is that you have 156 billion tokens. So, you know, 40 sorry, 800 gigabytes of text. So, this is much larger than the GPT-2 data set, which was only 40 gigabytes of text. Uh a bit later, there was some analysis done in C4, which showed Here is the websites that were represented. So, you have a bunch of Wikipedia, patents was a very common thing.

51:45 Um they also released the web text like document. They also used this idea of links in Reddit posts um and uh from Reddit posts with greater than uh three karma and filtered through those pages. Um so they were able to get using this method 17 GB of text using 12 um Common Crawl dumps. Remember web text was 40 GB, which means that Common Crawl is is, you know, maybe incomplete or uh doesn't have everything because if it had everything, you should be able to hit 40 GB. And And they they showed that at that time you could use this data and improve on a bunch of NLP uh you know, benchmarks.

52:36 Okay, so we've seen using rules, um things that look like Wikipedia, Reddit links. And now uh let's talk about GPT-3. So GPT-3, the data set was um they did their they used Common Crawl, they did their own processing. Um there is this web text which was essentially the GPT-2 data set but expanded. Um notice that there's some overlap. Common Crawl does overlap with this, but this is a subset of more targeted um distribution.

53:07 Um there is this in the paper it's described as books one and books two, which is um miss internet-based books corpora. So this remains a mystery exactly what it is. Um and Wikipedia. Okay, so so the result was about 500, you know, GB of of text, 400 billion tokens. Um and to do the Common Crawl uh processing, they trained a quality classifier to distinguish things they determined deemed to be high quality from the rest. And they did some fuzzy deduplication because um you know, web text and Common Crawl had uh dupes.

53:54 Okay, so this paper um followed the idea of using a classifier to just to train to do quality uh uh classification. So, after GPT-3 came out, this was I think a big event and there were a number of efforts to try to things in the open. So, one of the initial efforts was the the Pile, which is um uh a grassroots effort uh from Eleuther AI, where they had a bunch of um people in this Discord just jamming and figuring out high-quality sources and they came up with this uh list in the end. And today this is still pretty interesting and diverse. It has uh you know, the Common Crawl, has PubMed, um this has this thing called Books 3, which you know, we'll talk about, Archive GitHub, which we talked about, um you know, Wikipedia, IRC, another books corpus, uh philosophy papers, and so on.

54:58 Um And so, uh you know, they included this Enron emails data set. So, Enron went bust in 20 2002 and um all the emails were released and this is one of the few email data sets we have, um which is a weird distribution I think for um email, but that's that's what you get. Um so, Project Gutenberg was uh so, let's talk about books a little bit. Um So, Project Gutenberg was uh started um in 1971 and it only includes books that received copyright clearance. Uh So, mostly books in the public domain.

55:44 And there's this packaging of Gutenberg into PG-19, which is Gutenberg's before 2019. And which is I guess most of them because for them to be in public domain, you have to wait 75 years. So, Books 3, which is kind of this interesting data set that appeared in the pile. So, this is described actually as you know, 200K books from a shadow library called Bibliotek.

56:20 It concludes all books from your favorite authors. And at that time, again, 2020, no one was paying attention. It just sat you know, people used it to train models. And since then, it has been taken down. So, you cannot use or should not use Books 3 anymore. We'll come back to Books 3 again. So, Stack Exchange uh you've probably used um uh quite a bit. Although, I guess these days maybe less so because of AI. Um There's a bunch of user contributed questions and answers starting 2008. And um You know, one thing that's it's interesting about this data set is that it's a sort of a Q&A format.

57:10 And this is quite close to kind of a real you know, application. So, normally you think about pre-training data as here's Wikipedia articles, just like raw text. Right? But some parts of the web are actually look like you know, supervised, like what you would want to ask your language model. So, you know, which I think maybe helps the model learn certain types of question answering behaviors. So, not everything is like super magically emergent. It's like, well, this type of data does exist on the web.

57:46 Um So, there's also this data has metadata, which is like the number of votes, which are useful for filtering. And again, this this data is uh released in data dumps that allows you to just download without crawling it. Okay, so now in 2021, there was another paper from DeepMind. They trained a model called Gopher, which was never released and actually was sort of subsumed by Chinchilla.

58:19 Um Um but the description of data, I think, is actually really good. You should read this paper because I think it's very thorough in the way that they describe the data processing. Well, except for the parts where they don't tell you what's in the data. Um so, there's there's this thing created this MassiveWeb, and they had you know, C4, which remember was the data set that we looked at before from Google. Um they trained on books, news, GitHub, and Wikipedia. They don't say anything about how they they got that. Um So, um for the MassiveWeb, they kept English, deduped, and their quality filtering was also based on manual rules. And part of the reason for this is that they had more control over that. So, I think as you can see, um there is a sort of this like division between people who wanted to use rules, um and people who wanted to use classifiers. Um So, they got, you know, a massive as the name suggests, a massive amount of uh text.

59:31 Um but, you know, their model was only trained on like a very small fraction of this uh of this uh data set. Um Okay, so in 2022, uh Llama 1 came out. And the data set here, this was actually a a very nice paper in that it detailed their data processing. So, this is probably one of the uh last uh non-open, fully open uh models that actually talk about their data processing.

60:02 So, they have Common Crawl processed with CCNet, which you know um uh about. Um the classification though was whether the page references uh was a reference of Wikipedia, not whether it is actually a Wikipedia article. Um so, the idea is that, well, maybe Wikipedia articles are like too stylized. And we know that Wikipedia articles references a bunch of other articles, which are presumably good. So, let's call those the good uh websites. Um they had uh you know, C4. Um they did a bunch of processing on GitHub to get permissive licenses, uh Wikipedia. Um they trained on, you know, Books 3 and Project Gutenberg. So, Books 3 really got them in a lot of uh trouble because they're just announcing to world that, "Hey, I trained on this data set."

60:54 And you look back, "Oh, this came from. Where did it come from?" It came from the pile. "Oh, it came from a shadow library." So, um you know, that's why people don't to talk about their data anymore. Uh so, they looked at archive um and uh actually used the the LaTeX to do the the processing, Stack Exchange, and they got a 1.2 trillion tokens. They didn't actually release this data set, but they had enough of a description in their processing that this was uh reproduced by Together's Red Pajama uh V1 um data set, which was then used in other, you know, sources.

61:33 So, as you can see here, Red Pajama V1 initially also contained Books3, which has now been kind of uh you know, stripped out. So, various uh decisions made by early on about copyright actually influence have a fairly uh big kind of watershed. Okay, so let's talk about Refined Web. So, this is um a paper uh that um tried to make a point that web data is all you need.

62:04 Right? So, the web, in some sense, is everything. And then we talked about all these specialized sources like there's GitHub and archive and and Stack Exchange. And they said, "Well, what happens if we just um stick with the web?" So, they did job of uh doing the transformation from HTML to text. They filtered um using the Gopher rules, which is basically keep things that look like English. Um they explicitly at that time still said, "Avoid ML-based filtering to avoid uh biases.

62:38 I don't want to like find an overly narrow subset of uh of the web." Um they did some, you know, deduplication, and they had 5 trillion tokens. They released about 600 billion of them. Um so, the fine-web uh from Hugging Face um was a replication of Refined Web, but improved it. So, they took all the Common Crawl dumps at that time, did some filtering, um again using manual rules um because to not inject biases, deduped, um did PI removal, and got, you know, 15 trillion, you know, tokens. So, you can see that the size of the data these data sets um is growing you know, quite a bit.

63:22 Um and um so then there is this Dolma data set from AI2 and this is um a data set that includes their own processing of Common Crawl, the Stack which we'll talk about before, C4 which you know about and a bunch of other things. Um And the the Reddit data set was from this this project called PushShift.

63:53 Um and at that time you could still get this data and you can you know, train on it before things got locked down. Um AI2 has their own um you know, crawl of academic papers so called Semantic Scholar so they derive a data set based on that. Um so, let's look at their Common Crawl processing. So, um they use a language identification, they So, this was model based but quality filtering still avoid model uh based filtering.

64:26 Um and then they remove toxicity using a rules and a classifier. Um and they got 3 trillion tokens out of that. So, DCLAM I think was maybe a point where this idea of model based quality filtering started to really kind of become the the the norm here. Um so, DataComp they their initial motivation was to define some sort of pipeline so that people can try different data methods um in a standard way and show results. But I think the main way that I think people use this is just using their data set that they released to train models and do other things.

65:12 Um So, they uh process Common Crawl to produce data on pool. So, this is completely unfiltered. And if you look at this this is this is massive, 240 trillion you know, tokens. Um this is probably more than number of tokens that anyone really trains on. But, a lot of this is fairly uh low quality. So, then they have a pipeline where all that gets you know, filtered if you only keep and you know, English. Um you have some sort of rules to really narrow it down. You do dedupe. And then you do this model-based filtering.

65:49 And you end up with you know, something that's 1.4%. And this is the data set that um we'll see actually works you know, pretty well. So, the model-based filtering and this was you know, s- kind of strangely good. So, to train a classifier, they took um Open or Hermes, which is essentially a instruction data that was generated by uh GPT-4 and Eli5, which is a subreddit with uh various questions and answers. So, this is um let's see.

66:28 Like these are tied the type of questions that are in Eli5. Um Okay. So, anyway, you get the idea. Um So, it's it's kind of weird, but um but somehow this this works. So, the negative examples are anything from Refined Web, which is remember it's just like a uh a very loosely filtered version of the web. It's basically the web. And it got 3.8 trillion tokens. Um they train a fast class classifier. Think about this is a linear classifier.

67:00 Um and then they show that this um this magical classifier quality classifier outperforms um a bunch of you know other things that they they tried. Um So, DCL M this became sort of a for a while at least in the open community a bit of a gold standard for quality filtering. Um let's move on to Nematron. So, Nematron this is from Nvidia.

67:31 They said that well DCL M filters too aggressively. It's removing like most of the data. Um and remember they only got uh uh I mean 3.8 trillion tokens, right? Um So, we need more tokens. So, what do we do? We are going to um do something more uh I guess elaborate. We're going to prompt our existing model to score find uh web documents based on educational value. So, we're going to prompt a language model and said is this education or not? Create a bunch of labels, train a fast text model.

68:14 So, that's one um classifier. Another classifier is just using the DCL M classifier. So, we're going to use those uh classifiers. We're also going to use synthetic data. So, this is probably the one of the um I don't know if it's a it's probably not the first, but uh one of the the main data sets that really lean into synthetic data as a for pre-training. Um So, they had for low quality data as deemed by these classifiers, you use a language model to rephrase it to make it more uh look like Wikipedia.

68:51 Um for high quality data, we use a language model to generate various tasks. For example, given a Wikipedia article I can generate question answers or I can generate like please summarize this document, um extract key information from it and so on. So they resulted in data set that was six trillion tokens. So this is quite a you know substantially larger than DCLM. Um and just for kind of reference this is still kind of small by some you know considerations. So Llama 3 was trained on 15 trillion tokens, Gwen 3 was trained on 36 trillion. Although there is a sort of this it's not clear how big these unique tokens these are because when you look at token counts in language model papers some of it's like repeated. Like you do multiple epochs, two epochs that's twice the number of tokens.

69:51 So you have to be careful when you look at those numbers. And they show that this the data set is you know better. Their high quality subset beats the previous data sets. Okay, so up until now [clears throat] we've seen a bunch of different methods for filtering. I think all of these sort of look very kind of similar at some level. You take a web crawl, you either decide I'm going to use rules to filter or I'm going to use a model. If I'm going to use a model then I have to decide what looks like good data and then try to train a classifier and classify all my documents and select. And there's a seems to be a trade-off between you can take a lot of common crawl. You can get um you know 240 you know trillion tokens if you want, but that's probably going to be really low quality. Or you can get like one trillion tokens and there's sort of some you know sweet spot in between.

70:54 Let me talk about two final things. So code and going back to this question of licensing. So the stack is a very nice project that was trying to make a really good coding data set since it was cleared by 2022 that coding was going to be really kind of important. So what they did in the initial version is that they clone you know 137 new repos. They kept the ones that were permissively licensed, removed example near duplicates and resulted in you know one sorry 3 terabytes of code.

71:38 And then in 2024 they had an update and here they took more than the metadata like the issues, comments and PRs from GitHub, the repositories from the software heritage which we talked about. They also scraped documentation from various websites by crawling them. They did a bunch of processing. So in GitHub repos you have binary files which you probably don't want to train on. They have malware, you get rid of that.

72:09 A lot of GitHub especially these PRs are bots so you have to filter that. Dedupe, do PI reduction. There's a lot of pull requests and stuff and they basically subsample to kind of keep it representative and the data set manageable. They also did this thing which was I thought was kind of nice which is that there's many programming languages out there. There's a lot of Python. A lot of C but low resources languages like Nim which I hadn't even heard of. They're not that um common. So what they do is they compile this code and then into a low level intermediate language, LLVM, which everything like C compiler can compile into this, and they've uh juxtaposed the low-resource language and the intermediate representation. So, then the the the language model can actually learn um the mapping between the shared low-level representation, which has a lot of data on, and the thing that it does has less data on.

73:15 Um and just for fun, you add in all the other you know, good stuff um that you can. So, this is sort of Stack V2 is like mostly code and then plus other things that were used to train um their coding models. And um and one thing about uh pull requests is that their pull requests and all the metadata is not by its nature uh linearized sequence. So, there has to be some steps to take into linearize it.

73:48 So, one important thing you have to side is how much context to provide. So, for example, uh event might just be I changed one line of code. Right? And that could just be one line, but presumably to learn that, you want to provide some context, maybe a few lines around it, maybe the entire file surrounding that diff. And these are some design decisions that you have to make for um for linearization. And so, they at the end of the day, the tokens that they train on look something like this, where it's sort of this like XML like structured data, where you have like the PR um and then you have a bunch of diffs um and then for comments, you have basically the events of like a comment was posted um what the review state of that uh PR was, and so on and so forth.

74:37 So, it's not just learning um how to generate code, but also the software development process around code. Okay, so finally, I'll talk about uh common pile. So recall that almost all the data on the internet is copyrighted. Um some of it is permissively licensed. Some of it is even in the public domain. And while you can appeal to fair use and say I'm going to train on it anyway. Um this is not quite settled. Right? So if you're very very risk-averse, then you say um well, let's Like if I don't know whether it is okay, that's a no.

75:19 If you take that attitude, then that's what uh Common Pile did. So can you train a good model with only permissively licensed um data? Um or rather how far you can you get. So this was a project that uh went and scoured the the internet for all the different types of data that it could possibly find that was worth training on, that was permissively licensed. It includes um you know, Stack V2 and code.

75:53 Um turns out that a lot of government proceedings are actually uh permissively, you know, uh licensed. Uh wikis, um some uh things on the on the web. Some news sites are actually um permissively licensed. Academic papers, um online, you know, forums, things that are in the public domain, um educational resources and and so on. So in the end there were 8 terabytes of you know, data, which is actually pretty good for permissively licensed uh data.

76:28 Um doing this project is actually much harder than maybe it sounds at first glance. It's not just simple as like, oh, you look at the license and you're like, oh, yep, Apache, a good or or CC, a good. Um there's some subtleties. Um first is license laundering. So, people are kind of sloppy with licenses. So, people might take some copyright work and just, you know, put it on a slap a CC BY on it. Anyone can write this on the internet. It's kind of hard to tell whether this is like a real real or not.

77:05 Um there's also this uh common practice where, you know, for example, Doma is um is permissibly licensed. Remember, Doma is the AI2 collection, but collection licenses don't extend to the individual works. So, the collection is like you know, is you I mean, first of all, there's a question where the collections are I think collections can be copyright, but you can I guess you can put a license on it. Um anything. Um but the individual works um are not uh necessarily if uh good. So, you can't just look at data sets on Hugging Face and you Many data sets on Hugging Face you see they have a permissive license, but if you dig deeper, it's actually not um permissively licensed at the individual level.

77:52 And they also made a decision to uh forego training on any synthetic uh data because training um language models on synthetic unlicensed data is is unclear. So, probably it's going fine um because um like technically these these are like open way models with MIT license. You can um you know, do whatever uh you can use them however you want, but um you know, these language models were uh presumably also trained on unlicensed data, so it's a little bit of kind of data laundering if you are really kind of honest um here.

78:34 Um so, so with this uh, data, they compared with a bunch of, um, other models, um, like the first LLaMA, uh, MBT, um, and Qwen. And on a bunch of benchmarks, they show that this is not bad. I would say it's not nearly as It's not as good as the Qwen, uh, models, for sure, but it's, uh, certainly outperforming the very old kind of ver um, This is like, you know, from 20 20 three, I guess. So, quite old models.

79:10 Um, so, I would say that the conclusion here is that you can do reasonably, but it's I think it's still, uh, pretty tough to compete without, um, doing more tokens. But, I don't think this is the final word on it, and I think you can probably eke more out of publicly permissive licenses if you try. Okay, so, to summarize this, uh, lecture here. So, maybe hopefully I now I've, um, given you some appreciation that data is a very rich topic. It's not that data just falls from the sky, or you just go on Hugging Face and you download a data dataset. Um, data has to come from somewhere, and there's also a technical, but also social context in which, uh, data comes.

79:55 Um, you know, because at the top, there's the internet is a bunch of live services. Right? There's hack to has someone has to do the work of producing raw whether it be the website that gives you dumps, or someone has to build a crawler, or or something. And then, you someone has to make a decision of how to process it into usable form, um, filtering, transformation, deduplication. All of these things have an impact on the quality of your final, uh, language model.

80:26 And notice that filtering is like probably one of the most kind of important things. How do you go from 200 trillion tokens to you know, less than like 3 trillion tokens. I think that obviously is a huge reduction, which um I think merits a lot of attention. Data is in some sense a key ingredient that differentiates language models. A lot of language models are um roughly the same kind of transformer architecture, um but you know, data is some depending on um how you process it can make a pretty big difference.

81:03 There's plenty of legal and ethical issues around data, um more than I can get into this lecture. And also, this this process is very messy. Um unlike, you know, some of the other parts of this class, where things are maybe more based on kind of first principles, um you know, data processing is right now, at least, a lot just based on kind of vibes. You set up you define this classifier, you define this rule, you set some threshold.

81:34 Um so, there are many opportunities to improve. So, as you do your assignment four, uh maybe think about whether there's uh better ways to do this, and this could be maybe a research direction. Okay, so that's it for today. So, next time I'll continue talking about data. I'll do talk a bit about uh post-training data and a bit more about uh you know, filtering.

Summary

The lecture focuses on the critical role of data in training language models, emphasizing its importance over model architecture. The speaker discusses the complexities of data sourcing, legal implications, and the evolution of data processing methods in machine learning, particularly for foundation models.

- Data is the most crucial element in training language models, often kept secret due to competitive advantages and copyright concerns.
- The data pipeline consists of pre-training (raw data), mid-training (high-quality data), and post-training (task-specific data).
- Web crawling is complicated by technical and legal restrictions, including dynamic content, authentication barriers, and copyright laws.
- Copyright law protects original works, but fair use allows limited use without permission under certain conditions.
- Various data sources like Wikipedia, GitHub, and academic archives provide high-quality content, but many datasets have been taken down due to copyright issues.
- Recent models utilize diverse data processing techniques, including manual rules and machine learning classifiers, to filter and curate datasets.
- The trend is moving towards larger datasets with improved quality filtering, but challenges remain in ensuring compliance with copyright and licensing.
- The lecture highlights the ongoing evolution of data sourcing and processing in the context of language model development, suggesting potential areas for research and improvement.
© transcribe · For agents Built with care and craft by Gokul Rajaram