Why AI Agents Need Million-Token Context — Thomas Wolf & Olive Song, MiniMax https://www.youtube.com/watch?v=5Cxe5dv2Xlw AI Engineer · 20 min · 257 sentences · sentence-level transcript from YouTube's caption track; each line begins at the time shown [00:01] [music] [00:12] Joining us on stage is the co-founder and chief science officer at Hugging Face, Thomas Wolf. [00:20] [music] [00:26] [music] [00:32] Hello everyone. [00:33] Hello Olive, nice to have you on stage. [00:36] Hi, nice to meet you. [00:37] Thanks for having me, yeah. [00:38] So I think you're on for a treat today because you just saw a GLM uh which is current number two on the artificial intelligence leaderboard. [00:48] I take Fable out because nobody can use it. [00:51] And now we have number four. [00:52] So you basically you will have all the top models, at least the top open source model in a row. [00:57] And we're very lucky to have Olive who has a pretty amazing path in life. [01:04] Uh so she came to the US, Pennsylvania. [01:06] She was studying, doing PhD at uh NYU uh in the lab of Jan LeCun working on J Pa, but we decided we won't talk about J Pa today, right? [01:17] Something for another day. [01:19] Um and then instead of joining Hugging Face, which was in New York also at that time she decided to go join MiniMax. [01:28] So for those who who maybe don't know all the all the neo labs around the world and you're you're forgiven because I think there's like 64 neo labs right now. [01:38] MiniMax is one of the top of what we call the AI dragons in China. [01:43] So these are the new there's there's Deep Seek which is very well known now, Moonshot who does Kimi Z and GLM that you just saw and now we have a MiniMax. [01:53] They're all extremely good, extremely a team uh fighting for the first spot. [01:59] Uh so the the the latest uh release of MiniMax was M3 uh just earlier earlier in June, which was the the top model at the time, top open-source model. [02:09] Uh very impressive. [02:10] There's a lot of very interesting things about this model, so we'll quickly dive in them. [02:15] And then talk a little bit about uh what's what's what's specific about MiniMax, what's what's great there. [02:22] So uh maybe Olive to to start a little bit. [02:25] Can you Can you give us, you know, a a little bit of your your view of of M3, what you like about this model, how was the release? [02:33] Mhm. [02:34] Yeah, M3 we released M3 earlier this month, and it is a smaller model with 400 around 400 billion total parameters and 20 billion activated. [02:45] Um but it is very capable in terms of both coding performances, and also it understands vision. [02:52] So um that's uh what open-source models don't usually have. [02:58] It's that they can the model can only deal with coding, but it can also understand videos, um images, and it has a super uh long context of 1 million. [03:09] Um with our new architecture called MSA, MiniMax Sparse Attention. [03:14] So we we really put these three things together uh because we know that they are they will be very important in future AI applications. [03:25] Coding capabilities, agentic capabilities, longer context, and multimodal understanding. [03:32] Um yeah, I think that would be very interesting about the model. [03:35] Yeah, so so there's a lot to unpack unpack in this model, and it's um it's it's still, I think, the only top five model open-source model that is actually multimodal, so we need to talk about that. [03:46] But maybe first about the long context, because that was also the first one that really had this real 1 million token long context is actually functional and you guys had also the the Minimax pass attention [03:59] which is this one technique to to make that efficient that you also published and and share extensively. [04:05] So can you can you talk a little bit about this? [04:07] Maybe how the project went from from the attention how to make this long context. [04:12] Yeah, I would say the story about long context went back to even Minimax M1 and Minimax 01 where the model was actually was able to perform tasks of 10 million [04:25] token context. [04:26] 10 million? [04:26] 10 million, yes. [04:28] But then it was not an agentic model, right? [04:31] It was just 10 for example, you dump in a book, it would be able to give reviews on it and stuff like that. [04:37] So what we realized was that, you know, longer context actually unlocks a lot of capabilities especially when interacting with users and now when, you know, the agent is interacting with the whole environment and getting all the tool responses, [04:54] getting multi rounds the like shorter context wouldn't be enough to perform the complex task. [05:04] So for this version we said, "Oh, we have to have our longer context backs." [05:10] So what we pursued was with our Minimax sparse attention. [05:15] Um which you know, was the architecture that was scalable and had a simple design. [05:24] So I would say from a higher level, right? [05:27] It has an index branch that, you know, selects on a higher level what is what matters more in the context and then we have a sparse attention branch that calculates performs the calculation on the selected blocks [05:43] to actually performs the task. [05:45] Um and so yeah, like that we really designed um an elegant architecture so that we can scale the length and then scale the model size in the future with that. [05:57] That's beautiful. [05:58] I like how for those who've been in the field for quite some time, we we had a lot of work on attention, right? [06:03] This N square and there was a lot of linear attention. [06:06] Yeah. [06:06] And then some that somehow all of these disappeared at some point when flash attention came around. [06:11] We discovered we just needed more efficient camera. [06:13] Now, I like how we come back to thinking, you know, first principle, what is attention? [06:18] How can we make that more efficient? [06:20] So, 1 million token is crazy, right? [06:23] GPT-2 was 1,024 and and everyone was like, "Oh, that's really big. [06:27] We we we never need more." [06:29] Where do you see this coming? [06:30] Like, going in the future? [06:31] Like, Jeff Dean was pitching me the other day a trillion token attention. [06:35] You think we should go to a trillion token attention? [06:38] So, that's definitely something we can explore towards, right? [06:42] Ultra lengths of the context. [06:44] Definitely, it's something that's very exciting to explore with. [06:47] And something that architecture design along with hardware um would require a lot of research onto that. [06:54] Yeah. [06:54] You think there's still a lot of low-hanging fruits? [06:57] So, typically today we saw Open AI really reducing I mean, we don't know how as of firm, but like reducing their their inference bill by half, by probably having some more efficient processing around tensions of any type. [07:09] You think there's still a lot of low-hanging fruit that can be getting um how we can process that. [07:14] So, so one one thing we're still very interesting about M3 is how cheap it is in particular because of this part attention and part because of its small one, but it's also very efficient. [07:23] Right. [07:23] You think we can go even way further? [07:25] And maybe how did you guys invented uh Min Max Fast Attention? [07:30] Was it an agent coming up with the idea? [07:32] Was it a human still coming up with the idea? [07:34] Tell us a little bit about [07:35] Yeah. [07:36] Um, so we do think there's still a lot of work that can get into architecture and inference optimization so that the model can be more efficient, especially if there are tasks that are very task sensitive [07:49] but require very strong capabilities, right? [07:52] And for that those kind of tasks we really want model to be efficient. [07:57] Um and who came up with this part of actually I think an intern from our team worked on that. [08:03] That yeah, an intern. [08:05] Uh that doesn't usually happen in a lot of labs because I think in some labs interns don't have access to the data, the work, and stuff. [08:15] Uh but yeah, we are open to anyone who would like to contribute to our models. [08:20] So, um the architecture was actually designed by an intern. [08:24] It's very good. [08:25] Still some work for interns here. [08:27] Good good news. [08:28] Um that's also a good segue to also how Min Max is working internally. [08:32] So, so we were discussing before coming on stage I was saying everyone can propose a project. [08:38] Can you tell us a little bit about how you are organized, how you do your research? [08:42] Mhm. [08:42] Mhm. [08:43] I think that is very different from uh even in school or even in earlier you know, the earlier tech companies is pretty pretty different. [08:54] It's that um what we what we make sure is that we have good foundation and good um infrastructure so that anyone can play with the model and can think of what they can improve with the model. [09:08] And then after model releases when they are free, right? [09:11] They can play with the model. [09:13] They can think of their own evaluations. [09:16] They can find their own weaknesses and propose a thing that they want to improve on the model. [09:21] And then other people who are interested in that would, you know, propose to join the project and they will work on for a couple of weeks or even a couple of months. [09:30] And when they work out, the final thing is shipped to our model. [09:34] It it is, you you we use that in our final training and it's shipped out to the audience. [09:39] Interesting. [09:39] So, you can have people working for a really long time on project. [09:42] When you say a couple of months, it can be like really deep exploration of [09:46] Yes. [09:46] Yes. [09:48] I would say, for example, architecture might require longer time of investigation, research, experiments, even redoing the evaluations for pre-training. [09:58] Yes, so it might require longer time. [10:00] Very nice, yeah. [10:01] And I know you're also very big on evaluation. [10:03] I agree. [10:03] We could talk about that. [10:04] I think what One thing probably related to that is this unique specificity that M3 and your team has um around multimodality. [10:12] So, not just text, but the similar can also understand image and video. [10:16] And as I understand, but but please explain explain better, when you read the model card on Hugging Face, it say the model was trained from the first step as a multimodal, not just have a like user one as after solved, right? [10:28] Can you tell us a little bit more about that and why you think it's important and and and why starting from the first step on multimodal training and not just just training this. [10:37] Um so, we call it native multimodality. [10:40] Um and so, it is somehow typical for model labs to train the multimodal, let's say, vision understanding capabilities after the text pre-training is done. [10:54] Um they put adapters and then train that part. [10:57] But what we found out was that that would actually harm the text performance. [11:03] And the vision vision understanding performance wouldn't converge that well because the model is kind of converges towards the model the text understanding. [11:12] Um and it's just not the most optimal. [11:15] And also not the most scalable, if you think about it. [11:18] We want to scale the data, right? [11:20] And also, we can also some labs um train this capability from halfway through the pre-training. [11:27] For example, continued pre-training. [11:30] But what we found that this would be very, you know, uh recipe sensitive. [11:36] It is different for the recipe would be different for different architectures, different, you know, data mixtures, different learning rates. [11:44] It's hard to control, hard to, you know, scale to you can't really scale your experiment results and conclusions to a larger model. [11:55] And so you know, what we thought was why not just training from the very first step? [12:01] That comes to the most natural. [12:04] We know that a lot of labs run into problems doing that. [12:08] The model would collapse after a couple of steps of training, you know, both text and vision understanding, but we managed to solve that problem. [12:18] We did a lot of work on VIT and we did a lot of work on the data that we actually training. [12:26] For example, we do interleave the data, what we call interleave the data. [12:31] It's actually natural data, but we keep the images and videos in instead of masking it out and we do some pretty good cleaning and masking on the data and we do very good reward modeling [12:45] so that we train it from the first step and scales up a lot. [12:50] Yeah, it does does not collapse. [12:53] That's really impressive. [12:54] Impressive. [12:55] Should we Should we expect much larger model in the future? [12:58] So this one is still fairly small, right? [13:00] It's It's 428 billion parameters, 23 active billion. [13:05] Well, do you think you will go past the trillion? [13:09] Definitely. [13:10] Yeah, definitely in the future. [13:13] There are many tasks that wouldn't be able to the more model wouldn't be able to perform very good at with smaller parameters. [13:22] We are definitely going more ambitious than this. [13:25] It's great. [13:26] Looking forward. [13:27] Um another interesting thing I I always been find fascinating about Min Max is how how you also have this whole range of of apps and product, right? [13:36] So, I remember already So, so Min Max started to open source things on the on the hugging face platform in in January last year. [13:43] So, that 18 month ago and and we were chatting a little bit about the team to understand what you were doing and I remember you So, you were already having a huge usage [13:52] on some of these of some of these apps. [13:55] Um can you tell us a little bit how how this started, right? [13:58] So, was it basically you had a lot of apps and then you thought we have we have all this data, why not training a model and then they build up research team. [14:05] How is how is the story there? [14:07] Um our our story is modeled from the first day. [14:12] So, um I believe that multi-modality model a model that can understand all visions and outputs all modalities was the first thing that our um CEO planned on the first day even before the company even started. [14:26] So, that was the dream of AGI. [14:27] I think that was very very early even before ChatGPT came out. [14:31] Wow. [14:31] Um yeah. [14:33] And then apps were something that comes along because you have some model capabilities you want people to experience it well. [14:40] Not many people can use it with API, right? [14:43] We can't expect everyone to experience with API. [14:46] So, we need good um user interaction, you know, interfaces, good apps, good scenarios that people can can you know, experience experience model with. [14:58] I think actually those apps covered more than 300 million people around 200 countries globally. [15:07] And I think over a million companies as well. [15:10] Yeah, this was a mind-blowing when I heard about the the size and we we don't often realize the size of of of this type of usage already. [15:17] And and that I kind of brings me to the question around um open source business model, and and all of that, which is the always existing question, which is right now it's nice to open source model, but you you also need to have some revenue stream, right? [15:34] So, I guess M3 is something you you decided, for instance, to be for free, and I'm I think it's it's it's great for the world. [15:41] Um how do you see this? [15:42] Do you also have some specific models you use for the app? [15:45] Do you think about Do you think in the future you'll keep It's probably hard to say for sure, but do you think you'll keep open sourcing models? [15:52] How is the culture around open sourcing right now? [15:55] Personally, and also for the model research team, we always hope to open source the models. [16:01] Um that is our plan. [16:03] Because we really see how the open source community together can help the model build better. [16:09] For example, we receive a lot of um feedbacks on the model performance from the great community, and we receive PRs on uh wh- whatever we open source. [16:20] And those are very very valuable and come comes to our later versions. [16:24] So, definitely open sourcing is great. [16:27] That's great. [16:28] And actually, do you have some ask for the audience, people who are using uh M3 or MiniMax? [16:33] Is there something you would love them to send back to you as feedback? [16:38] Do you Do you, for instance, do you read when people try to modify the models or play around, you know, tweaks? [16:44] Or what is the best thing you you think you can take from the community uh for future models, for instance? [16:50] Mhm. [16:51] I would say whatever um issues that people are running into, especially with multimodality, right? [16:57] This is the first time that we're combining it together. [17:00] We are definitely going more ambitious on that in the future. [17:03] It might have some flaws right now, but we are improving on that. [17:06] So, whatever that's uh feedback that model is not good doing that great, we will definitely improve that in future versions. [17:13] And also, whatever features that uh people want. [17:17] Say, you know, for example, thinking effort. [17:21] Right? [17:21] Some people ask for that. [17:23] Um like everyone can ask, and we will try to accomplish that in the future models. [17:29] Yeah. [17:29] Do you see a lot of usage right now already in multimodality in terms of coding agents? [17:34] I feel like it's it's a little bit un- underexplored. [17:38] It is It is, but um it can actually unlocks a lot of capabilities and a lot of uh agent applications. [17:47] Say that for example, you want a model to read a PP- PowerPoint, uh or to read some report that is not very structured. [17:55] Um and you want it to understand a very long video, say that you dump in a long-playing video, and then you want the model to act uh using some tools [18:05] uh after understanding it. [18:07] And it unlocks a wide variety of um agent use cases. [18:12] So, like the agent could finally watch my YouTube tutorial and understand how to use my coding tools, how I described it? [18:18] Is it something like that? [18:20] Uh [18:21] Could the agent finally watch YouTube tutorials and understand things from them? [18:25] Yeah, yeah, yeah. [18:26] I think so. [18:27] Do you use a lot of uh agent coding tools internally? [18:30] Is it like I mean, coding for sure, but like is it also already in terms of research? [18:35] Is it automated part or not? [18:37] How How does this uh [18:38] Yes. [18:39] work? [18:39] Um we have our own research harnesses. [18:42] Um we build our own research harnesses that automate our workflows. [18:46] I would say a lot of our workflows are automated. [18:49] You can see how um the latest frontier models all pursues capability less kernel optimization, right? [18:57] Like let the model post string other models. [19:01] Um let the model build data. [19:03] Auto data, stuff like that. [19:05] Um you can see how more and more models are capable of doing those, including M3. [19:11] Actually, we were very good at those cases, longer horizons and coronal organizations. [19:16] Um and so we can use that model capability, harness it together, and help with our um daily routine, and make our iterations even faster. [19:27] Is M3 building M4 already? [19:29] Um building M3.1. [19:32] M3.1, okay. [19:33] [laughter] [19:34] Let's hit the gym. [19:34] Already. [19:36] Um I I would love to finish on what what you find exciting in the coming month, what what do you think it it can be Asia in terms of feature [19:45] or or things you want to see happening in in AI or more generally in terms of whatever whatever really is top of your mind I would say and it's going to [19:54] happen. [19:55] A lot of things are very exciting. [19:58] Um but what I recently find the most exciting would be a multi-agents that I think a lot of AI applications are using, model routing, multi-agents um that allows even more capabilities, [20:12] even more complex tasks, and also it tells us what the models are capable and not capable of, and you can, you know, do a lot of things with that. [20:23] It's pretty exciting. [20:24] Thanks a lot, Alif. [20:26] Pleasure to have you. [20:27] Thanks for having me. [20:28] Thanks, everyone. [20:30] [applause]