Apparate:重新思考早退机制以缓解机器学习服务中的延迟-吞吐量矛盾
Apparate: Rethinking Early Exits to Tame Latency-Throughput Tensions in ML Serving
AI总结:
提出 Apparate 系统,通过自动管理 ML 模型早退机制并利用持续反馈驱动运行时监控与自适应策略,有效缓解了推理服务中吞吐量与延迟的矛盾。
摘要:
机器学习(ML)推理平台面临着平衡两个相互竞争目标的任务:在大量请求下确保高吞吐量,以及提供低延迟响应以支持交互式应用。遗憾的是,现有的平台调节手段(例如批处理大小)无法缓解这一根本矛盾,反而只能让用户在两者之间进行严苛的权衡。本文探索了一种替代策略,通过改变执行推理的粒度来控制吞吐量与延迟的权衡。我们提出了 Apparate,这是一个能在 ML 模型中自动应用并管理早退(EEs)的系统,通过该机制,特定输入可以在中间层输出结果并退出。为应对 EEs 带来的时变开销和准确性挑战,Apparate 重新利用退出点提供持续反馈,从而驱动多种新颖的运行时监控与自适应策略。在不影响吞吐量且不违反严格准确性约束的前提下,Apparate 针对多样化的 CV 和 NLP 分类工作负载,将中位响应延迟分别降低了 40.5--91.5% 和 10.0--24.2%,并在生成式场景中将每 token 中位延迟降低了 22.6--77.9%。
英文摘要:
Machine learning (ML) inference platforms are tasked with balancing two competing goals: ensuring high throughput given many requests, and delivering low-latency responses to support interactive applications. Unfortunately, existing platform knobs (e.g., batch sizes) fail to ease this fundamental tension, and instead only enable users to harshly trade off one property for the other. This paper explores an alternate strategy to taming throughput-latency tradeoffs by changing the granularity at which inference is performed. We present Apparate, a system that automatically applies and manages early exits (EEs) in ML models, whereby certain inputs can exit with results at intermediate layers. To cope with the time-varying overhead and accuracy challenges that EEs bring, Apparate repurposes exits to provide continual feedback that powers several novel runtime monitoring and adaptation strategies. Apparate lowers median response latencies by 40.5--91.5% and 10.0--24.2% for diverse CV and NLP classification workloads, and median time-per-token latencies by 22.6--77.9% for generative scenarios, without affecting throughputs or violating tight accuracy constraints.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。