agentleFS
MetaKnown publisherfacebookresearch/matrix/CLAUDE.md

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
  1. Very specific:

    Use /matrix-setup-conda to create a conda environment and install matrix.

    line 56
  2. Very specific:

    Use /matrix-launch-cluster to launch a Ray cluster on Slurm.

    line 57
  3. Very specific:

    Use /matrix-deploy-model to deploy model applications on the cluster.

    line 58
  4. Very specific:

    Use /matrix-inference to run LLM inference (CLI batch, Python API, or multiprocessing).

    line 59
  5. Very specific:

    Use /matrix-run-agents to run peer-to-peer synthetic data generation.

    line 60

≈ “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.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
CLAUDE.md

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 via uv pip install -e .[extra]
  • Build system: flit
  • Linting: black, isort, mypy, pylint
  • Tests: pytest (with pytest-asyncio)
  • Format before committing: black . && isort .
  • Entry point: matrix CLI defined in matrix/cli.py

Install Extras

ExtraUse Case
(none)Client-only usage (query existing cluster)
rayLaunch cluster without LLM inference engine
vllm_0112Most stable vLLM for LLM inference
vllm_omniOmni vLLM with image/audio generation
sglang_045SGLang backend (e.g. DeepSeek R1)
agentPeer-to-peer agent framework (hydra, langgraph)
devDevelopment 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 inference

Architecture

  • matrix/cli.py - CLI entry point
  • matrix/app_server/ - Application servers (LLM, code execution, etc.)
  • matrix/app_server/llm/llm_config.py - Default vLLM configs per model size
  • matrix/client/ - Client library for querying deployed models
  • matrix/agents/ - Peer-to-peer multi-agent framework
  • matrix/agents/config/ - Hydra configs for agent tasks
  • matrix/data_pipeline/ - Data processing pipelines
  • matrix/job/ - Job manager for distributed execution
  • matrix/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.

Download now (ZIP)

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
What did you use it for? e.g. Reviewing pull requests in a Rails app

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.