[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"project-96112":3},{"id":4,"name":5,"fullName":6,"owner":7,"repo":5,"description":8,"homepage":8,"htmlUrl":8,"language":9,"languages":8,"totalLinesOfCode":8,"stars":10,"forks":11,"watchers":12,"openIssues":13,"contributorsCount":13,"subscribersCount":13,"size":13,"stars1d":13,"stars7d":13,"stars30d":14,"stars90d":13,"forks30d":13,"starsTrendScore":13,"compositeScore":15,"rankGlobal":8,"rankLanguage":8,"license":8,"archived":16,"fork":16,"defaultBranch":17,"hasWiki":16,"hasPages":16,"topics":18,"createdAt":8,"pushedAt":8,"updatedAt":19,"readmeContent":20,"aiSummary":21,"trendingCount":13,"starSnapshotCount":13,"syncStatus":22,"lastSyncTime":23,"discoverSource":24},96112,"Meshy","OpenBMB\u002FMeshy","OpenBMB",null,"Python",287,15,104,0,153,47.61,false,"main",[],"2026-09-20 04:01:32","\u003Cdiv align=\"center\">\n\n\u003Cimg src=\"assets\u002Fmeshy-logo.png\" alt=\"Meshy — Asynchronous RL Engine for LLMs\" width=\"400\">\n\n\n[![Notion Blog](https:\u002F\u002Fimg.shields.io\u002Fbadge\u002FNotion-000000?style=for-the-badge&logo=notion&logoColor=white)](https:\u002F\u002Fmaydomain.notion.site\u002Fmeshy-blog-en) [![Zhihu](https:\u002F\u002Fimg.shields.io\u002Fbadge\u002FZhihu-0084FF?style=for-the-badge&logo=zhihu&logoColor=white)](https:\u002F\u002Fzhuanlan.zhihu.com\u002Fp\u002F2080612686585402867) [![GitHub](https:\u002F\u002Fimg.shields.io\u002Fbadge\u002FGitHub-181717?style=for-the-badge&logo=github&logoColor=white)](https:\u002F\u002Fgithub.com\u002FOpenBMB\u002FMeshy) [![Docker](https:\u002F\u002Fimg.shields.io\u002Fbadge\u002FDocker-2496ED?style=for-the-badge&logo=docker&logoColor=white)](https:\u002F\u002Fhub.docker.com\u002Fr\u002Fztonyzhao\u002Fmeshy) [![License](https:\u002F\u002Fimg.shields.io\u002Fbadge\u002FLicense-Apache_2.0-green?style=for-the-badge)](https:\u002F\u002Fwww.apache.org\u002Flicenses\u002FLICENSE-2.0)\n\n\u003C\u002Fdiv>\n\n**Meshy** models every role of an RL run as an\nindependent service. Samples flow between services through a single\nTransferQueue data plane, control flow is driven by data availability, and the\nwhole topology is derived locally by each process from one declarative recipe.\nBuilt on SGLang and torchtitan.\n\n\u003Cp align=\"center\">\n  \u003Cimg src=\"assets\u002Farchitecture.png\" alt=\"Meshy architecture\" width=\"800\">\n\u003C\u002Fp>\n\n## Highlights\n\n- 🧩 **Every role as a service.** Inference, training and rollout run as\n  independent processes that talk through queue columns and a handful of gate\n  signals. There is no driver that fans out RPCs or forwards every tensor.\n\n- 🗂️ **TransferQueue as both data and control plane.** All communication happens through queue columns; column readiness is the only control signal, so services never handshake directly. Gate pulses, GPU ownership, and tensors themselves travel in the same middleware.\n\n- ⚡ **Native async algorithm support.** Recipes for on-policy, bounded\n  off-policy and fully asynchronous training use the same set of services, with\n  only the rollout pacing window as a knob.\n\n- 🧭 **Topology as a pure function.** Full placement is calculated SPMD-style on\n  each machine, without the need for service discovery. A misplaced recipe is\n  identified at startup.\n\n- 🔄 **Colocation with any number of services.** GPU\n  ownership is a token passed over TransferQueue; developers can freely\n  arrange any number of services colocated on the same set of GPUs.\n\n- 🪶 **Lightweight and debuggable.** Logs are kept one file per service with full\n  tracebacks. When something stalls, the queue shows it as piled-up unconsumed\n  columns.\n\n## News\n\n- [2026.09.07] 🎉 Meshy is now open-source! Visit our [blog](https:\u002F\u002Fmaydomain.notion.site\u002FMeshy-A-Role-Driven-RL-Training-Framework-under-SPMD-Paradigm-3d34e1dff05a80e489a6d9a406991bae) for details.\n\n## Quick Start\n\n### Prerequisites\n\n- NVIDIA GPU with CUDA 12.9 support\n- Docker with NVIDIA Container Toolkit (or a native Ubuntu 24.04 environment)\n- Python 3.12+ (if installing manually)\n\n### Option 1: Use the Prebuilt Docker Image (Recommended)\n\nThe easiest way to get started is to pull and run our [prebuilt image](https:\u002F\u002Fhub.docker.com\u002Fr\u002Fztonyzhao\u002Fmeshy):\n\n```bash\ndocker pull ztonyzhao\u002Fmeshy:0.1.0-alpha\ndocker run --gpus all -it --rm ztonyzhao\u002Fmeshy:0.1.0-alpha\n```\n\n### Option 2: Use the Provided Dockerfile\n\nYou can also build the Docker image yourself.\n\n```bash\ndocker build -t meshy .\ndocker run --gpus all -it --rm meshy\n```\n\nThis will drop you into a shell with the virtual environment already activated at `\u002Fopt\u002Fmeshy`. All dependencies (PyTorch, SGLang, TorchTitan, TransferQueue) are pre-installed.\n\n### Option 3: Manual Installation\n\nIf you prefer to set up the environment without Docker, follow the step-by-step guide in [docs\u002Fmanual_install.md](docs\u002Fmanual_install.md).\n\n### Run a recipe\n\nFrom the repository root, launch any recipe with the same command. The\nlauncher starts TransferQueue, then runs `torchrun` with one ignitor per\nGPU:\n\n```bash\npython scripts\u002Flaunch.py --recipe recipe.grpo_gsm8k\n```\n\nThis is the smallest end-to-end run: Qwen3-1.7B on GSM8K, one GPU by default. Model weights are downloaded from Hugging Face on first use.\nLogs, checkpoints, and TensorBoard events land under `.xrl_runtime\u002F\u003Ctimestamp>\u002F`.\n\nFor the JustRL lock-step GRPO setup (8 colocated cards), swap the module:\n\n```bash\npython scripts\u002Flaunch.py --recipe recipe.justrl\n```\n\nUse `recipe.justrl_smoke` for a two-batch sanity check of that layout. The\ntable below lists every bundled recipe; only the module name after `--recipe`\nchanges.\n\n## Recipes\n\nA recipe is a plain Python module under `recipe\u002F` that declares the services of\na run and hands them to the ignitor. Every recipe below runs through the same\nlauncher:\n\n```bash\npython scripts\u002Flaunch.py --recipe recipe.\u003Cname>\n```\n\n| Recipe | Model \u002F data | GPUs and layout | Pacing | What it shows |\n|---|---|---|---|---|\n| `grpo_gsm8k` | Qwen3-1.7B · GSM8K | `XRL_NGPUS` cards; `XRL_TOPOLOGY=colocate` (1×TP`N` + FSDP`N` on the same cards) or `disaggregate` (`N`×TP1 + FSDP on the rest) | 1 | The minimal, env-tunable baseline; the same file switches topology |\n| `grpo_gsm8k_qwen3_8b` | Qwen3-8B · GSM8K | 8 cards; 8×TP1 inference colocated with 1×FSDP8 trainer | 1 | Asymmetric colocation: inference and training partition the same cards differently |\n| `justrl` | R1-Distill-Qwen-1.5B · DAPO-Math-17k | 8 cards; 8×TP1 + DDP8 colocated | 1 | Lock-step GRPO with the [JustRL](https:\u002F\u002Farxiv.org\u002Fabs\u002F2512.16649) hyper-parameters |\n| `justrl_async` | same | same | 2 | Bounded off-policy overlap: generation may run one batch ahead of training |\n| `justrl_fully_async` | same | 16 cards; 8×TP1 inference + 1×DDP8 trainer, disaggregated | `None` | Fully asynchronous with `stream_minibatch`: the trainer steps as chunks arrive |\n| `justrl_smoke` | same | 8 cards, colocated | 1 | Two-batch, one-epoch version of `justrl` for end-to-end checks |\n| `justrl_minicpm5_1b` \u002F `_2b` \u002F `_2b_4gpu` | MiniCPM5-1B \u002F 2B · DAPO-Math-17k | 8 cards (or 4) colocated | 1 | JustRL setup on the MiniCPM5 family |\n| `justrl_qwen3_30b_a3b` | Qwen3-30B-A3B (MoE) · DAPO-Math-17k | 8 cards; 1×(TP8 + EP8) inference colocated with 1×FSDP8 trainer | 1 | MoE inference with expert parallel; 16k context |\n| `math_grpo_minicpm5_2b` \u002F `_4gpu` | MiniCPM5-2B · local S9 math set | 8 cards (or 4); 8×TP1 inference colocated with a CP4 trainer | `None` | 128k context: context parallel, dynamic batching, custom advantage shaping, 1024 in-flight requests |\n\n### Same services, one knob\n\n`justrl`, `justrl_async` and `justrl_fully_async` train the same model with the\nsame hyper-parameters. They differ only in the rollout config and, for the last\none, the GPU layout:\n\n| | `pacing_window` | `async_max_running_request` | Trainer | Topology |\n|---|---|---|---|---|\n| `justrl` | `1` | — | batch | colocate |\n| `justrl_async` | `2` | `1.5 × batch` | batch | colocate |\n| `justrl_fully_async` | `None` | `1.5 × batch` | `stream_minibatch=True` | disaggregate |\n\nThere is no separate synchronous or asynchronous code path in the framework:\nthe trainer always emits one gate per weight version, and the rollout service\ndecides how many gates it waits for.\n\n### Writing your own recipe\n\nA recipe exports three things: `SERVICE_GROUPS`, `COLOCATIONS` (when GPU\ngroups share cards) and `main()`. Roles are typed configs; wiring between\nthem is derived by the ignitor.\n\n```python\nfrom meshy.config import InferenceServiceConfig, RolloutServiceConfig, TrainingServiceConfig\nfrom meshy.service.base import ServiceGroup\nfrom meshy.service.colocation import ColocationRing, SchedulingMode\nfrom meshy.service.ignite import Ignitor\n\nSERVICE_GROUPS = [\n    ServiceGroup(\n        id=\"actor_infer\",\n        config=InferenceServiceConfig(model_path=MODEL, server_args={\"tp_size\": 1, \"enable_memory_saver\": True}),\n        n_replicas=8, n_gpus_per_replica=1,\n    ),\n    ServiceGroup(\n        id=\"actor_train\",\n        config=TrainingServiceConfig(model_path=MODEL, trainer_config=..., batch_size=2048),\n        n_replicas=1, n_gpus_per_replica=8,\n    ),\n    ServiceGroup(\n        id=\"rollout\",\n        config=RolloutServiceConfig(\n            model_path=MODEL,\n            dataset=\"meshy.dataset.math:MATH\",\n            reward=\"meshy.dataset.math:MATH.reward\",\n            group_size=8, pacing_window=1,\n        ),\n        n_replicas=1, n_gpus_per_replica=0,\n    ),\n]\n\nCOLOCATIONS = [\n    ColocationRing(\n        group_id=\"actor_card\",\n        ring=((\"actor_infer\", SchedulingMode.FALLBACK),\n              (\"actor_train\", SchedulingMode.ON_DEMAND)),\n    ),\n]\n\n\ndef main() -> None:\n    Ignitor(SERVICE_GROUPS, COLOCATIONS).run()\n```\n\n- `dataset`, `reward` and `advantage` accept `\"module:attr\"` strings, so a new\n  task is a class with `next_batch()` and a reward function — no framework\n  edit.\n- Drop `colocate_with` and `COLOCATIONS` to run disaggregated; the same\n  services run unchanged with a no-op colocation manager.\n- A new role is a `ServiceConfig` subclass pointing at a `Service` class; add\n  it to `SERVICE_GROUPS` and, if it needs to share GPUs, to a ring.\n\nSee [`docs\u002Fhow_to_build_a_recipe.md`](docs\u002Fhow_to_build_a_recipe.md) for a\nstep-by-step guide.\n\n## Citation\n\nIf you find Meshy helpful, please cite us.\n\n```bibtex\n@misc{zhao2026meshy,\n    title   = {Meshy: A Role-Driven RL Training Framework under SPMD Paradigm},\n    author  = {Tianyun, Zhao and Ao, Sun and Changlong, Li and Yinghao, Chen and Haoxuan, Pan and Jinqian, Zhang and Zekai, Qu and Bingxiang, He and ChaoJun, Xiao and Xu, Han},\n    year    = {2026},\n    url     = {https:\u002F\u002Fmaydomain.notion.site\u002Fmeshy-blog-en},\n    note    = {Blog post},\n    urldate = {2026-09-06},\n }\n```\n\n## Acknowledgements\n\nMeshy composes a handful of outstanding open-source projects:\n\n- **[torchtitan](https:\u002F\u002Fgithub.com\u002Fpytorch\u002Ftorchtitan)** — PyTorch-native\n  distributed training engine behind every trainer\n- **[SGLang](https:\u002F\u002Fgithub.com\u002Fsgl-project\u002Fsglang)** — Fast serving framework\n  for large language models, and the memory saver that makes colocation work\n- **[TransferQueue](https:\u002F\u002Fgithub.com\u002FAscend\u002FTransferQueue)** —\n  High-performance distributed data transfer queue, used here as the one and\n  only data and control plane\n\nIts design is indebted to the pioneering work of\n[verl](https:\u002F\u002Fgithub.com\u002Fverl-project\u002Fverl),\n[slime](https:\u002F\u002Fgithub.com\u002FTHUDM\u002Fslime),\n[miles](https:\u002F\u002Fgithub.com\u002Fradixark\u002Fmiles) and\n[Relax](https:\u002F\u002Fgithub.com\u002Fredai-infra\u002FRelax).\n\nThe bundled recipes stand on open datasets and published setups: `justrl*`\nreproduces [JustRL](https:\u002F\u002Farxiv.org\u002Fabs\u002F2512.16649) on\n[DAPO-Math-17k](https:\u002F\u002Fhuggingface.co\u002Fdatasets\u002FBytedTsinghua-SIA\u002FDAPO-Math-17k), with models from the\n[MiniCPM](https:\u002F\u002Fgithub.com\u002FOpenBMB\u002FMiniCPM) and\n[Qwen](https:\u002F\u002Fgithub.com\u002FQwenLM) families.\n","Meshy 是一个面向大语言模型（LLM）强化学习训练的异步分布式框架，将RL训练中的推理、 rollout 和训练等角色建模为独立服务，通过统一的 TransferQueue 数据平面实现无中心调度的松耦合协作。其核心特点是基于声明式拓扑配置的 SPMD 风格本地化部署、队列驱动的纯数据流控制机制、原生支持同步\u002F异步及有界离策略算法，以及 GPU 资源令牌化共享。适用于需要高吞吐、低延迟、可调试的大规模 LLM RLHF 或 PPO 训练场景。",2,"2026-09-10 02:30:06","CREATED_QUERY"]