Loading video...

Video Failed to Load

Go Home

Still following your human intuition to mix corpora from different sources for language model pre-training 🧠? Everyone says that data mixture has a big impact on model performance, but how - and why🕵️? Did you know that web corpora are actually highly impactful for downstream tasks 🏆? Let's check...

54,961 views • 2 years ago •via X (Twitter)

12 Comments

Qian Liu's profile picture
Qian Liu2 years ago

Data Mixture is Important, but Challenging 🤖📚 Large Language Models (LLMs) are powered by vast, diverse datasets from the Internet, including academic papers, books, and various online sources (Gao et al. 2020). As LLMs grow in scale and complexity, the composition of their training data becomes increasingly crucial. The importance of data mixture was recognized early on by the creators of GPT-3, one of the pioneering LLMs. They deliberately chose to upsample Wikipedia content due to its perceived high quality. 🧩 The challenge: As the volume and diversity of data used in LLM pre-training continue to expand, the task of determining the ideal data mixture becomes increasingly complex. And the manual approach to data selection may result in suboptimal choices. 🔬 Key research question: How can we decide on a high-performing data mixture for training LLMs in a scalable and automatic manner? > Gao et al. 2020. The Pile: An 800GB Dataset of Diverse Text for Language Modeling, (1/n)

Qian Liu's profile picture
Qian Liu2 years ago

Core idea: small to large generalization 💡With the challenge of selecting the optimal data mixture in mind, our core idea is straightforward: train and identify the best-performing small-scale models using different data mixtures, and then directly generalize those findings to large-scale model training. (2/n)

Qian Liu's profile picture
Qian Liu2 years ago

RegMix: Data Mixture as Regression Concretely, our method RegMix treats data mixture selection as a regression task. Here's how it works: 1⃣️Train some small-scale proxy models on various data mixtures for few tokens 🐣 2⃣️Fit a regression model using these results 📈 3⃣️Use the regression model to predict the best mixture for large-scale training 🔮 4⃣️Train the large-scale model on this optimized mixture 🚀 The procedure of small-scale proxy model training requires only ~2% of the computational cost (in FLOPs) of the final large-scale model training. To visualize the procedure, we provide a concrete example using Hacker News, GitHub, and PhilPapers as the training domain. The validation loss on StackExchange is used as the target metric to optimize during the proxy model training phase. (3/n)

Qian Liu's profile picture
Qian Liu2 years ago

Regression Works Well Across Model Scales 🏎️What's particularly exciting about RegMix is its efficiency. It allows you to explore a vast space of potential mixtures (even with 40+ domains) by training only a small number of models. Specifically, training models on 1M models with 1B tokens can predict the performance of 256x 1M models trained on unseen data mixtures with 98.45% correlation. Moreover, RegMix can automatically identify the best-performing data mixture among 64x 1B models with 25B tokens before actually training them💡💰. (4/n)

Qian Liu's profile picture
Qian Liu2 years ago

Insight 1: Data mixture significantly impacts downstream performance We experiment with 64 models, each with 1B parameters trained on different data mixtures, and evaluate their performance across various benchmarks. The results show that data mixture significantly impacts downstream performance - up to 14.6% difference on some tasks! 😮 (5/n)

Qian Liu's profile picture
Qian Liu2 years ago

Insight 2: Web corpora benefits downstream performance the most Web corpora like CommonCrawl 🌐 surprisingly show the strongest positive correlation with downstream performance for language models, even more than curated sources like Wikipedia! 📚 This pattern holds across most web domains, suggesting the diversity of CommonCrawl drives today's LM success. 🚀 Moreover, whether it's gaming sites like IGN 🎮 or YouTube 📺, they exhibit similar patterns. But seem to follow different trends. (6/n)

Qian Liu's profile picture
Qian Liu2 years ago

Insight 3: Domain interactions are challenging for humans to understand Domain interactions are complex and often counterintuitive, highlighting the need for automated approaches like RegMix. 🧩 For example, the PhilPapers domain appears to provide gains for all other domains under linear regression modeling, which challenges intuitive human understanding. 🤯📚 So, what is PhilPapers? It is a database for philosophy … (7/n)

Qian Liu's profile picture
Qian Liu2 years ago

RegMix considers the token availability 🔑Previous data mixture methods struggle to balance token availability and usefulness. However, RegMix can easily control token availability by controlling the simulation space - especially considering the 4 epoch practise by Niklas et al. 2023 🔬For example, you can easily set the maximum weight of HackerNews to 12% in the simulation if you can afford to repeat it for 4 epochs and its token count is 3% compared to your expected training tokens. > Niklas et al. 2023. Scaling Data-Constrained Language Models, (8/n)

Qian Liu's profile picture
Qian Liu2 years ago

RegMix is already applied in 14B model 🔬 While our current paper was conducted to models under 1B parameters due to computational limitations, we successfully applied the same data mixture approach in our Sailor paper (Dou et al. 2024). 🚀 Notably, we discovered that the optimal data mixing strategy identified using 0.5B proxy model demonstrated impressive scalability, performing effectively across models up to 14B parameters! 💪 > Dou et al. 2024. Sailor: Open Language Models for South-East Asia, (9/n)

Qian Liu's profile picture
Qian Liu2 years ago

We release code, data, and all models As always, we make all materials publicly available, including code, data, and all models. 🎮 Demo: 📄 Paper: 💻 Code: 📊 Model & Data: (10/n)

Qian Liu's profile picture
Qian Liu2 years ago

Try RegMix on your dataset We also provide an instruction on how to apply the RegMix method to your dataset, and please try it and leave comments here! (11/n)

Qian Liu's profile picture
Qian Liu2 years ago

Acknowledgement This work cannot be done without the awesome @xszheng2020 (co-first author), @Muennighoff , Guangtao Zeng, @LongxuDou , @TianyuPang1 , Jing Jiang and Min Lin. Thanks to all the team members for their support❤️ (12/n)

Related Videos

Introducing SoftMatcha 2: A Fast and Soft Pattern Matcher for Trillion-Scale Pre-Training Corpora What lies within a trillion-scale pre-training corpus? Can you truly guarantee your benchmarks are uncontaminated simply because there are no exact string matches? Alongside several research institutions in Japan, Sakana AI is proud to have collaborated in the development of SoftMatcha 2, an ultra-fast and flexible search tool that enables search over trillion-scale natural language corpora in under 0.3 seconds, even while handling semantic variations (substitution, insertion, and deletion). No existing tool meets all these criteria, including infini-gram-mini (EMNLP’25 Best Paper) or the original SoftMatcha (ICLR’25). Our approach employs string matching based on suffix arrays that scales well with corpus size. To mitigate the combinatorial explosion induced by the semantic relaxation of queries, our method is built on two key algorithmic ideas: fast exact lookup enabled by a disk-aware design, and dynamic corpus-aware pruning. As a practical application, we demonstrate that SoftMatcha 2 identifies potential benchmark contamination in pre-training corpora that existing exact-match approaches miss. You can try searching through a 100B-scale corpus via our online demo. The system remains blazingly fast even on trillion-token corpora, so we encourage you to host it yourself for larger scales. Demo: Paper: Code: This work is a collaboration with researchers from the University of Tokyo, NII, Kyoto University, SOKENDAI, NINJAL, Tohoku University, and RIKEN.

Sakana AI

101,614 views • 5 months ago

New Course: Post-training of LLMs Learn to post-train and customize an LLM in this short course, taught by Banghua Zhu, Assistant Professor at the University of Washington University of Washington, and co-founder of @NexusflowX. Training an LLM to follow instructions or answer questions has two key stages: pre-training and post-training. In pre-training, it learns to predict the next word or token from large amounts of unlabeled text. In post-training, it learns useful behaviors such as following instructions, tool use, and reasoning. Post-training transforms a general-purpose token predictor—trained on trillions of unlabeled text tokens—into an assistant that follows instructions and performs specific tasks. Because it is much cheaper than pre-training, it is practical for many more teams to incorporate post-training methods into their workflows than pre-training. In this course, you’ll learn three common post-training methods—Supervised Fine-Tuning (SFT), Direct Preference Optimization (DPO), and Online Reinforcement Learning (RL)—and how to use each one effectively. With SFT, you train the model on pairs of input and ideal output responses. With DPO, you provide both a preferred (chosen) and a less preferred (rejected) response and train the model to favor the preferred output. With RL, the model generates an output, receives a reward score based on human or automated feedback, and updates the model to improve performance. You’ll learn the basic concepts, common use cases, and principles for curating high-quality data for effective training. Through hands-on labs, you’ll download a pre-trained model from Hugging Face and post-train it using SFT, DPO, and RL to see how each technique shapes model behavior. In detail, you’ll: - Understand what post-training is, when to use it, and how it differs from pre-training. - Build an SFT pipeline to turn a base model into an instruct model. - Explore how DPO reshapes behavior by minimizing contrastive loss—penalizing poor responses and reinforcing preferred ones. - Implement a DPO pipeline to change the identity of a chat assistant. - Learn online RL methods such as Proximal Policy Optimization (PPO) and Group Relative Policy Optimization (GRPO), and how to design reward functions. - Train a model with GRPO to improve its math capabilities using a verifiable reward. Post-training is one of the most rapidly developing areas of LLM training. Whether you’re building a high-accuracy context-specific assistant, fine-tuning a model's tone, or improving task-specific accuracy, this course will give you experience with the most important techniques shaping how LLMs are post-trained today. Please sign up here:

Andrew Ng

125,146 views • 1 year ago

Elon Musk On What It Takes To Build A Competitive AI Model Elon Musk breaks down the three factors that decide whether a foundation model can compete, and why the next frontier isn't human data at all. Speaking with Garry Tan, President and CEO of Y Combinator, Elon lays out what's actually required to build a large foundation model that's competitive: "You've got to get a lot of GPUs and have them train coherently and stably. Then it's like, what unique access to data do you have? I guess distribution matters to some degree as well like, how do people get exposed to your AI? Those are critical factors." But there's a problem with the data part of that equation. Echoing what a friend in the field has said, Elon explains that the industry has essentially run out of human-generated pre-training data: "You run out of tokens pretty fast, certainly of high-quality tokens. And then you need to essentially create synthetic data, and be able to accurately judge the synthetic data that you're creating, to verify: is this real synthetic data, or is it a hallucination that doesn't actually match reality?" That verification step is the hard part: "Achieving grounding in reality is tricky. But we are at the stage where there's more effort put into synthetic data. Right now we're training Grok 3.5, which is a heavy focus on reasoning." On reasoning, Garry Tan adds an interesting detail from researchers he's spoken to: hard science, particularly physics textbooks is very useful for training reasoning, whereas social science is "totally useless" for it. Elon's response: "Yes, that's probably true." He then points to where all of this is heading: "Something that's going to be very important in the future is combining deep AI in the data center or supercluster with robotics. So, things like the Optimus humanoid robot."

High Signal AI

21,377 views • 5 days ago

Perplexity CEO Aravind Srinivas on the biggest threat to the data center industry: It's not competition. It's not regulation. It's decentralisation. "The biggest threat to a data center is if the intelligence can be packed locally on a chip that's running on the device and then there's no need to inference all of it on like one centralized data center." He outlines how this could work in practice. Personalisation doesn't necessarily require on-device model training. Retrieval augmented generation, tool calls, and local data can already tailor AI to individual users. But the real unlock? Test time training. Aravind Srinivas describes a future where AI lives on your device, watches how you work and gradually automates your repetitive tasks. "Imagine we crack test time training where the AI watches tasks you repeatedly do on your local system, adapts to you over time and starts automating a lot of the things you do." The key insight: in this model, the intelligence belongs to you. It's your data, your device, your personalised AI brain. And if that future arrives, the economics of centralised infrastructure start to collapse. "That really disrupts the whole data center industry. It doesn't make sense to spend all this money, 500 billion, 5 trillion, whatever on building all the centralized data centers across the world that do a lot of the intelligence workloads for people." The companies spending trillions on centralised infrastructure may want to rethink where intelligence actually needs to live.

Big Brain AI

90,102 views • 5 months ago

Larry Ellison just told every AI company on Earth they’re fighting the wrong war. The entire industry is racing to build the smartest model. More parameters. Better benchmarks. Faster inference. Ellison isn’t building a model. He’s controlling what every model needs to be useful. Every frontier AI trains on the same public internet. Same scraped pages. Same recycled text. When everyone has the same data, it’s not an advantage. It’s a floor. The only data that creates separation is private. Medical records. Financial models. Defense systems. Proprietary research locked behind firewalls for decades. That data already lives inside Oracle databases. Not Google’s. Not Microsoft’s. Not Amazon’s. Ellison didn’t enter the model war. He positioned himself above it. He rebuilt the database so AI can reason on private data without ever absorbing it. Training folds your data into the model permanently. Once it’s in, it never comes back out. Reasoning thinks with your data and hands back only the answer. The data never moves. One is surrender. The other is sovereignty. Ellison: “These are remarkable electronic brains.” He didn’t build the brain. He owns what the brain needs to think. Everyone is building the most powerful mind in human history. A mind is only as valuable as what it’s allowed to know. Own the knowledge and it doesn’t matter who builds the brain. That pattern has held through every era of human civilization. AI doesn’t break it. It proves it.

Dustin

97,461 views • 13 days ago

Reinforcement Learning from Human Feedback (RLHF) is gaining traction. This field aims to make AI more responsible by including human values and preferences. In this video, Nathan Lambert, a research scientist and RLHF team lead at Hugging Face explores its inner workings, applications and industry impact. RLHF has gained the spotlight in recent years. The growth of language models like Anthropic’s Claude and OpenAI's ChatGPT have increased interest in human-feedback integration. "There are some rumors that Open AI had two teams; one was doing RLHF and the other instruction fine-tuning. And the RLHF team kept getting more and more performance." Understanding RLHF The RLHF process has three main steps: Pre-training: Much like with GPT models, the journey starts with pre-training on a large corpus of data. This can range from text data, web scrapes, to specialized datasets. Reward Modeling: This is the RLHF counterpart of supervised fine-tuning in large language models. This stage involves creating a reward model that resonates with human values and preferences. RL Optimization: This stage parallels reward modeling and reinforcement learning in traditional AI models. The AI system fine-tunes itself based on the reward model, employing reinforcement learning algorithms for that extra layer of optimization. The Data Challenge Data collection and curation in RLHF closely resemble the challenges you'd encounter in large language model training. Datasets from organizations like OpenAI can serve as a useful foundation. However, the need for high-quality, task-specific data cannot be overstated. Implementing RLHF: A Practical Guide If you’re someone who loves getting hands-on with AI libraries like Hugging Face, implementing RLHF is right way to do. It’s essential to understand its limitations. Think about model stability, over-optimization, and exploration strategies, much like you would when prompt engineering. Ongoing Research and Next Steps While he suggests that some basics figured out, there are layers of complexity that still need to be unraveled: 1. New Benchmarks: How do we measure the effectiveness of RLHF? 2. Preference Modeling: How can the model be made to understand human preferences better? 3. Interpreting RLHF: Much like explainability in traditional models, how do we make RLHF more interpretable? 4. System-Wide Evaluation: Going beyond individual performance, how does RLHF affect an entire system? The Transformative Power of RLHF Whether you're an AI developer, a business analyst, or a marketer, RLHF promises to revolutionize your domain. Imagine customer service chatbots that understand human emotions better, or content generators that align more closely with human values. RLHF is an emerging field that focuses on enhancing machine learning models through human feedback. While it tackles important issues like bias and ethics, its broader goal is to improve system performance across various applications. Whether you're deeply invested in the ethics of AI or simply curious about advancements in machine learning, RLHF offers valuable insights. If you're interested in the next wave of AI development, this area is definitely one to watch.

Muratcan Koylan

27,005 views • 2 years ago