通过屋顶线建模为设备端大语言模型设计硬件协同缩放定律
Hardware Co-Design Scaling Laws via Roofline Modelling for On-Device LLMs
AI总结:
本文提出通过屋顶线建模为设备端大语言模型设计硬件协同缩放定律,通过训练170个模型建立架构与训练损失的缩放关系,实现准确度与延迟的直接对应,降低架构选择时间并提升模型性能。
摘要:
视觉-语言-动作模型(VLAs)已作为一种物理人工智能的关键范式出现,并越来越多地应用于自动驾驶车辆、机器人和智能空间。在这些资源受限的设备端设置中,选择合适的大型语言模型(LLM)主干是一个关键挑战:模型必须在准确性与严格的推理延迟和硬件效率约束之间取得平衡。这使得硬件-软件协同设计成为设备端LLM部署的关键要求,其中每个硬件平台都需要定制的架构解决方案。我们提出了一种硬件协同设计定律,共同捕捉模型准确性和推理性能。具体来说,我们将训练损失建模为架构超参数的显式函数,并通过屋顶线建模来表征推理延迟。我们实证评估了1,942个候选架构,NVIDIA Jetson Orin上训练了170个选定模型,每个模型训练10B个token,以拟合一个将架构与训练损失联系起来的缩放定律。通过将此缩放定律与延迟建模相结合,我们建立了准确度-延迟的直接对应关系,并确定了硬件协同设计LLM的帕累托前沿。我们进一步将架构搜索公式化为精度和性能的联合优化,推导出在工业硬件和应用预算下的可行设计区域。我们的方法将架构选择从几个月减少到几天。在目标硬件上与Qwen2.5-0.5B相同延迟的情况下,我们的协同设计架构在WikiText-2上的困惑度降低了19.42%。据我们所知,这是首个原理上和操作上都可行的框架,用于设备端LLM部署中的硬件协同设计缩放定律。我们将公开代码和相关检查点。
英文摘要:
Vision-Language-Action Models (VLAs) have emerged as a key paradigm of Physical AI and are increasingly deployed in autonomous vehicles, robots, and smart spaces. In these resource-constrained on-device settings, selecting an appropriate large language model (LLM) backbone is a critical challenge: models must balance accuracy with strict inference latency and hardware efficiency constraints. This makes hardware-software co-design a game-changing requirement for on-device LLM deployment, where each hardware platform demands a tailored architectural solution. We propose a hardware co-design law that jointly captures model accuracy and inference performance. Specifically, we model training loss as an explicit function of architectural hyperparameters and characterise inference latency via roofline modelling. We empirically evaluate 1,942 candidate architectures on NVIDIA Jetson Orin, training 170 selected models for 10B tokens each to fit a scaling law relating architecture to training loss. By coupling this scaling law with latency modelling, we establish a direct accuracy-latency correspondence and identify the Pareto frontier for hardware co-designed LLMs. We further formulate architecture search as a joint optimisation over precision and performance, deriving feasible design regions under industrial hardware and application budgets. Our approach reduces architecture selection from months to days. At the same latency as Qwen2.5-0.5B on the target hardware, our co-designed architecture achieves 19.42% lower perplexity on WikiText-2. To our knowledge, this is the first principled and operational framework for hardware co-design scaling laws in on-device LLM deployment. We will make the code and related checkpoints publicly available.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。