Agencies or Swarms? What Small Model Cooperation Means for AI Engineering

For the past month, I've been thinking about many different strategies for agentic model cooperation. That includes different vendors, infrastructure choices, and model setups, from one model to several models working together on a single issue or project.

I constantly observe market trends and major global AI labs, looking not only at new model releases and tips for conquering the world with AI, but also at infrastructure. I found something really interesting right after the AI Engineers conference in Miami. After dozens of discussions, it became clear to me: the quiet, rising new trend is agentic swarms.

For example, Cloudflare shared a plan with me (not yet public) to build an infrastructure mesh system for distributed inferencing. Many agents, many outputs. Automatically scaled serverless infrastructure and talks about "Agencies" during the conference confirmed my suspicions. The world is preparing not just for super-powerful single models, but for swarms of sufficiently intelligent models dedicated to a single user.

Going deeper, I tried to estimate how many models in a swarm the leading AI labs have already tested. 10k? 100k? Or maybe none of these. It's hard to say what resources they have in their R&D centers and what possibilities they have for experimentation. However, the laws of physics clearly point toward emergent behaviors.

Guess what? I started experimenting with my own agentic swarm!

How many small Gemmas can a single DGX Spark serve?

I decided to build my own swarm to test how many models I could fit onto a single DGX Spark (128GB VRAM) and run inference with them confidently, ensuring nothing gets stuck.

I chose the smallest Gemma models (gemma-3-270m and gemma-3-1b-it) as my swarm species and built a full experimental setup.

Before the numbers, one important distinction. There are two different ways to benchmark this.

  • The first is request-level concurrency: many HTTP clients hitting one Ollama daemon serving one model. This mostly tests Ollama’s request scheduler. Memory does not scale much because only one copy of the model is loaded.
  • The second is process-level concurrency: every worker gets its own Ollama daemon on a different port, and every daemon loads its own model process. This is the version I cared about, because it answers the real swarm question: how many independent model workers can one machine carry?

For this experiment, swarm-bench spawned N FastAPI workers. Each worker sent requests to its own dedicated Ollama daemon. Every daemon used OLLAMA_NUM_PARALLEL=1, so Ollama’s internal parallel scheduler would not distort the result.

The sweep was simple:

  • Workers: 1, 2, 4, 8, 16, 32, 48, 64
  • Prompts per worker: 25
  • Concurrent requests per worker: 1
  • Max tokens: 128
  • Temperature: 0.2
  • Top-p: 0.9

I classified a run as interactive when p95 first-token latency stayed under 2 seconds and median throughput stayed above 20 tokens per second.

Checking the results

Per-run: gemma3:270m

workers class ft p50 (s) ft p95 (s) tps p50 tps min NVML peak (MB) RSS peak (MB) failures
1 interactive 0.10 0.13 416.5 390.3 9381 56 0
2 interactive 0.11 0.13 424.3 398.0 10530 113 0
4 interactive 0.10 0.13 422.6 373.7 12903 227 0
8 interactive 0.10 0.13 426.5 370.4 17657 454 0
16 interactive 0.10 0.13 428.8 330.5 27221 909 0
32 interactive 0.10 0.13 426.1 109.8 46011 1820 0
48 interactive 0.10 0.13 427.9 45.8 64581 2730 0
64 interactive 0.10 0.13 428.3 48.2 82095 3640 0

This was the first surprise.

The 270m model stayed almost perfectly flat from 1 to 64 workers. First-token p95 sat at 0.13s across the whole sweep.

Median throughput stayed around 420 tokens per second per request.

At 64 workers, that gives roughly 27,400 aggregate decode tokens per second.

That does not mean the system was perfect. The minimum TPS started falling after 16 workers, from 330 TPS down to around 46–48 TPS at 48–64 workers.

So the median still looked beautiful, but the tail was already getting noisy.

Per-run: gemma3:1b

workers class ft p50 (s) ft p95 (s) tps p50 tps min NVML peak (MB) RSS peak (MB) failures
1 failed 0.00 0.00 0.0 0.0 0 54 25
2 interactive 0.20 0.24 184.3 162.0 91938 113 0
4 interactive 0.20 0.24 183.7 98.1 92149 227 8
8 interactive 0.20 0.24 188.2 172.4 92453 455 0
16 interactive 0.20 0.23 192.3 168.6 94224 909 0
32 interactive 0.20 0.23 195.1 135.4 68942 1820 0
48 interactive 0.20 0.23 194.8 5.1 99346 2730 1

Gemma 3 1B also held up better than I expected.

Ignoring the failed socket cases, first-token latency stayed around 0.23-0.24s from 2 to 48 workers.

Median throughput stayed between 184 and 195 tokens per second per request.

At 48 workers, that gives roughly 9,350 aggregate decode tokens per second.

There were some strange failures at n=1, n=4, and n=48. The daemon logs showed no traffic for those cases, so this looks more like a FastAPI proxy/socket issue than model saturation. I do not know the root cause yet. The clean results from 2 to 32 workers are consistent enough that I would not treat those failures as the performance limit.

The warning sign appears in the tail again. At 48 workers, minimum TPS dropped to 5.1. So the system still looks strong on median numbers, but individual requests can start behaving badly under heavier load.

One caveat: memory reporting on DGX Spark

This machine uses unified memory, so GPU memory and system memory are not as cleanly separated as they are on a typical desktop GPU. NVML still reports memory.used, but that number should not be read as, "This is exactly how much memory the models used."

There is another wrinkle. Ollama loads GGUF model files through memory mapping. When several daemons use the same model file, the operating system can share some read-only pages between them instead of copying everything N times. So memory does not always grow in a simple straight line as more workers are added.

That is why I treat NVML as a rough trend signal, not an exact footprint.

The rss_peak_mb number is also incomplete in this benchmark. Right now, it only sums the FastAPI proxy workers. It does not include the Ollama daemon processes that hold the model weights. So RSS is useful for spotting worker growth, but it is not the full memory cost of the swarm.

What this proves

I wanted to see whether one DGX Spark could run a real swarm of small models and keep them responsive. It can.

In this sweep, Gemma 3 270m stayed interactive at 64 independent workers, reaching roughly 27,400 aggregate decode tokens per second. Gemma 3 1B stayed interactive at 48 independent workers, reaching roughly 9,350 aggregate decode tokens per second. First-token latency stayed almost flat across the tested range.

That gives me a verified starting point for real agentic work. A swarm is not useful just because many models are running. It becomes useful when those workers can split the job: one model inspecting logs, another checking a failing test, another writing a patch, another reviewing it, another watching state.

Maybe the future is not only one super-powerful model sitting in the middle of everything. Maybe the next jump comes from enough smaller models working together, sharing context, checking each other, and moving as one system. That is the part I want to explore next.

Insights

Learn more about AI

Building a Software Factory: Write Specs an Agent Can Build From — cover

Nov 6Article

Building a Software Factory: Write Specs an Agent Can Build From

Learn how to research requirements, resolve open decisions, and write testable specs that AI coding agents can implement without the planning conversation.

 Large-Scale Migrations With Coding Agents: Planning, Verification, and Rollback — cover

Nov 4Article

Large-Scale Migrations With Coding Agents: Planning, Verification, and Rollback

Plan codebase migrations with coding agents using reviewable requirements, verification checks, staged rollouts, and defined rollback criteria.

Conversational Banking: From Customer Questions to Authorized Actions — cover

Nov 2Article

Conversational Banking: From Customer Questions to Authorized Actions

Explore conversational banking architecture through a card-dispute example, covering tool access, authorization, execution, observability, and human handoff.

Building a Software Factory: The Night My Agents Waited for Me — cover

Oct 28Article

Building a Software Factory: The Night My Agents Waited for Me

Learn how permissions, review limits, and missing product decisions stalled two overnight coding agent runs, and how their maintainer revised the workflow.

Your AI Coding Agent Still Needs an Architecture — cover

Oct 22Article

Your AI Coding Agent Still Needs an Architecture

Use explicit contracts, behavior tests, and dependency checks to guide AI coding agents and review their changes through a TypeScript favorites example.

cover

Oct 15Live Stream

Who Left the Agents Running? React Native Software Factories

Join Kewin Wereszczyński and Szymon Chmal to explore what can go wrong in a React Native software factory overnight and the controls that keep agents on track.

cover

Oct 14Podcast

When Coding Gets Faster, What Breaks Next?

Matt Hargett explains how AI moves bottlenecks across testing, deployment, infrastructure, support, and the rest of software delivery.

cover

Oct 12Podcast

AI Coding Agents and Hermes With Tzvetan Mikov

Tzvetan Mikov discusses AI coding agents, context switching, low-level engine optimization, reviewing specs and tests, and his plans for Hermes X.

cover

Oct 12Podcast

State Machines for AI Agents With David Khourshid

David Khourshid explains state machines for AI agents, human approval steps, tracing, and handling invalid model outputs in agent workflows.

cover

Oct 9Article

How to Maximize AI SDLC? Measure the Outer Business Loop, Not the Inner Developer Loop

Connect AI-assisted development to measurable business outcomes. Matt Hargett shares a checklist for assessing user exposure, results, and delivery costs.

cover

Oct 7Talk

Automating Mobile QA with Cloud Agents

Michał Pierzchała shows how cloud-based QA agents can test real iOS and Android user flows and bring screenshots, recordings, and logs into pull requests.

cover

Oct 1Live Stream

Can Jev Make AI Agent Decisions Faster?

Explore Jev with Kewin Wereszczyński and Szymon Chmal: how it works, its approach to faster agent decisions, and possible local alternatives.

cover

Mar 19Tutorial

The Hard Way vs. The React Native AI SDK Way: Stop Writing Custom Modules for Every Model

Learn how React Native AI uses a unified provider model to switch between cloud and on-device LLMs without rewriting application logic, enabling reliable AI experiences online and offline.

cover

Mar 12Tutorial

Build Smarter Apps: Tool Calling & AI Orchestration Explained

Learn how on-device models in React Native can call tools, interact with external APIs, and return structured outputs you can use directly in application logic.

cover

Mar 5Tutorial

MLC LLM + React Native: On-Device AI Without the Pain

Learn how to run third-party on-device LLMs in React Native using MLC LLM. Choose your models, run them efficiently across platforms, and keep a unified JavaScript API with React Native AI.

cover

Feb 24Tutorial

Intelligent Fallbacks with Apple Intelligence in React Native

Learn how to use Apple’s built-in Foundation Models in React Native apps, reduce memory usage, and enable fast, fully on-device AI with React Native AI Apple.

cover

Feb 10Tutorial

What Is the React Native AI SDK? A Complete Intro & Quickstart

Learn why on-device AI matters for React Native apps, how local LLMs behave offline, and what problems React Native AI is designed to solve from day one.

cover

Jan 29Tutorial

Implementing an Android TurboModule with Kotlin

Learn how to implement a React Native TurboModule on Android, from the TypeScript spec and Codegen to the Kotlin implementation and package registration.

cover

Jan 19Tutorial

Working with Different Threads in Swift TurboModules

Learn how JavaScript, native module, background, and main threads interact in React Native TurboModules, and how to use GCD queues to run async work safely in Swift.

cover

Jan 9Tutorial

How to Add Type-Safe Constants to Swift TurboModules

Learn how to expose typed, immutable constants from a Swift TurboModule using Codegen, and get full end-to-end type safety between native and JavaScript.

cover

Dec 30Tutorial

Adding Event Emitters to Your TurboModule in Swift

Learn how to emit native events from a Swift TurboModule and subscribe to them in JavaScript, including proper memory management and Codegen integration.

cover

Dec 22Tutorial

Writing Your First TurboModule in Swift

Learn how to build a fully working TurboModule in Swift, integrate it with Codegen, and bridge it through Objective‑C inside an Expo app.