matrix
CLAUDE.md291 starsChanged 6 months agoMITView on GitHub
Matrix is a library for fast, scalable LLM inference and multi-agent synthetic data generation, built on Ray and Slurm. It supports vLLM/SGLang-based inference, auto-scaling, gRPC/HTTP, and peer-to-peer multi-agent orchestration. Other vLLM versions: vllm_066, vllm_073, vllm_083, vllm_085, vllm_0102 Use /matrix-setup-conda to create a conda environment and install matrix. Use /matrix-launch-cluster to launch a Ray cluster on Slurm. Use /matrix-deploy-model to deploy model applications on the cluster. Use /matrix-inference to run LLM inference (CLI batch, Python API, or multiprocessing). Use /matrix-run-agents to…
- Installs packages
The file
We split this CLAUDE.md into the rules it gives an agent
5 rules. About 0 are common, 0 are distinctive, and 5 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈0
Distinctive · estimate
This author's own choices. Worth a look.
5
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 56
Use /matrix-setup-conda to create a conda environment and install matrix.
- Very specific: line 57
Use /matrix-launch-cluster to launch a Ray cluster on Slurm.
- Very specific: line 58
Use /matrix-deploy-model to deploy model applications on the cluster.
- Very specific: line 59
Use /matrix-inference to run LLM inference (CLI batch, Python API, or multiprocessing).
- Very specific: line 60
Use /matrix-run-agents to run peer-to-peer synthetic data generation.
≈ “Common” is an estimate: at least 1 in 5 of the 26,980 CLAUDE.md files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Matrix: Multi-Agent daTa geneRation Infra and eXperimentation
Project Overview
Matrix is a library for fast, scalable LLM inference and multi-agent synthetic data generation, built on Ray and Slurm. It supports vLLM/SGLang-based inference, auto-scaling, gRPC/HTTP, and peer-to-peer multi-agent orchestration.
Development
- Python 3.10+ required (3.12 recommended for new environments)
- Package:
fair-matrix, installed viauv pip install -e .[extra] - Build system: flit
- Linting:
black,isort,mypy,pylint - Tests:
pytest(withpytest-asyncio) - Format before committing:
black . && isort . - Entry point:
matrixCLI defined inmatrix/cli.py
Install Extras
| Extra | Use Case |
| (none) | Client-only usage (query existing cluster) |
ray | Launch cluster without LLM inference engine |
vllm_0112 | Most stable vLLM for LLM inference |
vllm_omni | Omni vLLM with image/audio generation |
sglang_045 | SGLang backend (e.g. DeepSeek R1) |
agent | Peer-to-peer agent framework (hydra, langgraph) |
dev | Development tools (test, lint, docs) |
Other vLLM versions: vllm_066, vllm_073, vllm_083, vllm_085, vllm_0102
Key Commands
matrix start_cluster # Launch Ray cluster on Slurm
matrix stop_cluster # Shutdown Ray cluster
matrix status # Check cluster status, get ports for dashboards
matrix deploy_applications # Deploy/remove model applications
matrix check_health # Health check a deployed app
matrix inference # Batch inferenceArchitecture
matrix/cli.py- CLI entry pointmatrix/app_server/- Application servers (LLM, code execution, etc.)matrix/app_server/llm/llm_config.py- Default vLLM configs per model sizematrix/client/- Client library for querying deployed modelsmatrix/agents/- Peer-to-peer multi-agent frameworkmatrix/agents/config/- Hydra configs for agent tasksmatrix/data_pipeline/- Data processing pipelinesmatrix/job/- Job manager for distributed executionmatrix/scripts/- Utility scripts
Skills
Use /matrix-setup-conda to create a conda environment and install matrix.
Use /matrix-launch-cluster to launch a Ray cluster on Slurm.
Use /matrix-deploy-model to deploy model applications on the cluster.
Use /matrix-inference to run LLM inference (CLI batch, Python API, or multiprocessing).
Use /matrix-run-agents to run peer-to-peer synthetic data generation.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

