SmartLLMs 调度器:一种经济高效的 LLM 利用框架
SmartLLMs Scheduler: A Framework for Cost-Effective LLMs Utilization
AI总结:
针对 LLM 部署成本高、响应慢等问题,提出动态调度框架 SLS,通过缓存、性能-成本优化调度和动态更新,在日志解析和代码生成任务上平均性能提升 198.82%,处理时间减少 63.28%。
摘要:
大型语言模型(LLM),如 GPT-4 和 Llama,在各类软件工程任务中展现了卓越的能力。尽管取得了这些进展,其实际部署仍面临挑战,包括高昂的财务成本、较长的响应时间以及不稳定的性能,尤其是在处理大量查询(作业)时。现有的针对多样化任务部署 LLM 的优化策略侧重于静态调度,这需要大量的训练数据来进行性能预测,从而增加了计算成本并限制了适用性和灵活性。在本文中,我们提出了 SmartLLMs 调度器(SLS),一种动态且经济高效的调度解决方案。其关键思想是学习 LLM 在不同任务上的表现,并结合其实时反馈来定期更新策略。具体而言,SLS 包含三个关键组件:自适应缓存管理器、性能-成本优化调度器和动态更新管理器。缓存管理器存储先前处理过的查询的输出,并采用自适应策略以减少冗余计算并最小化响应时间。对于缓存中未命中的查询,调度器根据模型(以查询特定和 LLM 特定特征作为输入)预测的性能和成本,将其动态分配给最合适的 LLM。更新管理器根据已分配查询的实时反馈不断优化缓存和调度策略,以增强决策制定并适应不断变化的任务特征。为了评估 SLS 的有效性,我们在两个基于 LLM 的软件工程任务上进行了大量实验,包括日志解析和代码生成。结果表明,SLS 显著优于基线方法,平均性能提升了 198.82%,平均处理时间减少了 63.28%。
英文摘要:
Large Language Models (LLMs) such as GPT-4 and Llama have shown remarkable capabilities in a variety of software engineering tasks. Despite the advancements, their practical deployment faces challenges, including high financial costs, long response time, and varying performance, especially when handling a large number of queries (jobs). Existing optimization strategies for deploying LLMs for diverse tasks focus on static scheduling, which requires extensive training data for performance prediction, increasing the computational costs and limiting the applicability and flexibility. In this paper, we propose the SmartLLMs Scheduler (SLS), a dynamic and cost-effective scheduling solution. The key idea is to learn LLMs' performance on diverse tasks and incorporate their real-time feedback to update strategies periodically. Specifically, SLS incorporates three key components, including an Adaptive Cache Manager, a Performance-Cost Optimized Scheduler, and a Dynamic Update Manager. The Cache Manager stores the outputs of previously processed queries and employs an adaptive strategy to reduce redundant computations and minimize response times. For queries not found in the cache, the Scheduler dynamically allocates them to the most suitable LLM based on the predicted performance and cost from models that take both query-specific and LLM-specific features as input. The Update Manager continuously refines the cache and scheduling strategies based on real-time feedback from the assigned queries to enhance decision-making and adapt to evolving task characteristics. To evaluate the effectiveness of SLS, we conduct extensive experiments on two LLM-based software engineering tasks, including log parsing and code generation. The results show that SLS significantly outperforms the baseline methods, achieving an average performance improvement of 198.82% and an average processing time reduction of 63.28%.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。