Metal Sandbox:面向 Apple Silicon GPU 编码智能体的隔离执行与命令调度基础设施
Metal Sandbox: Isolated Execution and Command Scheduling for GPU Coding Agents on Apple Silicon
做 Apple Silicon 上 Metal 内核生成智能体的开发者可以看看这套开源基础设施,它把多台 Mac 的 GPU 调度起来,实测吞吐提升到 2 倍左右,还和 Harbor 打通自动验证流程,比单机排队跑 rollout 的方式省不少等待时间。
研究团队发布 Metal Sandbox,一套面向 Apple Silicon 上 Metal 内核生成智能体的执行基础设施,结合受限文件访问、原生命令执行与跨多台 Mac 的命令级调度。系统为每个智能体提供独立工作区和私有开发环境,并行命令可同时运行,串行命令共享每节点一个执行槽,符合条件的等待命令可迁移到其他可用 Mac 并把结果返回原智能体,并与 Harbor 集成实现任务执行、自动验证和 rollout 收集。
在四台 Mac mini M4 节点的受控实验中,集中负载下命令吞吐量提升 1.68 倍至 2.05 倍;基于 16 条静态智能体轨迹的估算显示,每节点 4 个会话相对 1 个会话可获得 2.14 倍持续吞吐量增益。按动态调度重放实测轨迹后,平均工具等待时间减少 18.8%,批处理总耗时缩短 22.3%。
该系统针对本地推理场景中 GPU 容量在 rollout 期间大量闲置的问题,把原本串行交替的模型请求、开发命令和 GPU 执行改为可调度并发的流程。Metal Sandbox 及其 Harbor 集成已在 GitHub 开源,面向在 Mac 集群上训练和评估内核生成模型的开发者。
Metal Sandbox: Isolated Execution and Command Scheduling for GPU Coding Agents on Apple Silicon
On-device inference requires kernels that make effective use of local accelerators. Efficient training and evaluation of models that generate Apple Metal kernels benefit from native macOS tools and concurrent agent sessions. These sessions alternate between model requests, development commands, and GPU execution, leaving GPU capacity idle for much of a rollout. We present Metal Sandbox, infrastructure that combines restricted per-instance file access, native command execution, and command-level scheduling across interconnected Macs. Each agent retains its workspace and private development environment. Parallel commands can run concurrently, while serial commands share one execution slot per node; eligible waiting commands can migrate to available Macs and return results to the original agent. Integration with Harbor supports task execution, automatic verification, and rollout collection through a common workflow. Controlled experiments on four Mac mini M4 nodes achieve $1.68\times$--$2.05\times$ gains in command throughput under concentrated demand. Sixteen static agent traces give an estimated $2.14\times$ sustained-throughput gain for four sessions per node versus one, assuming continuously replenished sessions and unchanged mean durations. Replaying these measured traces under dynamic scheduling reduces mean tool waiting by 18.8% and batch elapsed time by 22.3%, assuming unchanged phase durations. Metal Sandbox and its Harbor integration are open-source on GitHub.
This report is categorized under AITOP's "Papers" desk, focusing on US frontier AI labs and Silicon Valley technology leaders. Within our cross-regional analytical framework, it directly maps to AI developer toolchains, coding agents, and engineering workflows. Key entities and technical topics under continuous tracking include Metal, Apple Silicon, Harbor, GPU调度.
Source attribution: curated from arXiv cs.LG (@Haozhe Wang, Lina Chen, Fanqi Wan, Qi Han, Yinmin Zhang, Zheng Ge, Daxin Jiang, Junchi Yan).