In this session, explore how Hugging Face, the world’s largest open source AI platform, scales to support over 13 million users, more than 2 million public models, and 500,000+ datasets, used by 50,000+ organizations, including over 30% of the Fortune 500. You’ll learn how the team leverages MongoDB Atlas to maintain low latency and a streamlined operational footprint as usage grows globally, along with key architecture decisions, trade offs, and lessons learned from building at scale.
Through a live demo of the Hugging Face Hub, Arek Borucki, Machine Learning Platform & Database Engineer at Hugging Face will bring these concepts to life by showcasing models, datasets, and platform functionality in action, while highlighting how MongoDB powers the platform behind the scenes to enable performance, scalability, and a seamless developer experience.
00:00:00 - Introduction & Who is Hugging Face? 00:01:51 - Understanding the Scale: Millions of Users, Models & Datasets 00:04:17 - High-Level Architecture: How Hugging Face Uses MongoDB Atlas 00:06:05 - Live Demo: Models, Datasets, and Spaces Pillars 00:11:19 - Introducing a New Feature: Storage Buckets 00:13:19 - Interacting with the Hub via Hugging Face CLI 00:14:55 - Infrastructure Breakdown: 7-Node Replica Set Cluster 00:19:47 - Offloading Traffic: Read Preferences & Hidden Analytics Nodes 00:21:08 - Data Modeling: Compute Patterns & Document Embedding Limits 00:22:43 - Index Management & Atlas Search (Full-Text Search) 00:25:19 - The Move to Sharding: Choosing Shard Keys with Analyzers 00:27:30 - Hugging Chat Database Architecture 00:28:30 - Mongoku: Open-Source Web GUI for MongoDB
AI Generated·May contain errors
Video Summary
AI Generated
Arek Borucki of Hugging Face explains how MongoDB Atlas powers their infrastructure, managing metadata for millions of users and models. The system integrates Atlas Search for discovery and utilizes a sophisticated replica set architecture, now transitioning to sharding to support rapid growth and ensure scalable performance across their AI ecosystem.
Good evening, thank you for joining my session.
My name is Arek Borucki, and I work as a machine learning platform.
I am a database engineer at Hugging Face.
I have a question for you.
Who knows Hugging Face?
Good.
Who uses Hugging Face?
Perfectly.
Today I'd like to show you how Hugging Face scaled up
in MongoDB Atlas,
And when we finished our duty
almost three million models
For developers around the world.
I will divide the architectural decisions,
challenges
in the teaching which we have learned
during MongoDB Atlas scaling
in support of one of the largest
developing communities of artificial intelligence around the world.
I also have a live demo for you.
I'll show you what Hub Hugging Face is
I will tell you about MongoDB usage.
Hugging Face.
I hope you enjoyed this session.
Let's begin.
Before we move on to the technical details,
Let's talk about scale.
Right now, Hugging Face has more than
13 million users
The tenth number is developing very quickly.
We serve over 2 million public models.
Almost three million
I'll show you this during the live demo.
We have more than 500,000 dates,
more than 50,000 organizations
They use Hugging Face.
I'm not talking only about hobbyists or scientists.
More than 30% of the Fortune 500
Uses Hugging Face in their AI services.
Simply to put it into perspective.
Two years ago, we had 20,000 models.
We now have almost three million.
MongoDB is our primary database.
Almost all users on Hugging Face
They use MongoDB.
At this moment, we are using a set of replicas,
And we will be operating our shops
and using retail clusters,
to be prepared for more users,
More data, more development, and greater development.
I want to show you a short video
public models on Hugging Face Hub.
The past two years have been amazing for us
I kindly ask you to remember,
that this slide stopped at 2025.
Now we have 2026,
What does it mean that we offer many more models?
OK, let's now talk about high-level prediction.
When a user interacts with the Hugging Face Hub,
His proposal flows into Hub Frontend.
after the Hub API
and then to MongoDB Atlas.
MongoDB Atlas is a source of real data
our methods.
This is an important point here,
which sometimes surprises people.
We do not maintain models in MongoDB.
We keep everything about the models.
What does this mean in practice?
We use methods in MongoDB,
user information, information repository
And so on.
Physical models are directly in S3
In MongoDB, only the point is stored for the model.
in MongoDB documents
Moreover, we index our model cards,
Data sheets and certain application films with Python
And we are setting it up in Atlas Search.
This is what enhances our effectiveness.
full-text search on Hugging Face Hub
Now we will proceed to my laptop,
But I want to show you
Hugging Face Hub in practice.
Now I'll do a live demo
An introduction to Hugging Face Hub.
We now have four pillars on Hugging Face,
models, data,
space,
Bouquets, which are a new feature.
I'll tell you about that right away.
If someone wants to learn more,
We have very good documentation.
which describe everything in detail.
You can also use Hugging Face Chat.
to ask questions about this documentation.
Now let's return to the models.
One can use...
Models can be searched for
using many attributes.
For example, I want to generate text
I'll see how fast it is.
In reality, I'm now searching in MongoDB Atlas,
because the method is in MongoDB Atlas.
For example, if I want to use fewer parameters,
a few million less,
I can still see the appropriate models.
For example, I want to know,
Which model uses transformers
I almost have the probable results.
Full-text search can also be used.
to look for some information
via Atlas Search.
For example, audio text.
I can go back to Hugging Face Chat
and grab this model fairly quickly.
So, this searching for the full text
uses MongoDB Atlas for the purpose of.
For example, if I want
look for something about MongoDB
in embedding
Now I've returned to the MongoDB organization
Hugging Face Chat.
May I see the model card?
I always have a description here.
So, this model is good
for example, for RUG services.
I can fill out this form.
I can use manufacturers
Hugging Face Interface
like a larger cloud producer.
I can also use this model
directly through Hugging Face transformers.
So here I have a simple copy-paste
to my code
I will be able to use this model
without much trouble.
Let's go back to Hub.
We also have data.
So this place.
Actually, I forgot to show you guys,
We have almost 3 million models.
Ten number changes very quickly.
I am sure that in a few weeks
It will be 3 million and something.
Dane
We have almost a million now.
Again, I can use it very quickly
Search with MongoDB
I need to filter the models I require.
If I go to Full Text Search again
I will embed it in MongoDB.
I will check the data.
I have ready-to-use embeddings here.
I am using these data
from science
So, for example,
when I learned
Atlas Vector Search
I used Embedding in MongoDB
from Hugging Face.
Just because I didn't want to
Generate embeddings yourself.
The easiest part
It was simply
Get data from Hugging Face
and send them to MongoDB.
We also have a place.
So this is the place for AI applications.
Anyone can publish
a place in this place.
I would like to show you
Something new.
Our machine learning Inter.
Actually,
I have set up a MongoDB cluster.
for this chatbot
two weeks ago
what does MongoDB mean
It does not confirm only Hugging Face Hub.
It confirms it.
many other used cases.
I'm here, for example
May I ask,
Who are you?
That means this chatbot
It will help me navigate.
via Hugging Face
search model.
I think that too
You can use this chatbot
for connecting your own models.
The last pillar
Hugging Face Hub's surface
Just Bucket.
This is a new function.
Maybe two months.
And imagine,
In which database
Bucket is getting dressed.
Of course, MongoDB Atlas,
Now a cluster.
The idea is that,
AI agents
and AI teams
They can use these buckets,
because they are higher
from classic S3 things.
They use Hugging Face's CDN
in duplication technologies.
Here I have an example,
How to use these buckets.
Maybe we should switch to the console.
I can also interact with the Hub.
via Hugging Face CLI
I am already noticed.
For example, I want to create a Bucket.
I can use the CLI
Hugging Face Bucket Create
Let's put this into MongoDB.local.
The bucket has been created.
Let's try...
Yes, it's here.
If I go in
Hugging Face's accumulator
I should
See that Bucket is there
I can create my models in this Bucket
I can use my agent
to interact with this Bucket,
because the agent needs it
some data layer
of interaction.
Now let's move on to the slides.
Now let's talk about infrastructure,
Which one powers all of this.
At this moment we are using
classic replicas of MongoDB-7.
W Daily Basic mamy ok.
40 kbps
That number is also changing.
Recently I saw
disks up to 140 kbps,
because our
impact
just now increasing
And of course we must be ready for it.
We use
seven members of the replicants.
Three of them
They are electric.
what it means that each of them can
become the main one
Three of them
They are read-only discs.
so we can isolate
some heavy plates
z
electric plates.
To do that,
we'll just put it on
connection keyboard
near the key
Which story?
for reading only, then
Your record will be balanced.
for reading only
We also use
one analytical disc
for some
ad-hoc keyboards
some analytical discs
And so on.
So we're trying
no
to mix
our analytical traffic
z
electricity production
tiles
We are also trying
to use
preferences for reading,
reading preferences
private.
So let's go
on private discs,
those who truly need them
of strong consistency.
Everything that is not needed
strong
does not have to use
latest data
is going to
private.
We also use
in the near future.
That means your disk may
go to private and to
private.
It is a period after a period.
So when you do
tuning
just
You're checking your discs
and you must make a decision,
Is this disc
Maybe it can go to private
or maybe this record
should go to private ones,
private,
or maybe this record
I have to go to private.
We are trying to use
fast disks,
SSD
and also
We have a few clusters,
which they use
local NVMe drives
I am a big fan
local NVMe
because I know
from experience,
that the database is fast,
if the database has
Very fast and efficient disk,
Of course.
What is also
useful in the Atlas,
self-education
The atlas is capable of
distinguish the disk
For example,
if your disc
received
80%
85%
Atlas is capable
automatically
distinguish your association,
and also
Atlas is capable
distinguish your cluster
to the highest level.
I saw it in production,
sometimes it is useful
especially
when do we receive
a few
spikes,
which
occupy
a few hours
or perhaps a few days.
So this is
Today's architecture.
The diagram shows
seven replication sets.
As I mentioned,
we use
basic
of course for subtitles
and sometimes for reading,
Let's try anyway
distinguish this traffic
so many
replication set members,
How can we.
Ten analytical
This set is
hidden set
and if there's really something
What is it
some aggregation
or something like that
a very complex character
I'm trying to use
the hidden set
for this type of employee
just to make sure,
that these characters are
widespread from
others
traffic
What do we do in secondary school?
As I mentioned,
We are trying
keep our basics
mainly for rights
I
if we have any comprehensive aggregations,
They are going to the secondary school.
and also to
replication sets
We are working with replication sets
mainly
in secondary schools,
because we have
a few sets,
as thousands of sets,
Some of them use
replication sets
and sometimes, when
I am starting these sets,
They are trying to connect.
At the same time,
to find one's place
in replication sets, etc.,
so I decided
Change these sets
of the secondary schools
They are separated.
through
I think,
now
five members,
What makes our lives easier
I ad hoc.
Ad hoc
Everything that is ad hoc,
You're welcome. Sometimes people
they are trying to investigate,
What does not use replication sets,
So I recommend them to you
just join
right away to
hidden note
I
To run this kind of traffic there.
Another important thing,
which one we have
in an ad hoc manner,
data modeling
Flexible schema
It does not mean that there is no pattern.
You need to spend some time on it
and create an appropriate data model.
For example, two weeks ago
We started using
MongoDB's computed patron
so basically
We're recalculating some data a bit.
I
Guidelines from the application use
precomputed values
instead of driving
heavy traffic
in our production database.
We will also use
sets.
We use sets whenever we can.
again
One must remember,
so as not to close
too many things,
then you will touch
16 megabytes limit
and you shouldn't even
approach this limit.
So we should
Insert into document
Only information,
which are truly needed,
a potem MongoDB
It works very quickly,
because one query
I accept everything.
What do you need?
to your application.
Another important point
to indices.
Of course we use
sets,
but not only sets.
Also multi-key indexes
I
We are trying
to make sure
those indexes
They are really useful.
What am I doing?
Every 24 hours
I am logging in.
Z Atlas
I am running
log analysis
For example, Keyhole
I can see it,
Which one is the query
does not use
indices in order
list
Which one is the query
It doesn't use indexes at all.
I can fix it.
before
We might run into some problems.
So also
I am observing
use of indexes,
because indices
Of course they occupy space.
and we shouldn't have
more indexes,
what we really need.
Sometimes, as I have seen
in other companies,
and in the past as well,
databases
They had indexes,
He doesn't use them, either.
so I'm trying
Extract such indexes.
Actually
for the first time
I am using
MongoDB Feature
which allows me
hide...
I am using...
You can hide the indexes,
what does it mean that the query optimizer
He will not see them.
Then,
if
I don't see any bigger problems.
I'll pull them out
after two or three weeks.
I Atlas Search
It's a big deal for us.
Now the full technical search is underway
available
In the Atlas region, and not only there.
So I also noticed that
MongoDB Community Edition
supports the search for,
what does it mean that it is
separate
MongoT process
which consists of
Apache Lucene
and you can use
effective full-text searching
Also at the Premie.
We don't use this
At the Prize. Of course, we use
We are happy with this atlas.
Moreover, we have begun to use
Vector Search
which is not yet on production,
I think we will
use Vector Search
also in production.
Here we go.
Sharding
We're setting off right now
Replica Set
That's a simple setup.
We have one basic, we have six
secondary schools,
Alright, let's go quickly.
We are receiving
a new wave of users
Our databases are running.
The oath is increased
we decided to start using
Sharding
In the Atlas, as can be seen,
Sharded Cluster has more components
than Replica Set,
So we have configuration servers,
We have MongoDB databases.
We have a balancer, etc.
Fortunately in the Atlas
It's easy to run Sharded Clusters.
because Atlas is an automaton.
I remember the time when I had to
to rush to Prem.
I take,
That was possible.
But it wasn't that easy,
Nowadays
At the Atlas.
The only difficult part
It's just selecting the Shard Key.
This is the most important decision.
the one you must take,
When do you start?
Use Sharded Clusters.
Fortunately, now
You can use shard key analyzers.
That's what it's about
I am working now.
I am using
MongoDB sampling
What does it mean that I'm finishing?
production waste
for inclusion in MongoDB
I do not use profiling.
I'm afraid I'm worried,
That will be too heavy
for our clusters.
That's why I use a sampler,
which will not affect
Performance is very important.
Then I will use the Shard Key analyzers
to analyze my ideas
Shard Key
I found this way
Shard Key selections
far easier
than simply imagination.
We also have
something called Hugging Chat.
This is another application,
which one uses MongoDB
In the Hugging phase.
This is a chatbot.
what
Cloud
yes
ChatGPT
could you choose
your own open-source model
who will be using this chatbot.
MongoDB is the primary database.
Where do we place all the methods?
All settings
and also conversations.
So this is
also atlas.
Do you have a demo?
I think we don't have time
for this demo,
I only have a minute,
which was left.
So I won't play this demo,
But I want to tell you
Mongolia.
Mongolia is
for MongoDB.
We use this
In the Hugging phase.
You can check it on our GitHub.
You can run this in your web browser.
You can split the queries on Slack
with your producers,
Just by typing the link to Mongolia.
We knew it very well
useful
and we use this
in our online teams.
So if you're interested,
Just write down Mongolia
And check this out.
Thank you very much.
It was pleasant for me.
to be here.
I hope my session was
beautiful, and I hope so,
that you are satisfied.
Thank you.