Training 4 Agents for $50: Multi-Agent Collaboration Might Just Mean Spending More Tokens
Hugging Face built a reproducible multi-agent RL loop with Qwen3-0.6B and TRL; the sprint version costs about $50 and takes 5 hours. But don't treat collaboration as a free bonus—once budgets are matched, the results may not be as good.
$50, two H200s, about 5 hours. Hugging Face has released a multi-agent tutorial that connects agent evaluation, RL environment construction, and post-training into a reproducible loop. When recommending it on X, Xudong Han was direct: if you want to walk through this pipeline yourself, this tutorial is suitable and can be run for around $50.
First, consider a point that is easy to misjudge. Multi-agent collaboration is often treated as a free bonus, but a large swarm itself does not prove that collaboration is useful. OpenAI once announced that about 10,000 agents had found a singularity in the 3D Navier-Stokes equations, one of the Millennium Prize Problems. Noam Brown estimated that less than 10% of that came from multi-agent collaboration. In Anthropic's vulnerability-discovery experiment, coordinating agents found more bugs, but they also searched more code and spent more tokens. After limiting the comparison to the same directories, results per million tokens were about the same. The Hugging Face blog puts the question clearly: when agents communicate, are they really helping, or just spending more compute?
Figure 1 shows the expectation this tutorial wants to test: under matched budgets, communicating agents should outperform non-communicating agents. Note the matched budget. If four agents each try once, the success rate will be higher than a single attempt, but the cost also quadruples. A fair comparison requires giving each of the four agents a quarter of the tokens, to see whether they can still beat a single agent that gets all the tokens.

Image source: Hugging Face blog
The task itself is small. Each of the 4 agents receives a number that only it knows, and they share a Qwen3-0.6B model but each has its own context. They can send messages to each other. As long as one agent submits a complete, correctly sorted list of numbers, the whole team scores. Wrong order is 0 points; if correct, the more tokens used, the more reward is deducted. For example, the four private numbers might be 5, 26, 5, 78, with duplicates preserved, and the correct answer is [5, 5, 26, 78]. A single agent cannot access the others' private numbers, so without communication it cannot solve the task.

Image source: Hugging Face blog
The training process is split into three steps:
- Run evaluation first. Directly test the untrained base model to see how well the four agents can coordinate. This score is the starting point for later comparison.
- Train in an RL environment. Let the team independently try the same task 8 times. TRL compares the rewards from these 8 attempts and gives the better-performing team more positive training signal. The four agents in the team share this signal, and the same model is updated. The tutorial runs 50 steps by default.
- Evaluate again after training. Use the same set of 192 held-out tasks that were tested before training to see whether the success rate changed. The training logs also show how many tokens each team used and how many messages it sent.
The reward formula is straightforward: the team allowance is 4 times (8192 plus 1024), equal to 36,864 tokens; reward = success × (1 − 0.25 × min(1, generated team tokens / 36,864)). A team that is correct and uses half the allowance gets 0.875. Sending messages has no separate reward. The incentive is to solve the task while generating fewer tokens.
The original experiment ran for 75 steps. Training success rate rose from 6.6% to 82.3%, comparing the first five updates with the last five. Checkpoint 75 solved 26 out of 32 held-out tasks, or 81.25%. The paper reports a 93.2% success rate for four agents after 200 steps. At the same time, generated tokens per team dropped from about 13k to 8k, a 37.4% reduction. Messages did not decrease; broadcasts rose from 2.38 to 5.73 per team. Generated tokens include reasoning and tool calls, so message count alone cannot tell how much text a team produced.
The sprint version is cheaper and stops earlier. Running this example with TRL on two H100s takes about 4.8 hours, and checkpoint 50 has a 60.9% held-out success rate. To get closer to the original experiment, increase the number of update steps and rollouts, which also raises cost and time. The original recorded experiment used 1 H200 for training and 7 H200s for vLLM rollout, generating millions of tokens of agent dialogue per update, with contexts up to 40k. The tutorial's sprint version uses two H200s: one GPU serves the shared policy, and the other updates the model. First create a Hugging Face Bucket to store results, then launch the job with HF Jobs.
Here is a practical judgment. The $50 version is suitable for people with a low budget who want to experience the full pipeline. It has complete scripts that can run evaluation, training, and evaluation again, and can store checkpoints, Trackio data, and the Git commit in a bucket. But do not treat the sprint results as the original experiment's conclusions. Some replies on X said that running the loop for $50 is cost-friendly. Others are more cautious: first check whether the sprint version's results match the original experimental setup; if not, treat it as getting familiar with the pipeline, not as a final conclusion. That attitude is more reliable.
The metric most likely to grow first in multi-agent systems is usually the token bill. The value of this Hugging Face tutorial is that it puts collaboration, budget, reward, and evaluation into a small task that can actually run. If you want to get hands-on, following it once is more useful than just looking at architecture diagrams. Links are at the end; the figures and scripts are in the original blog.
Original article link: https://huggingface.co/blog/training-swarms
X post: https://x.com/Xudong07452910/status/2126477422677622849
发布时间: 2026-11-28 10:26