We first explored this abstraction in Hogwild! Inference [11].
Traditional multi-agent systems generally impose a collaboration strategy outside the model: vote over independent samples, debate for a fixed number of rounds, assign specialized roles, decompose the task into predefined branches, or execute an externally generated task graph.
These structures can be effective, but no single structure is appropriate for every problem. Fixed decomposition may fail when the initial plan is wrong. Parallel branches may duplicate work. A system may wait for a straggling subtask after the rest of the plan has become irrelevant. Replanning typically requires another orchestration layer.
Hogwild! Inference instead runs several instances of the same pretrained model concurrently and allows them to write into a shared attention memory. Each worker sees the other workers’ partial generations immediately, rather than after a complete message or reasoning trajectory has been produced.
The workers can then decide at generation time whether to divide the task, verify another solution, pursue an alternative derivation, detect redundant work, or continue a promising argument started elsewhere. The runtime provides concurrency and visibility, while the pretrained model supplies much of the collaboration policy.
Technically, each worker (let’s call them Alice and Bob) needs a different logical ordering of the cache. Alice should see the common prompt, Bob’s current work, and then Alice’s own tokens as the immediate continuation. Bob should see the common prompt, Alice’s work, and then Bob’s tokens. Re-encoding every block for every worker would erase much of the efficiency gain.
Hogwild! stores worker histories as reusable blocks and uses per-block query rotations to construct these views inside the attention kernel. This is similar in spirit to paged attention, except that the same physical page may occupy a different logical position for each worker.