INFaaS: Managed & Model-less Inference Serving

Francisco Romero, Qian Li, Neeraja J. Yadwadkar, Christos KozyrakisarXiv 2019

TL;DR

INFaaS is a novel "model-less" inference serving system that automates the complex task of selecting the optimal model variant, hardware, and optimizations for each incoming query. By intelligently navigating a vast space of model variations and dynamically scaling resources, INFaaS significantly improves throughput, reduces costs, and minimizes latency violations compared to existing solutions.

What Problem Does This Paper Address?

Deploying machine learning models for inference at scale is notoriously challenging. Developers face a daunting landscape of thousands of "model variants" – essentially, different versions of the same trained model optimized for various hardware, resource footprints, latencies, costs, and accuracies. Manually selecting the best variant for each specific application requirement and query load is a complex, time-consuming, and error-prone process. This often leads to developers fixing a single variant, which is inefficient when application needs or query loads change dynamically. The paper highlights that existing inference serving systems require developers to manage these complexities themselves, leading to significant costs and suboptimal performance.

Methods

INFaaS tackles this problem with a multi-pronged approach:

  • Model-less Interface: Developers register their trained models without needing to specify any variants. They simply define application identifiers and optionally provide validation datasets.
  • Variant Generation & Profiling: INFaaS automatically generates numerous model variants by applying optimizations like quantization and layer fusion, and profiling their performance (latency, throughput, resource usage) across different hardware (CPU, GPU, Inferentia).
  • Dynamic Model-Variant Selection: For each incoming query, INFaaS employs a sophisticated policy to select the most suitable model variant, hardware, and optimization strategy based on the query's specific requirements (latency, accuracy, cost). This selection happens on the critical path of query serving.
  • Hybrid Autoscaling: INFaaS combines traditional VM-level horizontal autoscaling (adding/removing worker machines) with novel model-level autoscaling. This includes:
  • Model-Horizontal Scaling: Replicating multiple instances of the same model variant.
  • Model-Vertical Scaling: Dynamically switching to a different, more suitable model variant (e.g., upgrading to a GPU variant from a CPU variant).
  • State Machine for Model Variants: A state machine tracks the dynamic status of model variants (Inactive, Active, Overloaded, Interfered) to inform selection and scaling decisions.
  • Greedy Heuristic for Scaling: To address the computational complexity of optimal scaling decisions, INFaaS uses a greedy heuristic that approximates an Integer Linear Program (ILP) to find cost-effective scaling actions.

Datasets

  • ImageNet: Used for evaluating the top-1 accuracy of image classification models.
  • WMT16 English-German dataset: Used for evaluating translation BLEU scores.
  • Twitter trace (2018): A real-world inference workload trace used to evaluate INFaaS' performance under realistic and dynamic conditions, including diurnal patterns and unexpected spikes. This trace is noted to resemble production serving workloads.
  • Synthetic workloads: Used to simulate flat, low, steady, high, and fluctuating loads.

Key Insights and Ideas

  • The "model variant space" is an opportunity, not just a nuisance: Instead of trying to simplify it, INFaaS embraces the diversity of model variants and uses it to its advantage to meet diverse application needs.
  • Model-less is achievable and beneficial: By abstracting away the complexity of model variants, INFaaS significantly lowers the barrier to entry for deploying ML models.
  • Dynamic selection is crucial for cost and performance: Statically selecting model variants is insufficient. INFaaS' ability to dynamically choose the best variant for each query is key to its efficiency.
  • Hybrid autoscaling is more effective: Combining VM-level scaling with model-level vertical scaling (switching variants) allows for much finer-grained and cost-effective resource management.
  • Resource sharing is vital for utilization: Co-locating different model variants on the same hardware, while carefully managing interference, dramatically improves resource utilization and reduces costs.

Key Results

INFaaS demonstrated significant improvements over state-of-the-art baselines (Clipper+, SageMaker+) on AWS EC2:

  • Throughput: Achieved 1.3x higher throughput.
  • Latency: Violated latency objectives 1.6x less often.
  • Cost: Saved up to 21.6x in cost (8.5x on average).
  • Resource Utilization: Achieved average worker utilization of 48.9%, with GPU DRAM utilization at 58.6% (2.8x higher than Clipper+).
  • Decision Overhead: INFaaS' decision-making process (variant and worker selection) is very fast, taking only 2.2ms to 3.5ms, which is up to 44x faster than a brute-force search.
  • Offline Job Integration: INFaaS can effectively co-locate offline jobs with online inference, processing an average of 756 images per offline request without impacting online SLOs.

Limitations and Future Work

  • NP-completeness of Optimal Scaling: The paper acknowledges that finding the absolute optimal scaling configuration via ILP is NP-complete, which is why a greedy heuristic is used. While effective, it's an approximation.
  • Future Work:
    • Investigating the integration of reconfigurable hardware architectures (FPGAs, CGRAs) in a model-less setting.
  • Exploring the implications of privacy-preserving ML requirements on model-less inference serving.

Summary updated

BibTeX
@misc{romero2019infaas,
  author = {Francisco Romero and Qian Li and Neeraja J. Yadwadkar and Christos Kozyrakis},
  title = {{INFaaS: Managed \& Model-less Inference Serving}},
  year = {2019},
  eprint = {1905.13348},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/1905.13348},
}
Figure