AI News Feed
Market watch
AI Chips & Compute

Amazon launches TorchNeuron toolkit for PyTorch on AWS Trainium chips

Amazon introduced TorchNeuron, a toolkit for running PyTorch workloads on AWS Trainium chips with minimal code changes.

Until now, running PyTorch projects on Trainium-based AWS instances required substantial manual work, increasing development costs and creating an entry barrier for users, according to the report. Amazon said TorchNeuron reduces that burden: developers only need to configure a setting that tells workloads which chip to use. The toolkit supports Trainium2 and Trainium3, the two latest additions to the accelerator series, and both chips handle training and inference workloads.

Trainium3, the more capable of the two processors, has eight computing cores. Each core comprises four modules optimized for different subsets of the calculations AI models use to process data. The chip keeps model data in a 154-gigabyte pool of onboard memory. AWS runs Trainium3 in custom servers that can each accommodate up to 144 accelerators. According to Amazon, a single system can perform up to 362 quadrillion calculations per second when processing data in the MXFP8 format, which is widely used by AI models.

The Trainium series uses a custom programming language called NKI, whose syntax and compiler allow developers to make low-level optimizations to AI models. Such customizations can reduce hardware usage and boost model speed. TorchNeuron includes a set of pre-packaged NKI operators, software building blocks customers can use to develop AI models. Some operators ease the implementation of a mixture of experts architecture, while others are designed to reduce neural networks’ memory usage. They also speed up related tasks such as quantization.

TorchNeuron supports not only PyTorch but also open-source tools that software teams often use alongside the framework, including the AI training engine TorchTitan. TorchTitan automates some of the work involved in distributing a training run across accelerators and splits workloads across chips using fully sharded data parallelism. That method splits not only the model being trained but also optimizer states and gradients. According to Amazon, TorchNeuron includes features that enable developers to further optimize training workflows using Trainium chips.

The toolkit has already been adopted by several AWS customers. Cartesia AI Inc., a venture-backed voice agent startup, is using TorchNeuron to run inference workloads on Trainium chips. The Lieber Institute for Brain Development is exploring ways to optimize its AI-powered medical research workflows. Amazon plans to open-source TorchNeuron on Tuesday.