Meta AI Researchers Introduce Matrix: A Ray Native a Decentralized Framework for Multi Agent Synthetic Data Generation
How do you retain artificial information contemporary and numerous for fashionable AI fashions with out turning a single orchestration pipeline into the bottleneck? Meta AI researchers introduce Matrix, a decentralized framework the place each management and information circulate are serialized into messages that transfer by way of distributed queues. As LLM coaching more and more depends on artificial conversations, software traces and reasoning chains, most present programs nonetheless rely upon a central controller or area particular setups, which wastes GPU capability, provides coordination overhead and limits information variety. Matrix as an alternative makes use of peer to look agent scheduling on a Ray cluster and delivers 2 to fifteen instances increased token throughput on actual workloads whereas sustaining comparable high quality.

From Centralized Controllers to Peer to Peer Agents
Traditional agent frameworks preserve workflow state and management logic inside a central orchestrator. Every agent name, software name and retry goes by way of that controller. This mannequin is simple to purpose about, but it surely doesn’t scale effectively whenever you want tens of 1000’s of concurrent artificial dialogues or software trajectories.
Matrix takes a completely different method. It serializes each management circulate and information circulate into a message object referred to as an orchestrator. The orchestrator holds the duty state, together with dialog historical past, intermediate outcomes and routing logic. Stateless brokers, carried out as Ray actors, pull an orchestrator from a distributed queue, apply their position particular logic, replace the state after which ship it on to the subsequent agent chosen by the orchestrator. There isn’t any central scheduler within the inside loop. Each process advances independently at row stage, somewhat than ready for batch stage obstacles as in Spark or Ray Data.
This design reduces idle time when completely different trajectories have very completely different lengths. It additionally makes fault dealing with native to a process. If one orchestrator fails it doesn’t stall a batch.

System Stack and Services
Matrix runs on a Ray cluster that’s normally launched on SLURM. Ray supplies distributed actors and queues. Ray Serve exposes LLM endpoints behind vLLM and SGLang, and may path to exterior APIs similar to Azure OpenAI or Gemini by way of proxy servers.
Tool calls and different complicated providers run inside Apptainer containers. This isolates the agent runtime from code execution sandboxes, HTTP instruments or customized evaluators. Hydra manages configuration for agent roles, orchestrator varieties, useful resource allocations and I or O schemas. Grafana integrates with Ray metrics to trace queue size, pending duties, token throughput and GPU utilization in actual time.
Matrix additionally introduces message offloading. When dialog historical past grows past a measurement threshold, massive payloads are saved in Ray’s object retailer and solely object identifiers are saved within the orchestrator. This reduces cluster bandwidth whereas nonetheless permitting brokers to reconstruct prompts when wanted.
Case Study 1: Collaborative Reasoner
Collaborative Reasoner, also referred to as Coral, evaluates multi agent dialogue the place two LLM brokers talk about a query, disagree when wanted and attain a ultimate reply. In the unique implementation a central controller manages 1000’s of self collaboration trajectories. Matrix reimplements the identical protocol utilizing peer to look orchestrators and stateless brokers.
On 31 A100 nodes, utilizing LLaMA 3.1 8B Instruct, Matrix configures concurrency as 248 GPUs with 50 queries per GPU, so 12,400 concurrent conversations. The Coral baseline runs at its optimum concurrency of 5,000. Under similar {hardware}, Matrix generates about 2 billion tokens in roughly 4 hours, whereas Coral produces about 0.62 billion tokens in about 9 hours. That is a 6.8 instances enhance in token throughput with nearly similar settlement correctness round 0.47.

Case Study 2: NaturalReasoning Web Data Curation
NaturalReasoning constructs a reasoning dataset from massive net corpora. Matrix fashions the pipeline with three brokers. A Filter agent makes use of a smaller classifier mannequin to pick English passages that seemingly include reasoning. A Score agent makes use of a bigger instruction tuned mannequin to assign high quality scores. A Question agent extracts questions, solutions and reasoning chains.
On 25 million DCLM net paperwork, solely about 5.45 p.c survive all filters, yielding round 1.19 million query reply pairs with related reasoning steps. Matrix then compares completely different parallelism methods on a 500 thousand doc subset. The greatest configuration combines information parallelism and process parallelism, with 20 information partitions and 700 concurrent duties per partition. This achieves about 1.61 instances increased throughput than a setting that solely scales process concurrency.
Over the total 25 million doc run, Matrix reaches 5,853 tokens per second, in comparison with 2,778 tokens per second for a Ray Data batch baseline with 14,000 concurrent duties. That corresponds to a 2.1 instances throughput acquire that comes purely from peer to look row stage scheduling, not from completely different fashions.

Case Study 3, Tau2-Bench Tool Use Trajectories
Tau2-Bench evaluates conversational brokers that should use instruments and a database in a buyer assist setting. Matrix represents this atmosphere with 4 brokers, a consumer simulator, an assistant, a software executor and a reward calculator, plus a sink that collects metrics. Tool APIs and reward logic are reused from the Tau2 reference implementation and are wrapped in containers.
On a cluster with 13 H100 nodes and dozens of LLM replicas, Matrix generates 22,800 trajectories in about 1.25 hours. That corresponds to roughly 41,000 tokens per second. The baseline Tau2-agent implementation on a single node, configured with 500 concurrent threads, reaches about 2,654 tokens per second and 1,519 trajectories. Average reward stays nearly unchanged throughout each programs, which confirms that the speedup doesn’t come from slicing corners within the atmosphere. Overall, Matrix delivers about 15.4 instances increased token throughput on this benchmark.

Key Takeaways
- Matrix replaces centralized orchestrators with a peer to look, message pushed agent structure that treats every process as an unbiased state machine shifting by way of stateless brokers.
- The framework is constructed fully on an open supply stack, SLURM, Ray, vLLM, SGLang and Apptainer, and scales to tens of 1000’s of concurrent multi agent workflows for artificial information technology, benchmarking and information processing.
- Across three case research, Collaborative Reasoner, NaturalReasoning and Tau2-Bench, Matrix delivers about 2 to fifteen.4 instances increased token throughput than specialised baselines beneath similar {hardware}, whereas sustaining comparable output high quality and rewards.
- Matrix offloads massive dialog histories to Ray’s object retailer and retains solely light-weight references in messages, which reduces peak community bandwidth and helps excessive throughput LLM serving with gRPC primarily based mannequin backends.

Editorial Notes
Matrix is a pragmatic programs contribution that takes multi agent artificial information technology from bespoke scripts to an operational runtime. By encoding management circulate and information circulate into orchestrators, then pushing execution into stateless P2P brokers on Ray, it cleanly separates scheduling, LLM inference and instruments. The case research on Collaborative Reasoner, NaturalReasoning and Tau2-Bench present that cautious programs design, not new mannequin architectures, is now the principle lever for scaling artificial information pipelines.
Check out the Paper and Repo. Feel free to take a look at our GitHub Page for Tutorials, Codes and Notebooks. Also, be happy to observe us on Twitter and don’t overlook to affix our 100k+ ML SubReddit and Subscribe to our Newsletter. Wait! are you on telegram? now you can join us on telegram as well.
The publish Meta AI Researchers Introduce Matrix: A Ray Native a Decentralized Framework for Multi Agent Synthetic Data Generation appeared first on MarkTechPost.
