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

ODEFTO's TAKE

Okay, here’s a breakdown of the key information from the provided text, organized for clarity and highlighting the most important points:

1. Experiment Overview, The “Swarm” Project

Goal: To explore training a team of agents using TRL (Transformer Reinforcement Learning) in a scalable manner. Focus: The experiment investigates how a team of agents learns to solve problems, focusing on token efficiency, communication patterns, and overall success rate.

2. Key Metrics & Changes in Behavior

Broadcast Increase: From the initial 2.38 broadcasts per team, the experiment saw an increase to 5.73, even as total token use decreased. This suggests a shift towards more frequent communication. Reduced Token Use Later: The team used fewer tokens as training progressed, indicating improved efficiency. Significant Token Reduction: Between updates 2-5 and updates 71-75, there was a 37.4% reduction in generated tokens per training team. At batch 75, the mean was 7,624 tokens per team. Message Count vs. Tokens: It’s crucial to understand that message count alone doesn’t accurately reflect the amount of text produced. The team generated reasoning and tool calls, so the total token count is a more reliable measure.

3. Understanding Training Dynamics

Retries & “Untrained Team”: The concept of a “single agent with more retries” is approximated by the untrained team with more retries. Eight Attempts per Problem: Each problem was attempted eight times. The team solved a problem if any of the eight attempts succeeded. Early Training Rate: Early in training, the untrained team’s success rate was less than half, and its token usage was 13 times higher than a trained team’s attempt. This provides a baseline estimate.

4. Infrastructure & Rollout Setup

Small Model, Large Rollouts: The model is relatively small, but the experiment generates a lot of tokens (millions) across contexts up to 40k tokens. GPU Utilization: Used one H200 for the trainer and seven H200s running vLLM rollout engines to speed up processing. Batching by Token Count: TRL packs micro-batches by token count instead of by team, making the –teams-per-update value an approximation.

5. Walkthrough Example, Hugging Face Jobs

Simplified Setup: The text details a simplified TRL example using Hugging Face Jobs with a Qwen3-0.6B model. Two GPUs: One H200 serves the shared policy with vLLM, and the other runs TRL’s async_grpo_s3_aggregation.py. Reproducibility: The script clones the TRL repository, sets up the necessary dependencies (vLLM, Trackio), and runs the asynchronous training loop. Tracking: Uses Trackio to log training metrics at every update, storing data in a bucket for later analysis.

6. Key Takeaways from the Run (Checkpoint 50)

Completion: At 60.9% held-out success at Checkpoint 50. Training Duration: The run took approximately 4.8 hours. Scalability: Successfully demonstrates training a team within a reasonable timeframe.

7. How to Scale Up (If Needed)

Increase Updates: To replicate a full 75-update experiment, increase the –updates flag to 75, the –teams-per-update and –concurrent-teams flags to 256, and the job’s timeout to 24 hours.

8. Message

The Swarm experiment demonstrates the potential of team-based reinforcement learning for complex problem-solving. It highlights the importance of combining metrics (token use, message count, success rate) to gain a full understanding of the learning process. It shows the initial stages of training and setup.

—

Would you like me to elaborate on a specific aspect of this information, such as:

The vLLM rollout engine configuration? How Trackio is used for tracking? How to adapt the experiment for your own use case?

This is Odefto's take on a published article, written with AI help from the article's text. The link below goes to the source.

Source: Hugging Face Blog — Read the original article ↗

Featured image: Photo by Ion Ceban @ionelceban on Pexels

Get the best of this topic in your inbox

Join the newsletter. A short, useful digest, no spam.