Speech-to-Text Company AssemblyAI: Distributing Across GPU Instance Families with Queue Retries Reduces Spot Inference Costs by 70%
AssemblyAI runs thousands of GPU instances on AWS for speech-to-text inference. Its key finding is that distributing demand across three GPU instance families—g4dn, g5, and g6—is the most effective lever for reducing Spot interruption rates. Combined with an SQS queue retry mechanism and a custom AMI that completes creation in approximately two minutes, Spot interruptions are transformed from failures into routine events, achieving a 70% reduction in inference costs.
Speech-to-text inference is a GPU-intensive workload. Each audio file triggers a deep learning pipeline comprising acoustic models, language models, and post-processing stages, running on NVIDIA GPUs to meet latency requirements. At scale, this means thousands of GPU instances are running continuously. AssemblyAI needed a way to run these workloads at scale while maintaining availability and latency commitments; using On-Demand Instances exclusively was not cost-effective.
Spot Instances offer significant discounts, but Amazon Elastic Compute Cloud (Amazon EC2) can reclaim instances with a two-minute notice when capacity is needed elsewhere. The challenge was: how to absorb Spot interruptions gracefully while maintaining service level agreement (SLA) commitments? AssemblyAI’s answer involves four pillars working in concert: ECS capacity providers mixing Spot and On-Demand instances, diversification of Spot across multiple GPU instance families, a queue-based retry architecture, and multi-region deployment to satisfy data residency requirements.
The most transferable insight is instance family diversification. AssemblyAI’s infrastructure spans three EC2 GPU instance families: g4dn, equipped with NVIDIA T4 GPUs, provides a cost-effective baseline for standard speech recognition models; g5, equipped with NVIDIA A10G GPUs, offers higher throughput for more demanding model architectures; and g6, featuring NVIDIA L4 GPUs, delivers improved performance-per-dollar for larger models, including large language model inference. By spreading demand across instance families and sizes, AssemblyAI draws from a significantly larger pool of available Spot capacity. These three families tap into independent capacity pools, so when one family experiences capacity pressure, the others remain available. The article explicitly states that operating at this scale, diversifying across instance families and sizes is the most effective lever for minimizing Spot interruption rates.