Deepgram and AWS Optimize Nova-3 Voice AI on Trainium2 Chips

Deepgram · AWS Trainium2 · Nova-3: Deepgram processed about 70 percent more audio per dollar using Trainium2.

Deepgram and Amazon Web Services (AWS) engineering teams have collaborated to optimize the Nova-3 speech-to-text model for AWS Trainium2 hardware. According to AWS source reporting, the joint effort targeted high-volume offline batch workloads such as contact-center analytics and medical transcription, where serving efficiency directly dictates operational scale and infrastructure expenditure.

Porting and Compiling Nova-3 with PyTorch and NKI

The optimization project commenced with Deepgram providing the Nova-3 model as standard PyTorch code. Utilizing TorchNeuron—the native PyTorch integration of the Neuron Compiler documented across official AWS Neuron resources—the team employed eager execution followed by torch.compile to analyze operations. By compiling the encoder and decoder into separate static-shape graphs, the system eliminated CPU fallbacks entirely while maintaining strict numerical accuracy and end-to-end Word Error Rate (WER) consistency relative to reference benchmarks.

To further accelerate execution, developers integrated pre-built and custom kernels from the Neuron Kernel Interface (NKI) Library. These kernels handled compute-heavy tasks such as fused QKV projections, feed-forward network layers, and depthwise 1D convolutions. Continuous profiling using Neuron Explorer coupled with the Neuron Agentic Development (NAD) toolkit enabled engineers to rapidly identify performance bottlenecks, write targeted custom kernels, and maximize throughput across a sweep of batch sizes.

Custom Rust Runtime and Cost-Performance Gains

Because Deepgram’s production serving infrastructure is built in Rust, maintaining Python or PyTorch in the inference path introduced undesirable overhead. To resolve this, engineers developed a lightweight data-parallel runtime in Rust where a work-stealing queue coordinates eight model replicas (DP8) on a single trn2.3xlarge instance. A C layer loads and executes ahead-of-time-compiled Neuron Executable File Format (NEFF) files directly via the Neuron Runtime API.

According to the evaluation, this Rust implementation bypassed the interpreter overhead of multiprocessing setups and alleviated global interpreter lock (GIL) serialization present in multithreaded Python architectures. At throughput-maximizing batch sizes, the Rust runtime delivered a 7.5 percent performance improvement over the multiprocessing baseline. Across offline batch operations, the single-device Trainium2 setup ultimately processed between 11 and 70 percent more audio per dollar compared to Deepgram's previous compute options.

Implications for Enterprise Voice AI Infrastructure

The collaboration between Deepgram and AWS highlights the growing operational necessity of hardware co-design in large-scale audio processing. As voice technology transitions into a primary modality for artificial intelligence applications, handling trillions of audio tokens annually places immense strain on organizational budgets. By moving away from general-purpose execution paths and tailoring complex neural models directly to specialized accelerators like Trainium2, companies can drastically compress inference costs without sacrificing transcription accuracy.

Furthermore, these architectural optimizations extend beyond managed API services. Organizations that choose to self-host Deepgram models within their own virtual private clouds using Amazon SageMaker AI stand to inherit these exact efficiency gains, provided they implement equivalent software stacks. The integration of native PyTorch compilation tools, NKI kernel customization, and low-level runtime execution frameworks demonstrates a replicable blueprint for deploying demanding generative AI and speech recognition workloads at enterprise scale.

Editorial graphic and headline text by Signal Titans.

Source: How Deepgram optimized voice AI at scale with AWS Trainium · AWS Neuron Documentation — AWS Neuron Documentation

Share this article
FacebookThreadsLinkedInX

Leave a Reply

Your email address will not be published. Required fields are marked *