r/LocalLLaMA • • 8d ago

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

Enable HLS to view with audio, or disable this notification

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.

40 Upvotes

17 comments sorted by

6

u/sloptimizer 8d 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 8d ago edited 8d 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 8d 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 8d 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 7d ago

So cool! Great work

4

u/JacketHistorical2321 7d ago

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

4

u/Waarheid 7d 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 7d 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 7d 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 8d ago

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

2

u/Numerous-Ad6217 8d ago

That’s amazing

2

u/youssef952008 8d ago

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

1

u/KrivUK 6d ago

Hey, how did you go about setting this up? Is there a good guide. You’re kind of doing what I’m after but a bit new to this game.

1

u/[deleted] 8d ago

[removed] — view removed comment

1

u/stylome-ai-detection 8d ago

Notice: This comment appears to be AI generated.


Stylome AI detector · scan results