[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"news-slug-metal-sandbox-mac-cluster-gpu-scheduling":3,"topics-all":38,"news-related-e8f13686-3f2f-468a-b974-55634bb30795":67},{"id":4,"title":5,"summary":6,"content":7,"original_url":8,"source_id":9,"tags":10,"translations":24,"news_slug":31,"published_at":32,"created_at":33,"modified_at":34,"is_published":35,"publish_type":36,"image_url":14,"view_count":37},"e8f13686-3f2f-468a-b974-55634bb30795","Metal Sandbox:Mac 集群的 GPU 调度术","Metal Sandbox 让多台 Mac mini 组队跑 GPU coding agent。论文实测,单会话 31.6 分钟里 GPU 只忙 44.0 秒(2.32%),四台 Mac mini M4 集中提交时命令吞吐提升 1.68 至 2.05 倍,回放 agent 轨迹后工具等待降 18.8%。","让大模型去写 Metal kernel，光有模型不够，还得有一整套能反复编译、跑、改、再拿 GPU 时间戳当反馈的执行环境。\n\n端侧推理的逻辑很直接：推理要跑在本地加速器上，Apple Silicon 上的 Metal 是绕不开的通路；想让模型学会写 Metal kernel，就得让它在自己的机器上真的把 kernel 编译出来、跑起来、看到性能数字。这天然需要多个 agent 会话并发。\n\n然后问题就来了。论文用 Apple Instruments 的 Metal System Trace 量了一次 metal_nbody 会话（单 agent、无竞争）：31.6 分钟里 GPU 真正在跑的只有 44.0 秒，占 2.32%。其余时间，agent 在等命令、在改代码、在推理。\n\n更麻烦的是，并发会话并不会自动把 GPU 填满。16 个会话摊在 4 台 Mac 上时，一个平均会话 45.1 分钟里有 21.0 分钟耗在工具等待上；最忙那台 Mac 上的会话平均等 32.7 分钟，最闲那台只要 13.3 分钟。集群内部本身就压不匀。\n\n## 调度粒度下沉到单条命令\n\nMetal Sandbox（[arXiv:2611.17294](https:\u002F\u002Farxiv.org\u002Fabs\u002F2611.17294)，上海交大、北京中关村学院与阶跃星辰）把调度的粒度从「一个会话」降到「一条命令」。每个 agent 拿到独立的沙箱实例、专属工作区和私有 HOME，命令跑在 Apple 的 App Sandbox 进程里；按白名单匹配的（文件查看、编译、构建）并行执行，其余进每台机器唯一的串行 FIFO 槽位。\n\n真正的巧思是跨机迁移：排队等槽位的串行命令，如果目标机器有空位，就通过预留—认领—提交三步搬到别的 Mac 上跑，结果再送回原 agent。为此每个实例的 workspace 和 HOME 必须在各节点挂在同一绝对路径上（共享 SMB 挂载），控制器走 SSH 调各节点的 CLI。\n\n## 两个数字\n\n受控实验用四台 Mac mini M4（每台 32 GiB 内存、macOS 27.0.1，千兆交换机互联），跑六个手写 Metal kernel。均衡提交时，一台机器 25.2 秒的批次在四台静态并行下是 6.62 秒，动态调度 6.61 秒——这部分提升来自并行，不是迁移。真正拉开差距的是集中提交：静态 25.3 秒降到 15.1 秒，降幅 40.4%，吞吐 1.68 倍；批次内队列 p95 从 21.9 秒压到 11.9 秒，降 45.5%。命令拉长到六秒循环时更好，36.8 秒降到 18.0 秒，吞吐 2.05 倍，每小时 588 条对 1,200 条。\n\n真实 agent 轨迹的回放则是另一组数。16 个 mini-SWE-agent 会话（mini-SWE-agent 2.4.6，模型是 Step 5 Preview，每个 agent 3,600 秒预算、单条工具 600 秒），实测整批 67.6 分钟、平均工具等待 21.0 分钟，其中 114 条并行命令、1,165 条串行命令。把这些已测轨迹按动态调度回放，平均等待降到 17.1 分钟（-18.8%），整批 52.5 分钟（-22.3%），主回放共完成 276 次命令迁移。\n\n## 这笔账没那么干净\n\n三点得说清楚。\n\n第一，迁移不便宜。27 次显式迁移测下来，查单加预留的中位数就要 0.818 秒，认领 0.97 毫秒、提交 3.89 毫秒，整条路径在零负载时中位数 1.86 秒，带 16 MiB 读取升到 2.16 秒。所以短命令迁移是亏的，收益主要来自长命令。\n\n第二，这是再分配，不是凭空多出算力。回放里 16 条轨迹，8 条等待变少、8 条变多；最忙的 Mac mini #A 从 32.7 分钟降到 15.8 分钟，#C 和 #D 反而变差。论文自己说明，回放固定了模型行为和各阶段时长，无法预测工具反馈变化带来的行为差异。敏感性扫描覆盖 166 组参数后，平均等待降幅落在 6.78% 到 20.4% 之间、整批耗时降幅落在 15.6% 到 27.8% 之间——18.8% 和 22.3% 只是区间中段的一个点。\n\n第三，这套设计本身破了测量的前提。仓库 README 写明没有 GPU 分区或独占保证，其它应用和并行任务都可能干扰计时，文件访问限制不覆盖全部应用启动路径，且只面向可信本地开发，未解决的 LaunchServices 逃逸风险仍在。对一个专门用来量 kernel 性能的系统来说，这意味着数字要打折看。\n\n还得交代一句出处：这是一篇 2026 年 11 月 12 日挂上 arXiv 的预印本，16 页、7 图、5 表，页面没有标注会议或期刊接收，读者要按预印本对待。\n\n另外，Docker 的 GPU 直通在 macOS 上根本没有正路——Docker 官方文档写明 GPU passthrough 只在 Windows 配 WSL 2 后端可用。这也是为什么这篇论文不走容器路线，而是回到 macOS 原生的 App Sandbox。\n\n## 机制层不是孤证\n\n「Metal kernel 上要让模型反复试错、需要专门的执行环境」不是这一篇的独家发现。Metal-Sci（[arXiv:2605.09708](https:\u002F\u002Farxiv.org\u002Fabs\u002F2605.09708)，ICML 2026 DL4C workshop）用 10 个科学计算任务驱动 LLM 做进化式 kernel 搜索，在 M1 Pro 上自加速从 1.00 倍到 10.7 倍；它报告的一个案例很说明问题：GPT 的 FFT3D 最佳解在分布内拿到 2.95 倍加速，换到留出的 256 立方体网格上塌到 0.23 倍——分布内分数看不见这种静默回归。Dr. Kernel 那条线（[arXiv:2602.05885](https:\u002F\u002Farxiv.org\u002Fabs\u002F2602.05885)）从 RL 侧补了同样的需求，它专门做了一个分布式 GPU 环境 KernelGYM 来收多轮交互数据。\n\n这套东西与其 Harbor 集成已经开源在 [github.com\u002FWangHaoZhe\u002Fmetal-sandbox](https:\u002F\u002Fgithub.com\u002FWangHaoZhe\u002Fmetal-sandbox) 和 [github.com\u002FWangHaoZhe\u002Fharbor](https:\u002F\u002Fgithub.com\u002FWangHaoZhe\u002Fharbor)。\n\n## 所以呢\n\n这篇的价值不在刷新跑分，而在于指认了一个容易被忽略的位置：端侧推理要 Metal kernel，训练模型写 Metal kernel 要多路 agent，agent 的 GPU 占用只有百分之二点几——真正的瓶颈常常不在算力够不够，而在排队和调度怎么写。\n\n如果你正在搭端侧模型的训练或评测环境，两个判断值得直接抄：一是把并行还是串行的判定下沉到单条命令，而不是整个会话；二是集群内部队列不均衡时，让等待中的任务能跨机器走一趟。同时别忘了它自己承认的三条限制：迁移有固定开销，收益本质是再分配，而且这套环境并不保证 GPU 独占——拿它量出来的性能数字，得自己再核一遍。\n","https:\u002F\u002Farxiv.org\u002Fabs\u002F2611.17294","7437aeb9-930c-4866-a2e9-48003c1a792b",[11,15,18,21],{"id":12,"name":13,"slug":13,"description":14,"color":14},"6ad31a14-c0da-42df-81fd-564281f768db","agentic-ai",null,{"id":16,"name":17,"slug":17,"description":14,"color":14},"7ac06d8e-b074-4147-abfc-ffaa4c6b8744","ai-efficiency",{"id":19,"name":20,"slug":20,"description":14,"color":14},"e0d31e94-ce47-4c8f-831c-d3d2926d42f3","hardware",{"id":22,"name":23,"slug":23,"description":14,"color":14},"01598627-1ea6-4b27-a5d8-874971571a71","llm",[25],{"id":26,"lang":27,"title":28,"summary":29,"content":30},"f70a3233-0baf-4209-b6c6-87619bfa138e","en","Metal Sandbox keeps a Mac cluster's GPUs busy","Metal Sandbox makes Mac mini nodes a GPU team. The GPU is busy 44.0 seconds of 31.6 minutes; four Mac mini M4 nodes get 1.68 to 2.05 times throughput.","Getting a large language model to write Metal kernels needs more than the model. It needs an execution environment where the model can compile, run, edit, and read back GPU timings, over and over.\n\nThe logic of on-device inference is straightforward: inference has to run on local accelerators, and Metal on Apple Silicon is the path that cannot be skipped. To teach a model to write Metal kernels you have to let it actually compile them on real hardware, run them, and look at the performance numbers. That naturally calls for several agent sessions running concurrently.\n\nThen the trouble shows up. Using Apple Instruments Metal System Trace, the paper measures a single metal_nbody session with no competing agents: out of 31.6 minutes, the GPU is genuinely active for only 44.0 seconds, or 2.32% of the session. The rest of the time the agent is waiting on commands, editing code, and thinking.\n\nWorse, concurrent sessions do not automatically fill the GPU. With sixteen sessions spread across four Macs, an average session spends 21.0 of its 45.1 minutes waiting on tools. Sessions on the busiest Mac wait 32.7 minutes on average, while those on the least busy wait 13.3 minutes. The cluster is already uneven internally.\n\n## Scheduling granularity drops to a single command\n\nMetal Sandbox (arXiv:2611.17294, from Shanghai Jiaotong University, Beijing Zhongguancun Academy and StepFun) pushes the scheduling granularity down from one session to one command. Each agent gets its own sandbox instance, a dedicated workspace and a private HOME; commands run inside an Apple App Sandbox process. Anything matching an allowlist (file inspection, compilation, builds) executes in parallel, while everything else enters the single serial FIFO slot each node has.\n\nThe genuinely clever part is cross-machine migration. A serial command stuck in the queue can move to another Mac with a free slot through a reserve, claim and commit sequence, and its result is returned to the original agent. This requires every instance workspace and HOME to be mounted at the same absolute path across nodes (shared SMB mounts), while the controller drives each node CLI over SSH.\n\n## Two sets of numbers\n\nThe controlled experiments use four Mac mini M4 nodes (32 GiB memory each, macOS 27.0.1, connected through a gigabit Ethernet switch) running six hand-written Metal kernels. Under balanced submission, a 25.2 second batch on one node takes 6.62 seconds with static execution across four nodes, and 6.61 seconds with dynamic scheduling, so that gain comes from parallelism rather than migration. The real gap opens up under concentrated submission: static 25.3 seconds drops to 15.1 seconds, a 40.4% reduction and a 1.68 times throughput gain, while the within-batch queue p95 falls from 21.9 seconds to 11.9 seconds, down 45.5%. Longer commands do even better. At a six-second loop, 36.8 seconds becomes 18.0 seconds, throughput improves 2.05 times, and 588 commands per hour becomes 1,200.\n\nThe replay over real agent traces gives a different set of numbers. Sixteen mini-SWE-agent sessions (mini-SWE-agent 2.4.6, model Step 5 Preview, with 3,600 seconds of budget per agent and 600 seconds per tool) measure a batch of 67.6 minutes and mean tool waiting of 21.0 minutes, containing 114 parallel and 1,165 serial tool commands. Replaying those already-measured traces under dynamic scheduling drops mean waiting to 17.1 minutes (-18.8%) and the batch to 52.5 minutes (-22.3%), with the main replay completing 276 command migrations.\n\n## The bill is not that clean\n\nThree things need saying.\n\nFirst, migration is not cheap. Across 27 explicit migrations, looking up the command and reserving a slot takes a median of 0.818 seconds on its own; claim takes 0.97 milliseconds and commit 3.89 milliseconds. The whole path has medians of 1.86 seconds at zero load, rising to 2.16 seconds when reading 16 MiB. Short commands therefore lose money on migration, and the gains come mainly from long commands.\n\nSecond, this is redistribution, not extra compute conjured from nowhere. Of the sixteen replayed trajectories, eight wait less and eight wait more. The initially busiest Mac mini #A drops from 32.7 minutes to 15.8, while #C and #D incur more waiting. The paper notes that the replay fixes model behaviour and phase durations, so it cannot predict behaviour changes caused by different tool feedback. Across 166 parameter settings, the sensitivity sweep puts the mean waiting reduction between 6.78% and 20.4%, and the batch elapsed time reduction between 15.6% and 27.8%. The 18.8% and 22.3% headline numbers are one point in that band.\n\nThird, the design itself breaks the premise of the measurement. The repository README states there is no GPU partitioning or GPU-call detection and no exclusivity, that other applications and parallel tasks may affect measurements, that file-access restrictions do not cover every application-launch path, and that this is trusted local development only with an unresolved LaunchServices escape risk. For a system whose whole purpose is measuring kernel performance, that means the numbers deserve a discount.\n\nOne note on provenance: this is an arXiv preprint submitted on 12 November 2026, running 16 pages with 7 figures and 5 tables, and the listing records no conference or journal acceptance. Readers should treat it as a preprint.\n\nThere is also no clean route to GPU passthrough on macOS: Docker's own documentation states that GPU passthrough to Linux containers is only available on Windows with the WSL 2 backend. That is part of why this paper skips the container route and returns to macOS native App Sandbox.\n\n## The mechanism is not a one-off finding\n\nNeeding a dedicated execution environment where a model can iterate on Metal kernels is not exclusive to this paper. Metal-Sci (arXiv:2605.09708, published at the Fifth Workshop on Deep Learning for Code at ICML 2026) drives evolutionary LLM kernel search over ten scientific compute tasks, reporting in-distribution self-speedups from 1.00 times to 10.7 times on M1 Pro. One of its cases makes the point sharply: the best GPT FFT3D solution wins in-distribution at 2.95 times speedup, then collapses to 0.23 times on a held-out cube of size 256, a silent regression the in-distribution score alone cannot see. The Dr. Kernel line (arXiv:2602.05885) fills in the same need from the reinforcement learning side, building a distributed GPU environment called KernelGYM to collect multi-turn interaction data.\n\nMetal Sandbox and its Harbor integration are open-source on GitHub, at github.com\u002FWangHaoZhe\u002Fmetal-sandbox and github.com\u002FWangHaoZhe\u002Fharbor.\n\n## So what\n\nThe value here is not a fresh benchmark number. It is pointing at a position that is easy to overlook: on-device inference wants Metal kernels, training a model to write Metal kernels wants many agent sessions, and those agents keep the GPU busy only about two percent of the time. The real bottleneck is often not whether there is enough compute, but how queuing and scheduling are written.\n\nIf you are building the training or evaluation environment for an on-device model, two judgements are worth copying directly. First, push the decision between parallel and serial down to the individual command rather than the whole session. Second, when queues inside a cluster are unbalanced, let waiting work travel to another machine. Just keep the three stated limits in mind: migration carries a fixed cost, the gains are fundamentally redistribution, and this environment does not guarantee GPU exclusivity, so any performance figure you measure with it deserves a second look.\n","metal-sandbox-mac-cluster-gpu-scheduling","2026-11-15T03:15:00Z","2026-11-15T03:09:21.590952Z","2026-11-15T03:09:21.590961Z",true,"agent",151,[39,49,58],{"slug":40,"tag_slug":41,"title_zh":42,"title_en":43,"intro_zh":44,"intro_en":45,"id":46,"is_active":35,"created_at":47,"modified_at":48},"image-generation","text-to-image","图像生成：从文生图到逐框编辑的模型竞赛","Image Generation: from text-to-image to frame-level editing","文生图已是红海，战场正转向编辑与可控性：FLUX.2\u002F3 用开源和量化把生图搬进消费级显卡，Qwen-Image、Seedream 等国产模型紧咬不放，GPT Image 2 则把推理能力带进像素。本专题追踪图像生成与编辑模型的发布、架构演进、加速量化与商业化数据，看「好图」如何变成「可用的图」。","Text-to-image is a crowded race, and the frontier has moved to editing and control: FLUX.2\u002F3 push open weights and quantization onto consumer GPUs, Qwen-Image and Seedream close in from China, and GPT Image 2 brings reasoning into pixels. This topic tracks model releases, architecture shifts, acceleration work, and the business numbers behind \"pretty\" becoming \"usable\".","52de7c59-7864-4569-8ae7-3d656d26a1a1","2026-11-20T07:20:23.534506Z","2026-11-20T07:20:23.534527Z",{"slug":50,"tag_slug":50,"title_zh":51,"title_en":52,"intro_zh":53,"intro_en":54,"id":55,"is_active":35,"created_at":56,"modified_at":57},"ai-for-science","AI for Science 2026：从 UniPert 到 GPT-Rosalind 的硬核进化","AI for Science 2026: from UniPert to GPT-Rosalind","生命科学、化学材料、物理世界模型——AI 正在从\"语言工具\"变成\"实验伙伴\"。本专题收录 AI 在三大科学方向的关键节点：UniPert 统一基因与化学扰动空间、GPT-Rosalind 端到端生命科学推理、达摩院 AI 智能体 28 小时找到 4 种超导新材料、Anthropic Claude Science 把工作台做成标准品。","From language tool to lab partner — AI is reshaping life sciences, chemistry\u002Fmaterials, and physical world models. This topic covers the key milestones: UniPert unifying genetic-chemical perturbation spaces, GPT-Rosalind's end-to-end life-sciences reasoning, DAMO's AI agent discovering 4 superconducting materials in 28 hours, and Anthropic's Claude Science workbench going mainstream.","988a4300-5fab-41c4-b5d8-63711a2dc757","2026-09-10T01:34:15.296649Z","2026-09-10T01:34:15.296663Z",{"slug":59,"tag_slug":59,"title_zh":60,"title_en":61,"intro_zh":62,"intro_en":63,"id":64,"is_active":35,"created_at":65,"modified_at":66},"h3-series","MiniMax H3 系列：从开源权重到 35 倍吞吐","MiniMax H3 Series: from open weights to 35x throughput","MiniMax H3 自 2026 年 8 月开源以来节奏密集：官方把生成、参考与编辑收回一个模型；ComfyUI 当天压进 RTX 3060；摩尔线程 3 小时完成国产 GPU 适配；fal 后训练版把吞吐拉到 35 倍；FastH3 蒸馏再砍推理成本。本专题持续追踪 H3 的发布—开源—蒸馏—部署全链路。","Since MiniMax open-sourced H3 in August 2026 the pace has been relentless: one unified omni-modal model, same-day ComfyUI support down to an RTX 3060, a 3-hour Day-0 port to Moore Threads GPUs, fal's post-trained H3 Max at 35x throughput, and FastH3 distillation cutting inference cost further. This topic tracks the full H3 chain — release, open weights, distillation, deployment.","83ef0daa-3c31-4cb3-86ed-e5ee58654d5f","2026-09-08T07:33:19.942193Z","2026-09-08T07:33:19.942209Z",{"items":68},[69,74,79,84,89,94],{"id":70,"title":71,"news_slug":72,"published_at":73},"1c9b3e02-69f2-452f-9137-ff9c2ddcf7fb","手机上的模型工厂:小模型自动定制,五项反超前沿模型","mobile-ai-factory-on-device-slm","2026-11-12T23:15:00+00:00",{"id":75,"title":76,"news_slug":77,"published_at":78},"8676e640-c0d6-4066-9021-f82e3adaffda","Memento:8B 模型读完 250 万 token 长书","memento-context-management-long-context-agent","2026-11-04T03:10:00+00:00",{"id":80,"title":81,"news_slug":82,"published_at":83},"74cb8016-bdf7-4c8b-adbc-456d8c899b1a","EdgeWise 把 9B 模型训练成「喊人」高手:边云协同砍半成本","nvidia-edgewise-edge-cloud-slm-self-delegation-coding","2026-10-19T01:01:45+00:00",{"id":85,"title":86,"news_slug":87,"published_at":88},"97ee186c-a42b-4389-8427-3342d77e8590","小模型何时喊云端大模型?NVIDIA 砍 62% 推理成本","edgewise-edge-agents-cloud-delegation","2026-10-16T21:07:57+00:00",{"id":90,"title":91,"news_slug":92,"published_at":93},"5fa17d26-6090-4805-893a-aa880cf33369","让 Agent 学会遗忘:删掉旧推理,分数反而涨了","agents-forget-reasoning-iclr-compression","2026-09-28T19:30:00+00:00",{"id":95,"title":96,"news_slug":97,"published_at":98},"6f4d1046-ee70-4a06-9261-2cc187c66285","12 万美元 token 把 Copilot 运行时搬进 Rust:AI 智能体包揽 43 万行移植","copilot-runtime-rust-agentic-port","2026-09-20T19:11:22+00:00"]