r/LocalLLaMA • • 18h ago

Showcase Using parallel agents on m6 Mac mini to code a playable game in 8 seconds.

The idea is using Gemma 4 26B A4B QAT MLX MTP 4bit as a verifier for a swarm of Gemma 4 E2B IT MTP 4bit that each handle a different part of the game. They code their sections in around 4 seconds and it synthesizes in around in 4 seconds. Just seeing what’s possible with swarms on simple setups. Should work decently with other verifiers or swarms on less unified memory…

On my m6 Mac Mini 32GB test I've found 8 parallel agents hitting 481 tokens per second cumulatively. Each agent is hitting 60+ tokens per second individually. Because llama-server batches all 8 agents against a single copy of the weights, 481.8 tok/s aggregate fits in roughly ~3.5 GB RAM.

Model weights (gemma-4-E2B-it-qat-UD-Q4_K_XL.gguf): 2.4 GB — loaded once and shared across all 8 parallel slots.
KV cache + Metal compute buffers (8 slots × 2,048 ctx): ~0.6 – 1.1 GB.

39 Upvotes

16 comments sorted by

6

u/sloptimizer 18h ago

This is a fun experiment! How do you get your sub-agents to diving work efficiently without creating merge conflicts?

3

u/Fear_ltself 17h ago edited 17h ago

If you notice each of the 8 is given a distinct task:

1. Theme & Palette
2. Player & Weapons
3. Enemy Roster
4. Waves & Pacing
5. Power-Ups
6. Arena Hazards
7. WebAudio SFX
8. HUD & Flavor

Each Gemma E2B handles their task in parallel while batching only uses 3.5 GB of unified RAM. Then the Orchestrator Gemma 4 26B puts it all together. They kind of act a PRE-MTP by generating the full brainstorm at like 500 tokens per second and then it verifies. This video is actually like half speed because recording the video itself on the same Mac slowed them down to like 240 tokens per second as a swarm. They are normally faster lol

2

u/Status-Secret-4292 17h ago

Did you use some sort of harness or how did you orchestrate them so well and define their roles and the structure of the program enough that they knew what to do and it all fit together?

This is really cool. Def an updoot from me.

1

u/Fear_ltself 17h ago

I built my own harness based on open source (Apache, MIT, etc) stuff like llama.cpp and many others . Google has Google ADK or Elephant Goldfish for examples on how to run swarms. The harness I’m using is this one I’ve made, should work for m series Macs, I’m a vibe coder for about 4.5 years but not a professional so report any bugs and I’ll work out a fix and push when I can. It’s mostly just a fun experiment I just got the Mac m6 a few days ago

https://github.com/CyberMagician/ARIES-Public-Preview-Beta

3

u/Status-Secret-4292 17h ago

So cool! Great work

3

u/JacketHistorical2321 16h ago

"...I’m a vibe coder for about 4.5 years..." Lol

4

u/Waarheid 16h ago

The subagents aren't coding, so no code conflicts to deal with.They're outputting a section of the spec they are responsible for, then the 26B is outputting a configuration for a game that is ran by an existing runtime.

2

u/Waarheid 16h ago

Those outpits look to me like:

  • each subagent is just describing a design idea, like building out its own section of the prompt
  • the 26B takes those designs and writes structured js that plugs into an existing game framework, rather than writing game code from scratch

This makes me think that the games it would output would be pretty similar, just with different colors, slightly different mechanics, etc, and the subagents aren't coding at all, just writing a short section of the spec. Still a fun idea.

2

u/Fear_ltself 15h ago

Yeah I mean it’s open source you can make it do other stuff there’s a mode for a board of experts as well, this is just the foundation feel free to tinker and make the spec however you want. This is just a springboard for your local LLM

4

u/swagonflyyyy 18h ago

Damn this is really interesting. Looks like G4 is a late bloomer, after all.

4

u/L8W8 17h ago

Splitting 8 small batched workers into one larger synthesizer is a smart way around the concurrency wall on Apple Silicon. With tiny 2-3 GB weights you stay way below memory-bandwidth saturation, so llama-server continuous batching scales nicely across all 8 slots. Once you try running MTP/speculative decoding across 4+ parallel clients on much heavier models, the extra verification compute starts saturating the GPU and p95 latency spikes, so keeping the parallel fan-out on a tiny non-bottlenecked model and only running the bigger MTP model for the single synthesis pass makes a lot of sense.

2

u/Numerous-Ad6217 17h ago

That’s amazing

2

u/youssef952008 17h ago

Can't tell if I'm impressed or scared...

1

u/[deleted] 17h ago

[removed] — view removed comment

1

u/stylome-ai-detection 17h ago

Notice: This comment appears to be AI generated.


Stylome AI detector · scan results