TL;DR
FuncPipe is a novel pipelined framework designed to make deep learning (DL) training on serverless platforms both fast and affordable. By combining model partitioning with a sophisticated resource optimizer and a new communication algorithm, it overcomes the strict memory and bandwidth limits of serverless functions, achieving up to 2.2X speedups and 77% cost savings over current state-of-the-art methods.
What Problem Does This Paper Address?
Serverless computing (like AWS Lambda) is tempting for DL researchers because of its "pay-as-you-go" pricing and effortless scaling. However, training modern DL models on these platforms is notoriously difficult.
The authors identify two "walls":
- The Communication Wall: Serverless functions have very low bandwidth (around 0.5 Gb/s) compared to traditional Virtual Machines (up to 100 Gb/s). Furthermore, they cannot talk to each other directly; they must use intermediate storage like Amazon S3, which creates a massive bottleneck.
- The Memory Wall: A single serverless function usually tops out at 10GB of RAM. Large DL models and their intermediate "activations" can easily require tens of gigabytes, making it impossible to fit a full model on one worker.
Existing frameworks often spend 6X more time on communication than on actual computation, making serverless training slow and expensive.
Methods
FuncPipe introduces three key innovations to tear down these walls:
- Pipeline Parallelism for Serverless: Instead of every worker having a full copy of the model (data parallelism), FuncPipe splits the model into stages. Each worker handles only one stage. This reduces the memory footprint per worker and replaces the need to sync massive "gradients" with the need to pass much smaller "activations" between stages.
- MIQP Resource Co-optimization: Choosing how to split a model and how much memory to give each worker is a complex puzzle. FuncPipe uses Mixed-Integer Quadratic Programming (MIQP) to automatically find the "sweet spot" that balances training speed against monetary cost. It treats the number of workers, their memory sizes, and the model split points as variables to optimize.
- Pipelined Scatter-Reduce: In standard serverless training, workers sync data by uploading to storage and then downloading. FuncPipe introduces a "duplex" algorithm that pipelines these tasks, utilizing both the uplink and downlink bandwidth simultaneously to speed up the final synchronization step.
Datasets
The researchers evaluated FuncPipe using several representative DL models and datasets:
- Models: ResNet101, AmoebaNet-D (18 and 36 layers), and BERT-Large.
- Datasets: CIFAR-10 (for image classification) and Wikitext-2 (for language modeling).
- Platforms: Evaluation was conducted on AWS Lambda and Alibaba Cloud Function Compute.
Key Insights and Ideas
- Partitioning as a Communication Strategy: The "aha moment" here is that model partitioning isn't just a hack to fit into small memory; it's a powerful way to reduce the total volume of data moved across the network.
- The Bandwidth-Memory Link: In many cloud platforms, the network bandwidth allocated to a function is tied to its memory size. FuncPipe’s optimizer exploits this, realizing that sometimes paying for more memory is actually a "discount" because it finishes the job much faster via higher bandwidth.
- Simplicity in Scheduling: While complex scheduling exists for GPUs, the authors found that a tailored version of the GPipe micro-batch scheduling policy works remarkably well for the high-latency environment of serverless storage.
Key Results
- Speed & Cost: Compared to LambdaML (the previous state-of-the-art), FuncPipe achieved 1.3X to 2.2X speedups and 7% to 77% cost reductions.
- Efficiency: For a 900 MB AmoebaNet-D model, FuncPipe reduced the iteration time from over 40 seconds to under 20 seconds.
- Scalability: FuncPipe showed much better "scaling behavior" than previous methods. As more memory was added to the system, FuncPipe continued to gain speed, whereas older methods hit a plateau due to communication overhead.
- Optimizer Performance: The MIQP solver is efficient, finding optimal configurations for models with hundreds of layers in just a few minutes.
Limitations and Future Work
- The "Super-Layer" Problem: Currently, FuncPipe cannot handle a single layer that is too large to fit into the maximum memory of a serverless function. The authors suggest tensor parallelism (splitting a single layer across multiple workers) as a future solution.
- CPU vs. GPU: Most of the study focused on CPUs. While the authors did a preliminary test with GPUs on Alibaba Cloud showing even greater potential, full support for distributed GPU serverless training remains a future goal.
- Noisy Neighbors: The performance model has an average error of about 12%, largely due to unpredictable bandwidth variations on public cloud platforms. Future versions could benefit from more robust interference-aware modeling.
Summary updated