arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2410.08791cs.LG
收藏

Superpipeline:一种减少大模型GPU内存占用的通用方法

Superpipeline: A Universal Approach for Reducing GPU Memory Usage in Large Models

Sharif University of Technology(谢里夫理工大学);University of Central Florida(中佛罗里达大学)

Reza Abbasi, Sernam Lim

AI总结:

本文提出Superpipeline框架,通过动态划分模型层并在GPU与CPU内存间高效传输,在训练和推理时将GPU内存占用降低60%,且无需重训或改参数,适用于LLM、VLM等多种大模型。

摘要:

机器学习模型的快速增长,尤其是在自然语言处理和计算机视觉领域,导致在资源有限的硬件上运行这些模型时面临挑战。本文介绍了Superpipeline,这是一个新框架,旨在在训练和推理期间优化受限硬件上大型AI模型的执行。我们的方法通过将模型划分为单独的层,并在GPU和CPU内存之间高效传输这些层来动态管理模型执行。在我们的实验中,Superpipeline将GPU内存使用量减少了高达60%,同时保持了模型精度和可接受的处理速度。这使得原本会超出可用GPU内存的模型能够有效运行。与主要关注推理或特定模型类型的现有解决方案不同,Superpipeline可应用于大型语言模型(LLMs)、视觉语言模型(VLMs)和基于视觉的模型。我们在各种模型和硬件配置上测试了Superpipeline的性能。该方法包含两个关键参数,允许微调GPU内存使用和处理速度之间的平衡。重要的是,Superpipeline不需要重新训练或更改模型参数,确保原始模型的输出保持不变。Superpipeline的简单性和灵活性使其适用于在有限硬件上使用高级AI模型的研究人员和专业人士。它能够在现有硬件上使用更大的模型或更大的批量大小,潜在地加速许多机器学习应用的创新。这项工作标志着使高级AI模型更易于访问并优化其在资源受限环境中部署的重要一步。Superpipeline的代码可在https://github.com/abbasiReza/super-pipeline获取。

英文摘要:

The rapid growth in machine learning models, especially in natural language processing and computer vision, has led to challenges when running these models on hardware with limited resources. This paper introduces Superpipeline, a new framework designed to optimize the execution of large AI models on constrained hardware during both training and inference. Our approach involves dynamically managing model execution by dividing models into individual layers and efficiently transferring these layers between GPU and CPU memory. Superpipeline reduces GPU memory usage by up to 60% in our experiments while maintaining model accuracy and acceptable processing speeds. This allows models that would otherwise exceed available GPU memory to run effectively. Unlike existing solutions that focus mainly on inference or specific model types, Superpipeline can be applied to large language models (LLMs), vision-language models (VLMs), and vision-based models. We tested Superpipeline's performance across various models and hardware setups. The method includes two key parameters that allow fine-tuning the balance between GPU memory use and processing speed. Importantly, Superpipeline does not require retraining or changing model parameters, ensuring that the original model's output remains unchanged. Superpipeline's simplicity and flexibility make it useful for researchers and professionals working with advanced AI models on limited hardware. It enables the use of larger models or bigger batch sizes on existing hardware, potentially speeding up innovation across many machine learning applications. This work marks an important step toward making advanced AI models more accessible and optimizing their deployment in resource-limited environments. The code for Superpipeline is available at https://github.com/abbasiReza/super-pipeline.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑