Serving 2 Million Models Without Melting: Scaling the Hugging Face Hub — Arek Borucki, Hugging Face

Serving 2 Million Models Without Melting: Scaling the Hugging Face Hub — Arek Borucki, Hugging Face

More

Summary

Arek Borucki, a machine learning platform and database engineer at Hugging Face, takes the AI Engineer conference stage to walk through the architectural decisions that have kept the Hugging Face Hub functional as it scaled from 20,000 to 3 million public models — a 150x increase over just a few years. The talk is unusually specific: named technologies, measured tradeoffs, and honest accounts of what broke at scale and why.

The infrastructure stack centers on MongoDB Atlas for metadata — storing everything about models (configuration, access control, billing, trending scores) while actual model weights live in AWS S3. At small scale, full-collection regex queries worked fine. At 3 million models with 14 million users, they collapsed. The fix was a denormalized read-only collection with pre-tokenized model name arrays at insert time, backed by Atlas Search running Apache Lucene under the hood, which enables fast autocomplete without query-time parsing overhead. Borucki explains the Kubernetes horizontal pod autoscaler setup, a seven-node MongoDB replica set with a hidden analytics node that absorbs heavy reporting queries without touching production traffic, and the rationale for prioritizing P99 latency over P50.

For engineers building or operating ML platforms, this talk functions as a practical case study in separating metadata from binary storage, deferring indexing work to write time, and designing read paths that degrade gracefully under sudden load spikes — the kind that happen when a major model like Llama or DeepSeek drops and triggers thousands of derivative uploads in hours.


📺 Source: AI Engineer · Published July 28, 2026
🏷️ Format: Deep Dive

1 Item

Channels

1 Item

Companies