AWS Vice President Robert Hundt: Using AI Agents to Select 841 Representative Models and Verify Architecture Coverage for the Trainium PyTorch Backend
The AWS Annapurna team used AI agents to scan hundreds of thousands of open-source models on Hugging Face, classified them by architectural features, and selected 841 representative models. From these, they distilled tens of thousands of tensor shapes into a rapid regression test set to verify TorchNeuron's execution coverage of PyTorch code on AWS Trainium chips.
Developing a PyTorch backend for an AI accelerator chip often faces its most challenging problem not in making the code run, but in confirming that it covers the model space developers will actually use. With hundreds of thousands of open-source models on Hugging Face, testing each one individually is impractical; testing only a few benchmarks cannot guarantee there are no omissions. In a technical blog post on October 22, AWS Vice President Robert Hundt described TorchNeuron’s evaluation method: using AI agents for systematic classification, followed by tiered regression testing via a tensor shape registry.
The specific process involves three steps. First, the team built an AI agent to scan Hugging Face repositories, excluding models with broken configurations that cannot run on any accelerator, and filtering out hundreds of thousands of models with executable code. Second, another agent classified these models according to architectural characteristics—for example, with large language models (LLMs), examining what data types the front-end encoder processes, whether the backbone’s attention mechanism is self-attention or cross-attention, and what form the back-end output takes. This ultimately selected 841 representative models, which the team claims cover all design features TorchNeuron is likely to encounter. Third, the team recorded all dimension combinations of tensor operations from the actual execution of these 841 models to form a shape registry containing tens of thousands of entries, used to generate rapid unit tests.