Phantora用容器模拟大模型训练,直接复用原始代码,省去重写和采集数据的麻烦。
Phantora: Maximizing Code Reuse in Simulation-based Machine Learning System Performance Estimation
- 将未修改的ML框架在容器中运行,通过拦截操作实现混合仿真
- 支持3个主流大模型训练框架,精度接近传统静态仿真
- 单卡运行,无需复杂数据采集,适合快速评估系统性能
现代机器学习训练工作负载对计算和通信资源需求巨大,准确的性能估计算法对系统设计(如并行策略、集群配置、硬件部署)至关重要。现有基于仿真的性能估算需在模拟器中重新实现ML框架,工作量大且难以维护。本文提出Phantora,一种面向大规模训练任务的混合式GPU集群仿真器。它在分布式容器环境中原样执行未修改的ML框架,每个容器模拟一个大型集群中的GPU服务器,同时拦截并仿真与GPU及通信相关的操作,实现高保真性能估计。该方法称为混合仿真,区别于传统静态工作负载仿真。其核心优势是可直接复用框架源码,避免重写。评估显示,Phantora在支持三个先进LLM训练框架的基础上,性能估算精度与静态仿真相当;且仅需单张GPU运行,无需传统追踪仿真器所需的资源密集型数据采集和工作负载提取步骤。项目已开源:https://github.com/QDelta/Phantora。
原文摘要 · Abstract (English)
Modern machine learning (ML) training workloads place substantial demands on both computational and communication resources. Consequently, accurate performance estimation has become increasingly critical for guiding system design decisions, such as the selection of parallelization strategies, cluster configurations, and hardware provisioning. Existing simulation-based performance estimation requires reimplementing the ML framework in a simulator, which demands significant manual effort and is hard to maintain as ML frameworks evolve rapidly. This paper introduces Phantora, a hybrid GPU cluster simulator designed for performance estimation of ML training workloads. Phantora executes unmodified ML frameworks as is within a distributed, containerized environment. Each container emulates the behavior of a GPU server in a large-scale cluster, while Phantora intercepts and simulates GPU- and communication-related operations to provide high-fidelity performance estimation. We call this approach hybrid simulation of ML systems, in contrast to traditional methods that simulate static workloads. The primary advantage of hybrid simulation is that it allows direct reuse of ML framework source code in simulation, avoiding the need for reimplementation. Our evaluation shows that Phantora provides accuracy comparable to static workload simulation while supporting three state-of-the-art LLM training frameworks out-of-the-box. In addition, Phantora operates on a single GPU, eliminating the need for the resource-intensive trace collection and workload extraction steps required by traditional trace-based simulators. Phantora is open-sourced at https://github.com/QDelta/Phantora.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。