项目简介
Miles 是面向企业的大规模 LLM/VLM 后训练强化学习框架,fork 自 slime。它结合 SGLang 高吞吐 rollout 与 Megatron-LM 可扩展训练,支持全异步 RL、秒级权重更新与低精度训练,兼容前沿模型与多种硬件。
README 预览
\n\n\n\n### **Enterprise-Grade Reinforcement Learning for Large-Scale Model Post-Training**\n\n[](https://miles.radixark.com/)\n[](https://github.com/radixark/miles)\n[](https://miles.radixark.com/docs)\n[](LICENSE)\n[](https://slack.sglang.ai)\n\n| [**Website**](https://miles.radixark.com/) | [**Documentation**](https://miles.radixark.com/docs) | [**Quick Start**](https://miles.radixark.com/docs/getting-started/quick-start) | [**Supported Models**](https://miles.radixark.com/docs/models) | [**Miles Diffusion**](https://github.com/radixark/miles_diffusion) | [**Blog**](https://www.lmsys.org/blog?filter=miles) | [**Slack**](https://slack.sglang.ai) (`#miles-rl`) |\n\n\n\n--------------------------------------------------------------------------------\n\n## News\n\n- [2026/08] 🔥 Miles v0.1 is released! Read the blog post here: [Miles v0.1: Production-level Post-training](https://www.lmsys.org/blog/2026-08-18-miles-v0-1).\n- [2026/07] Towards Blackwell-Native 8-bit and 4-bit RL: End-to-End MXFP8 and NVFP4 RL in Miles ([blog](https://www.lmsys.org/blog/2026-07-29-mxfp8-nvfp4-rl)).\n- [2026/07] 🔥 SGLang and Miles add day-0 support for Kimi K3 ([blog](https://www.lmsys.org/blog/2026-07-27-kimi-k3-day0-support)).\n- [2026/07] On-policy distillation lands in Miles ([blog](https://www.lmsys.org/blog/2026-07-18-opd-support-in-miles)).\n- [2026/07] 🔥 SGLang and Miles add day-0 support for Inkling, a frontier multimodal model ([blog](https://www.lmsys.org/blog/2026-07-15-inkling-day0-support)).\n- [2026/07] DeepSeek-V4 Flash RL training comes to AMD Instinct MI355X with Miles ([blog](https://www.lmsys.org/blog/2026-07-10-rocm-miles-dsv4)).\n- [2026/06] SGLang and Miles add day-0 support for NVIDIA Nemotron 3 Ultra ([blog](https://www.lmsys.org/blog/2026-06-04-nvidia-run-nemotron-3-ultra)).\n- [2026/05] No token left behind: token-in-token-out in Miles ([blog](https://www.lmsys.org/blog/2026-05-13-no-token-left-behind)).\n- [2026/04] Updating 1 T parameters in seconds: P2P we
常见问题 (2)
故障排除在 Slurm/Ray 集群上启动 miles 时,如何修复 SGLang router 的 'Invalid address: invalid socket address syntax' 错误?
发生这种情况的原因是 sglang_router.launch_router --host 只接受 IP 字面量(它会被解析为 Rust 的 SocketAddr),但在 Slurm 管理的集群上,Ray 会以主机名(例如 node1234)的形式报告节点地址,因此路由器在绑定之前就会退出,随后运行会以 "Server at <host>:<port> not ready after 120s" 错误而失败。
修复方法:将 miles 升级到包含 PR #3356(commit 9fecf0ff)的版本。该版本会将传入的主机名解析为 IP 字面量,作为路由器的绑定地址,同时为连接端的 URL 和分布式初始化保留主机名。已在 GB200/GB300 的 Slurm 环境上使用 sglang-router 0.3.2 验证有效。
旧版本的临时解决办法:让 Ray 通告 IP 字面量而非主机名,即在启动 Ray 时使用 --node-ip-address=<node-IP> 而不是 $(hostname)。请注意,--miles-host-ip 0.0.0.0 并不是一个有效的通用临时解决办法。
故障排除如何修复在 Qwen3-235B-A22B (MoE) 上进行 Miles p2p weight-sync 时出现的 'Process group MagicMock mock.cpu_group is not initialized in the world group map' 错误?
崩溃的原因是:Miles 的 _create_cpu_replica()(位于 update_weight_from_distributed/p2p.py)构建了一个一次性的纯 CPU 副本用于推导分片布局,并将 tp_group.cpu_group 打桩为 MagicMock。随后 SGLang 模型构建会初始化 MultimemAllGatherer(triton_symm_mem_ag),它通过 torch.distributed.get_backend(tp_group.cpu_group) 探测拓扑,并在未注册的 mock 组上失败。变通方案:1) 应用 PR #2605 中的修复——仅以 nnodes=1 覆盖本地 P2P 结构副本(在当前 main 上,通过 get_context().override(...))。这会短路 MultimemAllGatherer 的拓扑探测,同时保留 TP/EP 分片几何结构;请注意,该方案尚未在 235B MoE 多节点运行中得到充分验证,剩余的 MoE 暂存/布局限制记录在 #2605 中。2) 使用 broadcast 权重同步模式代替 p2p——Qwen3-235B-A22B 的 broadcast 在同一测试矩阵中已成功完成。