MiniCPM5-2B: The Best Sub-Agent Model Yet? — Transcript
Full transcript
- 0:00Okay, so a few months ago MiniCPMQ
- 0:03released their 1B model and I covered
- 0:05this on the channel talking about the
- 0:07whole concept of sort of having a small
- 0:10cognitive model that could do a lot of
- 0:12different things. Well, after a few
- 0:14months they are back with a new model
- 0:17and they've jumped from 1B to 2B here.
- 0:21In fact, I think it's actually a 2.5B
- 0:23model, but we'll give them that. So,
- 0:26this is the second model in this mini
- 0:28series from OpenBMB. And in many ways
- 0:32they've taken the same sort of recipe,
- 0:33but they've scaled it from 1B to 2B. So,
- 0:37I guess the big question here is when
- 0:38you scale the data and post training
- 0:41recipe by 2x, does that suddenly make
- 0:44this model a lot more viable for the
- 0:46hard function calling and along with
- 0:49that 2x scaling, does the agentic stuff
- 0:52scale as well? So, the interesting thing
- 0:54here is that the 1B model was pitched at
- 0:58sort of coding agents and tools use. The
- 1:002B model is claiming to be 4B models at
- 1:05the same kind of thing. If we come in
- 1:07here and look at their benchmarks, we
- 1:08can see that they're edging out Qwen
- 1:103.5B
- 1:12on things like SweetBench verified, etc.
- 1:15Now, when we look at the training
- 1:16recipe, it seems to be mostly the same
- 1:19and it seems that these scaling
- 1:20improvements really did sort of have an
- 1:22effect here. In fact, in some places
- 1:25more than I expected. So, let's take a
- 1:27look at this stuff. So, where the
- 1:29supervised fine-tuning for the 1B was
- 1:31200 billion deep thinking tokens and 200
- 1:35billion hybrid tokens, the 2B has gone
- 1:38for 400 billion tokens of deep thinking
- 1:41only. But, we can see where some of
- 1:42these changes have come in both the RL
- 1:45and the on-policy distillation here. We
- 1:48can see that they've changed up how
- 1:49they're doing the RL stage. So, they've
- 1:52got this new thing called RL2. It looks
- 1:54like they're going to release a whole
- 1:56paper about this. This is just sort of
- 1:58like an early pre-print here. And the
- 2:00key thing here is that they've changed
- 2:01how they're doing this here to basically
- 2:03include a critic in the RL as well. All
- 2:06right, so if we take a look at their
- 2:07training recipe, we can see that they
- 2:10have this sort of pre-training and
- 2:13mid-training here. And we can see that
- 2:15that's basically setting up the model
- 2:16for the post-training processes. So if
- 2:19we look at the post-training, the
- 2:20post-training is breaking down to three
- 2:22different parts, right? You've got your
- 2:24standard SFT. This is sort of providing
- 2:27the format for outputs, providing sort
- 2:30of some of the key thinking behavior,
- 2:32etc. They then do RL per domain. So
- 2:36they've got multiple experts that
- 2:37they're doing the RL and the on-policy
- 2:39distillation stuff from there. And we
- 2:42can see that those are sort of breaking
- 2:43down into sort of reasoning task RL,
- 2:47general task RL, and agentic stuff
- 2:49there. And the key thing with that is
- 2:51that each of those experts only needs to
- 2:54be good at one thing. This is the new
- 2:57form of RL here, this critic-based just
- 3:00RL2. And then they're claiming that this
- 3:03actually has better stability than the
- 3:05sort of traditional GRPO stuff. But it's
- 3:08interesting that this is showing here
- 3:09that this makes the model a lot better
- 3:12on a lot of their different benchmarks.
- 3:14Now finally, they have their on-policy
- 3:15distillation layer. Here the model is
- 3:17sampling out its own trajectories that
- 3:19were used to train the teacher models.
- 3:22And then from that, they can then
- 3:23basically look at how different it is to
- 3:25the teacher models and then update in a
- 3:27loop, etc. So when we go back into the
- 3:29benchmarks, they're doing a lot better
- 3:32than obviously a lot of the 2B models,
- 3:34but they're doing very well compared to
- 3:37a lot of the 4B models in here. And so
- 3:41the trade-off here is that it's not a
- 3:42huge amount to go from 1 to 2B if we're
- 3:45getting a model that's substantially
- 3:46better and now also has things like
- 3:49general knowledge in it. If we come down
- 3:51and look at the things like the GBQA
- 3:53diamond, etc., we've got a model now
- 3:56that, okay, is a bit behind the 4B
- 3:59model, but this is way ahead of the
- 4:01other sort of 2B models that are out
- 4:03there. And of course, it's miles behind
- 4:06the frontier models that are well up
- 4:08into the high 90s, etc., at this point,
- 4:10but not that long ago, this kind of
- 4:12score was considered a good score for
- 4:15models that were 10x to 100x bigger than
- 4:18this particular model. Now, the cool
- 4:20thing here is that they've released a
- 4:22bunch of different versions of this
- 4:24model. You've got sort of the final
- 4:26model that's got everything in it.
- 4:28You've got just the SFT models before
- 4:31RL. You've got mid-training models.
- 4:33You've got the base model in there. And
- 4:35then you've got a bunch of quantizations
- 4:37and a deep spark model in here, which is
- 4:40good for the speculative decoding, etc.
- 4:42Of course, one of the good things about
- 4:43this size of model is that it's very
- 4:45easy to fine-tune for your specific use
- 4:47case. Then you face the challenge of
- 4:50what if you wanted to have that
- 4:50fine-tune on whenever you wanted to
- 4:52access that? And that actually brings me
- 4:54to today's sponsor. So, one of the
- 4:56things that you often want to do is get
- 4:58a model like this set up as an OpenAI
- 5:01compatible API that scales. And that's
- 5:03where RunPod Serverless comes in. So,
- 5:06thanks to them for sponsoring this
- 5:07video. Let me just show you how quickly
- 5:09you can go from having a model on
- 5:11Hugging Face to being able to deploy it
- 5:14to VL on a serverless endpoint with a
- 5:17GPU that you choose. So, you can see
- 5:19here that I've picked the model from
- 5:20Hugging Face. I now have to pick a GPU
- 5:22with enough memory to run it on. Then I
- 5:25can just set my scaling limits and
- 5:27create an endpoint. Once it's ready, I
- 5:29can now send a prompt and the model
- 5:30returns a response. It's literally that
- 5:33easy to have an API that my applications
- 5:35or my agents can call. Behind the
- 5:37scenes, RunPod routes the request to a
- 5:40worker running my model on a GPU. And if
- 5:42demand grows, RunPod can automatically
- 5:45scale up those workers within the limits
- 5:47that I've set. And if I don't use it for
- 5:49a while, it can scale it back down to
- 5:51zero. The cool thing here is whenever I
- 5:53ping a new request, the model will spin
- 5:56up and then be able to serve it.
- 5:58Computers billed by the second while
- 6:00workers run, so you don't have to keep a
- 6:02GPU rented around the clock. They also
- 6:04have flash boot, which helps reduce cold
- 6:06starts. And if responsiveness is the key
- 6:09priority, I can actually pay to keep the
- 6:11workers running and ready all the time.
- 6:14So, all of this just gives you the
- 6:15control to serve the model where the GPU
- 6:17infrastructure is all managed for you,
- 6:20and you only have to pay for the time
- 6:22that you're actually using it. If you're
- 6:23building any AI app or deploying your
- 6:25own model, check out RunPod Serverless
- 6:28at the link below and get started today.
- 6:30All right, so did everything actually
- 6:32scale here and this clearly is beating
- 6:344B models? Actually, the answer is no.
- 6:36If we look at things like SweetBench
- 6:38Pro, we can see that the Qwen model is
- 6:41substantially better than this,
- 6:43basically double it. And if we look at
- 6:45Terminal Bench, we can see that the
- 6:47model is way behind the Qwen model. But,
- 6:49it still is a lot further advanced than
- 6:52a lot of the other 4B models out there.
- 6:54And don't forget that the Qwen models
- 6:55probably have a much bigger budget for
- 6:57pre-training, for a lot more tokens, for
- 7:00a lot more things like that.
- 7:02Unfortunately, we haven't seen the
- 7:03really small Qwen models being updated
- 7:06to say the 3.8 models. Hopefully, that's
- 7:09going to come with the not too far off
- 7:11Qwen 4 models. So, let's jump in and
- 7:13have a look at the speed of this of
- 7:14running it locally. Have a look at just
- 7:16how it actually does on some of the
- 7:17function calling and some of the agentic
- 7:20tasks in my sort of testing suite. All
- 7:23right, so I've got three versions of the
- 7:25model running here. I've got the
- 7:27BFloat16 version, I've got a DeepSpark,
- 7:30so basically a speculative decoding
- 7:32version, and I've got the 4-bit GGUF
- 7:35version with llama.cpp. I'm running the
- 7:37two bigger versions on SG Lang here, and
- 7:41you can see that if I kick it off, I'm
- 7:43actually getting pretty good token
- 7:45speech, which is to be expected. I'm
- 7:47running all of these on an RTX Pro 6000.
- 7:51Now, if we look at the performance of
- 7:53this model, pretty much it's as I
- 7:55expected in here, that the model is not
- 7:58great with knowledge sorts of things.
- 8:00You can see here I asked it for a 5000
- 8:02word essay. It's giving me a reasonably
- 8:04short amount of thinking on it, but the
- 8:06essay is nowhere near 5000 words, not
- 8:09even close in here. If we go in have a
- 8:12look at things like the logic puzzles,
- 8:15we'll see that this will fly along and
- 8:18it gets to the right answer here quite
- 8:20quickly. So, the logic stuff is actually
- 8:22going quite well. The same here for when
- 8:25we look at something like the hard math
- 8:27stuff, it's doing well. And that kind of
- 8:29reinforces what this model's actually
- 8:31good at, right? But if we come over and
- 8:33we look at something like the SVG
- 8:35Pelican test, this thing just doesn't do
- 8:38well at this kind of thing. You can see
- 8:40that we're starting to get really high
- 8:41token speeds on this, but when we
- 8:44actually look at the outputs, maybe they
- 8:46actually are sort of better as abstract
- 8:48art for certain things, but that's okay
- 8:51because that's not what the model's for.
- 8:53Exactly the same kind of thing when we
- 8:55look at the generating HTML page, right?
- 8:58If we look at the code that comes out,
- 9:01it's not that it's necessarily anything
- 9:03hugely wrong. It's just that it's not
- 9:05nowhere near as good as any of the other
- 9:08models that we would use for coding
- 9:10these days. That's not what this model
- 9:12is actually about. Where this model
- 9:14shines is going to be not at the coding
- 9:18outputs, but it's going to be at the
- 9:20tool use. So, you can see now I've moved
- 9:22over to the GGUF version. It's flying at
- 9:25well over 400 tokens per second, no
- 9:27problems here. But let's come over and
- 9:29look at how this actually does on the
- 9:32Agentech tests. Remember, these are a a
- 9:35of tests that test for function calling
- 9:38to see does it provide the right
- 9:41arguments to functions, is it able to
- 9:43use tool use well and stuff like that.
- 9:45And this is sort of like the basic set
- 9:47of tests here. And not only is it flying
- 9:51speed-wise here, it's getting all of
- 9:53them right. So we're getting some really
- 9:55nice results out of them. So then we
- 9:57come over to the more advanced one. So
- 10:00here the goal is to basically test
- 10:02things that often go wrong when you're
- 10:05running these kinds of things. And so
- 10:08again, I'm using the GGUF version. I'll
- 10:10just say going through this that the
- 10:12current setup with the SG Lang is
- 10:14actually seems to be the tool use seems
- 10:16to be returning the wrong format. So
- 10:18when I test out the Bfloat16 and the D
- 10:21Spark versions, I'm getting some issues.
- 10:24But it's pretty clear that they're not
- 10:25because of the model, just seems to be
- 10:26the configuration on SG Lang. When I try
- 10:29it on llama.cpp with the GGUF version,
- 10:33so this is a four-bit version, and of
- 10:35course with this you would expect that's
- 10:37actually going to be worse, it works
- 10:39fine. And you can see here that it's
- 10:41gone through and passed eight out of
- 10:43eight for all of these tests. Now some
- 10:45of the tests in here that I think are
- 10:46interesting are the sort of planning
- 10:49tests where it's using multiple
- 10:51different tools as it goes through. It
- 10:53has to deal with errors often before it
- 10:56gets to a correct output. With something
- 10:58like the prompt injection resistance, it
- 11:00has to work out how to basically extract
- 11:03out the right kind of thing going in
- 11:05here. And I'll point out while I'm
- 11:07showing you one run of these tests here,
- 11:09I run them at least 10 times going
- 11:11through. Now this one did fail a couple
- 11:13of the times, but it's been passing
- 11:15around about 80% of that. The other one
- 11:18too, which is one that a lot of models
- 11:20in the past used to have lots of
- 11:21problems with, were things like failure
- 11:24retry tests. So what's going on here is
- 11:27this is deliberately pretending to fail
- 11:30for two of the times, and to see does
- 11:34the model keep going at trying to get
- 11:37the result out. So, you can see that
- 11:39these failures were actually created
- 11:40deliberately. The model then keeps
- 11:42going. It's able to basically get the
- 11:44result out we want. The distractor tool
- 11:46bait also very impressive in that it's
- 11:49able to basically find the right
- 11:50information in there. If I come and test
- 11:53things out in the tool playground, here
- 11:55I think it's really interesting to see
- 11:58that this model has no problem both
- 12:01dealing with multiple tool calls here.
- 12:03But, you can see that this one it's
- 12:04having to use DuckDuckGo search and a
- 12:06fetch URL here. And it's lightning fast
- 12:10going through this. I'm getting sort of
- 12:12end-to-end over 500 tokens per second.
- 12:15And I guess partly because it's so
- 12:17small, it has no problems with large
- 12:19page pre-fills, being able to extract
- 12:21out what's the right information in
- 12:23there to pay attention to. Again, on
- 12:25multi-tool stuff, again we've got very
- 12:27fast result. We've got accurate use of
- 12:30the tools that are actually in there.
- 12:32And one of the things that I really like
- 12:33in here is that it's not trying to use
- 12:37its knowledge, right? The fact that it
- 12:39doesn't have the knowledge is fine as
- 12:41long as it doesn't pretend to have the
- 12:43knowledge. And we want it to actually
- 12:45defer to its tools rather than try to
- 12:48basically make everything up itself. So,
- 12:50for me this is the biggest issue with a
- 12:52model like this is that if we do
- 12:54actually give it a lot of tools and we
- 12:56ask it to defer to the tools rather than
- 12:58its own knowledge, does it have a
- 13:00problem with that or not? And it's great
- 13:02to see that if you give it the tools, it
- 13:04seems to know not to use its own
- 13:06knowledge. And that's exactly the kind
- 13:08of model that we want for sub agents,
- 13:12right? For anything that you're doing
- 13:13agentic where you've got sub agents with
- 13:15lots of tool calls, you don't want them
- 13:18trying to use their knowledge too much
- 13:20in there. You want them just getting the
- 13:22right stuff out for the right inputs for
- 13:25the different tools, etc. And that's
- 13:27exactly what's going on here with this
- 13:29model. Okay, so to finish up, there are
- 13:31a number of different versions that
- 13:32they've got of this up there. The ones
- 13:35that I showed in the video were the
- 13:36standard one, the GG UF, and the G Spark
- 13:38one. Definitely, this is worth checking
- 13:41out if you're looking for a very, very
- 13:44quick model that needs to deal with
- 13:46perhaps a little bit more complicated
- 13:48function calling and tool use than the
- 13:51previous 1B model. You can see in here
- 13:54that its strength has really been
- 13:56trained and pushed like crazy for this
- 13:59tool use. And while it also did well in
- 14:01the math reasoning and some of the other
- 14:03instruction following stuff that I gave
- 14:05it, the way that I would suggest that
- 14:06you use the model is for sub agents and
- 14:09for where you need a very quick but
- 14:11reasonably simple kind of model that can
- 14:14handle a lot of different tools and can
- 14:16deliver good arguments or the
- 14:18appropriate information to pass into
- 14:20those tools. So anyway, let me know in
- 14:22the comments what you think of it. As
- 14:24always, if you found the video useful,
- 14:25please click like and subscribe, and I
- 14:27will talk to you in the next video. Bye
- 14:28for now.
About this transcript
This page contains the full transcript of MiniCPM5-2B: The Best Sub-Agent Model Yet? by Sam Witteveen, generated from the public captions YouTube serves with the video. The transcript has 2,797 words across 383 segments, with the original timestamps preserved so you can click any line to jump to that moment in the embedded player.
What you can do with it
Use the transcript to take notes, quote the speaker, build a study guide, generate a summary with ChatGPT or Claude via the YouTube Summary tool, or export it as a timed subtitle file with YouTube to SRT. You can also re-open it in the transcriber to choose a caption track available on the video.
Free YouTube transcript tool
YouTube2Text is a free YouTube transcript generator — no signup, no daily limit. Paste any YouTube link and get the full transcript instantly, with timestamps, click-to-jump, caption language selection, AI prompts for ChatGPT, Claude, and Gemini, and exports to TXT, SRT, VTT, or Markdown.