通过动态切换多模型与贪心提前退出,显著提升大模型推理吞吐量和批处理规模。
HELIOS: Adaptive Model And Early-Exit Selection for Efficient LLM Inference Serving
- 采用多模型动态切换,利用不同模型的互补早退特性提升整体早退率。
- 对低置信度但未改变的输出进行贪心早退,减少计算与内存开销。
- 实时监控与自适应调度,兼顾性能与资源利用率,适合高并发推理场景。
早期退出大语言模型(EE-LLM)通过在中间层提前退出实现高吞吐推理,但其性能受限于计算与内存节省。现有框架依赖单一模型,导致未早退的令牌仍需遍历所有层,且运行时才知是否早退,造成全层权重加载,内存浪费严重,难以扩大批处理规模。我们提出HELIOS框架,基于两个洞察:第一,不同模型的早退行为具有互补性,未在一个模型中早退的令牌往往在另一模型中可早退;因此,HELIOS动态切换多个模型,最大化早退比例,降低生成延迟。第二,即使预测置信度低,某些令牌在额外层后仍保持不变;此时贪婪地允许其早退,并仅加载最可能使用的层权重,从而获得内存节省,再用于扩大批处理规模。HELIOS结合实时性能分析,精准识别早退分布,动态跟踪令牌以最小化因贪心加载与退出带来的性能下降。评估显示,HELIOS相比现有框架实现1.48倍吞吐提升和15.14倍更大的批处理规模。
原文摘要 · Abstract (English)
Early-Exit Large Language Models (EE-LLMs) enable high throughput inference by allowing tokens to exit early at intermediate layers. However, their throughput is limited by the computational and memory savings. Existing EE-LLM frameworks rely on a single model and therefore, their token generation latencies are bottlenecked by tokens that do not exit early and traverse additional layers. Moreover, early exits are only known at runtime and depend on the request. Therefore, these frameworks load the weights of all model layers even though large portions remain unused when tokens exit early. The lack of memory savings limit us from scaling the batch sizes. We propose $\textit{HELIOS}$, a framework that improves both token generation latency and batch sizes to enable high-throughput in EE-LLMs. HELIOS exploits two insights. $\textit{First}$, early exits are often complimentary across models, tokens that do not exit early on one model often take an early-exit on another. HELIOS employs multiple models and dynamically switches between them to collectively maximize the number of tokens that exit early, and minimize token generation latencies. $\textit{Second}$, even when a predicted token does not exit early due to poor confidence, it often remains unchanged even after additional layer traversal. HELIOS greedily allows such tokens to exit early and only loads the weights of the most likely to be used layers, yielding memory savings which is then re-purposed to increase batch sizes. HELIOS employs real-time profiling to accurately identify the early-exit distributions, and adaptively switches between models by tracking tokens in real-time to minimize the performance degradation caused by greedy model loading and exiting. Our evaluations show that HELIOS achieves $1.48\times$ higher throughput and $15.14\times$ larger batch size compared to existing EE-LLM frameworks.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。