Apparate: Rethinking Early Exits to Tame Latency-Throughput Tensions in ML Serving

Fuente: arXiv
Gespeichert in:
Bibliographische Detailangaben
Hauptverfasser: Dai, Yinwei, Pan, Rui, Iyer, Anand, Li, Kai, Netravali, Ravi
Format: Preprint
Veröffentlicht: 2023
Schlagworte:
Online-Zugang:
Tags: Tag hinzufügen
Keine Tags, Fügen Sie den ersten Tag hinzu!
_version_ 1866917783467458560
author Dai, Yinwei
Pan, Rui
Iyer, Anand
Li, Kai
Netravali, Ravi
author_facet Dai, Yinwei
Pan, Rui
Iyer, Anand
Li, Kai
Netravali, Ravi
contents 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.
format Preprint
id arxiv_https___arxiv_org_abs_2312_05385
institution arXiv
publishDate 2023
record_format arxiv
spellingShingle Apparate: Rethinking Early Exits to Tame Latency-Throughput Tensions in ML Serving
Dai, Yinwei
Pan, Rui
Iyer, Anand
Li, Kai
Netravali, Ravi
Distributed, Parallel, and Cluster Computing
Machine Learning
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.
title Apparate: Rethinking Early Exits to Tame Latency-Throughput Tensions in ML Serving
topic Distributed, Parallel, and Cluster Computing
Machine Learning
url https://arxiv.org/abs/2312.05385