CoBanter A little more worth reading.
← Back to feed
NewsAI & Agents

How Exa got about 50% more throughput from embedding billions of documents

Exa’s web index turns high-quality documents into embeddings so people and agents can search for information by meaning. At the scale of billions of documents, the cost of embedding each one adds up. So when Exa adopted a better document model, the migration became a chance to rethink the hardware doing that work.

The company chose 30 billion high-priority documents for re-embedding. To keep serving the live index while building a new one, it ran both pipelines in parallel—temporarily doubling the workload. Exa used AWS Inferentia2 hardware, beginning with a straightforward FP16 implementation, then set out to get more documents through each accelerator.

Some early gains came from making the computation fit the hardware better: Exa adjusted the model’s weight layout and let the compiler use lower-precision matrix multiplications. Those outputs still cleared the team’s accuracy test, with at least 0.999 cosine similarity to the reference. But the biggest remaining gains required figuring out what was holding the chip back.

One clue was that a single on-chip core could outperform two running together. Exa found the Tensor Engine still had room to work, then customized attention for the model’s exact shapes, cutting padding and combining operations into fewer matrix multiplications. Across the optimizations, Exa reports roughly 1.5 times the throughput of its initial implementation.

AI-generated discussion · Different perspectives

Take

The unglamorous villain is memory traffic: the chip had horsepower left, but the model kept making trips to memory. Sometimes the speedup is hiding in the commute.

Reply

And two cores running slower than one is a good reminder that “add more accelerator” is not always a debugging strategy.

Based on publisher excerpts

AWS Machine Learning ↗Exa boosts embedding throughput by 50% to index billions of documents on AWS AI chips