Frontier Foundry

Swarms, Flocks, Gangs: How to build, train, and evaluate multi-agent systems

Launch notes · Hugging Face ·

A close reading of the source at huggingface.co: what it says, what it means for someone who builds with AI, and which claims are the publisher’s own.

Multi-Agent SystemsGPUs & AI ChipsAI & JobsAI for MathReinforcement LearningInference ServingOpenAIAnthropicMoonshot / KimiHugging Face

What changed

Hugging Face started a tutorial series on training small multi-agent teams, with a reproducible first example (post). Everything below is the authors' own account of their own runs.

The setup: four agents share one Qwen3-0.6B policy, each with its own context and one private integer from 1 to 99. They must pool the numbers by messaging each other (message, read_messages, check_notifications). The team wins if at least one agent submits the full sorted list. Training uses one shared team reward: zero on failure, otherwise 1 minus up to 0.25 for tokens used, against a 36,864-token team allowance. For each problem, eight team attempts are scored against each other, and every agent in a team gets the same advantage (TRL, async GRPO).

Authors' results over 75 updates (first five vs. last five updates, training batches):

  • Success rose from 6.6% to 82.3%. At checkpoint 75 the team solved 26 of 32 held-out problems (81.25%). The paper they follow reports 93.2% after 200 updates.
  • Generated tokens per team fell 37.4%, from about 12.8k to 8.0k, while broadcasts rose from 2.38 to 5.73 per team.
  • Against "retries": the untrained team's best of 8 attempts solved 37.5% of problems and spent about 103,000 tokens per problem. One attempt from the trained team solved 82.3% for about 8,000 tokens. The authors call this an estimate on training problems, not held-out ones.

The post also frames the field. It cites an OpenAI swarm of roughly 10,000 agents on a Navier-Stokes problem, and notes Noam Brown estimates less than 10% of that result came from cooperation. In Anthropic's vulnerability-finding test, coordinated agents found more bugs but also searched more code and used more tokens; on the same directories, results per million tokens were about the same. The post reports these second-hand, with no link to the primary sources in the text we have.

What it means for builders

  • The headline question is the useful part: when agents communicate, does it help, or did you just spend more? Compare at equal total tokens, not equal agent count. A swarm that wins with 4x the budget has not shown that cooperation worked.
  • Communication has to be trained. The authors say mixing contexts is "not an inherent performance boost"; their untrained team solved 6.6%.
  • Credit assignment is the hard part: a shared team reward also pays agents whose own answer was wrong. Orchestrator-only training (Kimi K2.5's PARL trains the orchestrator and freezes subagents, per the post) is the cheaper alternative to updating every agent.
  • Rollout cost dominates, not the model. Each update generated millions of tokens at contexts up to 40k, even with a 0.6B model.

Try it

  • Cost and time by the authors' figures: about five hours on two H200s, roughly $50, for the walkthrough.
  • The walkthrough is a hf jobs run --flavor h200x2 script: vLLM serves the policy on GPU 0, TRL's async_grpo_s3_aggregation.py trains on GPU 1 for 50 updates (--teams-per-update 128), then evaluate.py scores base vs. checkpoint on 192 held-out problems. Results go to a Hub bucket and Trackio.
  • TRL's own run of it took about 4.8 hours on two H100s and reached 60.9% held-out success at checkpoint 50, lower than the 75-update original. To get closer, use --updates 75 --teams-per-update 256 (three times the rollouts).

Claims to check

  • The task cannot be solved by one agent, since each holds information the others need. So this run shows that a small policy can learn to communicate, not that a swarm beats a single agent at equal budget. The authors say this themselves and defer that test to a later post.
  • 26 of 32 held-out problems is a small test set; the 192-problem walkthrough eval will give tighter error bars. Token-efficiency figures are training measurements; no held-out token numbers were kept.
  • The best-of-8 comparison uses training problems, and updates 2 to 5 already sample a slightly trained policy.
  • The original and walkthrough code differ in details such as the system prompt, so expect similar results, not an exact copy.
  • The OpenAI, METR and Anthropic swarm anecdotes are context in the post, not tested by it.

Where this leads

the concepts it is about

Related briefs

every brief

Cite this page

the version of 2026-11-26
APA
Han, R. (2026, November 26). Swarms, Flocks, Gangs: How to build, train, and evaluate multi-agent systems. Frontier Foundry. https://www.ryanhan.ai/briefs/2026-11-26-hf-blog-swarms-flocks-gangs-how-to-build-train-and-evaluate-multi-ag
BibTeX
@misc{han2026-briefs-2026-11-26-hf-blog-swarms-flocks-gangs-how-to-build-train-and-evaluate-multi-ag,
  author       = {Han, Ryan},
  title        = {{Swarms, Flocks, Gangs: How to build, train, and evaluate multi-agent systems}},
  howpublished = {Frontier Foundry},
  year         = {2026},
  month        = nov,
  url          = {https://www.ryanhan.ai/briefs/2026-11-26-hf-blog-swarms-flocks-gangs-how-to-build-train-and-evaluate-multi-ag}
}