Experiments›Adaptive Swarm
Oct 12, 2026

Adaptive Swarm

By Wenhao Chai作者 Wenhao Chai

Setup设置

Every agent here is Gemini 4 Argon. The task is to make gigatoken, Marcel Rød's Rust tokenizer library, encode faster on one CPU core with the DeepSeek-V3 tokenizer, while every token id stays the same.

这里的智能体全部是 Gemini 4 Argon。任务是在单个 CPU 核上,让 Marcel Rød 的 Rust 分词库 gigatoken 用 DeepSeek-V3 分词器编码得更快,同时输出的每个 token id 都不变。

  • Score. The original's best time over the candidate's, three alternating runs each on 500 MB of OpenWebText.
  • Correctness. Identical token ids on held-out, edge-case and random inputs.
  • Budget. Three hours per run, one idea per submission, one 32-core machine shared by the run's agents. A coordinator agent assigns the work and does not count toward the number of agents.
  • 分数。在 500 MB 的 OpenWebText 上,原始版本和候选版本交替各跑三次,用原始版本的最好用时除以候选版本的最好用时。
  • 正确性。在留出数据、边界用例和随机输入上,token id 都与原始版本完全一致。
  • 预算。每次运行三小时,每次提交一个想法,同一次运行的智能体共用一台 32 核机器。另有一个协调者智能体负责分配工作,不计入智能体数。

Reasoning is cheap; execution is expensive. In research and science more broadly, the costly step is running an experiment, such as a training run or a lab assay, rather than thinking of it. This task is a cheap stand-in for that setting, yet we keep its accounting: the main cost is the number of executions, not model tokens, and every curve below runs over submissions.

推理便宜,执行昂贵。在更广泛的研究和科学工作中,昂贵的一步是把实验跑出来,例如一次训练或一次实验室测定,而不是想出这个实验。这里的任务是这种情形的一个便宜替代,但我们沿用同样的算法:主要成本是执行次数,而不是模型 token,下面所有曲线的横轴都是提交次数。

In a standard swarm@n, the coordinator hands work to up to n agents, and all of them edit one shared copy of the code. A recursive swarm@n puts managers between the coordinator and the workers, much as Recursive Language Models (Zhang et al., 2025) call themselves on parts of a problem and Prime Agent (Prime Intellect, 2026) has agents spawn sub-agents for subtasks.

标准蜂群@n 中,协调者把工作分给至多 n 个智能体,大家改同一份代码。递归蜂群@n 在协调者和工作者之间加了管理者,类似 Recursive Language Models(Zhang 等,2025)让模型对问题的一部分递归调用自己,以及 Prime Agent(Prime Intellect,2026)让智能体为子任务派生子智能体。

pass@k splits the agents into k groups, each on its own isolated copy of the code; pass@4 × recursive swarm@2 is four isolated recursive swarms of two agents. An adaptive swarm changes its groups during the run. We built five schedules for eight agents, A to E.

pass@k 把智能体分成 k 组,每组一份相互隔离的代码;pass@4 × 递归蜂群@2 是 4 个相互隔离、各有 2 个智能体的递归蜂群。自适应蜂群在运行中改变分组。我们为 8 个智能体设计了五种排程,A 到 E。

Experiments实验

Answered已有结论How do standard and recursive swarms change with the number of agents?标准蜂群和递归蜂群随智能体数怎样变化?

Both beat one agent at every size. Their final speedups are highest at four to eight agents and lower at 16 and 32.

每个规模都好于单个智能体。最终加速比在 4 到 8 个智能体时最高,16 和 32 个时更低。

Answered已有结论Do eight agents in isolated groups beat one swarm on one shared copy of the code?8 个智能体分成相互隔离的组,会好过共用一份代码的蜂群吗?

No. Every split of eight agents into isolated groups ends below a swarm of eight on one shared copy.

不会。8 个智能体的每一种隔离拆法,最终都低于共用一份代码的 8 智能体蜂群。

Testing检验中Does changing the groups during a run beat a fixed swarm?在运行中改变分组,能好过固定的蜂群吗?

Testing检验中How far does one agent get in 64 submissions?单个智能体做到 64 次提交能走多远?

Takeaways核心结论

For now, organizing agents in a more flexible way seems to work well.

用一种更灵活的方式组织 agent 似乎在目前是不错的。

Experiment record实验记录

Citation

@misc{chai2026adaptiveswarm,
  title        = {Adaptive Swarm},
  author       = {Chai, Wenhao},
  year         = {2026},
  howpublished = {Blog post},
  url          = {https://wenhaochai.com/blogs/adaptive-swarm.html}
}
Experiments Back to top回到顶部