Why AI Compute Comes in Rectangles - Erik Bernhardsson, Modal

Latent Space

Modal's Erik Bernhardsson on GPU contracts, sandboxes now a third of revenue

The Modal CEO tells Latent Space why three-year GPU rentals fit AI workloads badly, how his company now sources capacity from almost 25 clouds, and why agent sandboxes grew from a near-shutdown product into a major business.

Erik Bernhardsson, co-founder and CEO of AI infrastructure company Modal, joined Latent Space for a wide-ranging interview on how Modal buys and pools GPU capacity, the financial risks of the GPU market, and the surprising growth of agent sandboxes. His central argument: most GPU capacity is sold as a flat, three-year block starting months in the future, while real demand rises, falls and bursts. Modal's pitch is to smooth that demand by serving thousands of customers from one pool.

Modal's growth and how it started

Bernhardsson built the music recommendation system at Spotify, then served as CTO of mortgage company Better.com for five years. Modal grew out of the tools he wished he had had for AI work. He self-funded it for a long time and raised a seed round in early 2022. Revenue stayed tiny until Stable Diffusion arrived: from about $100 a month in November 2022 to $2,000 the next month and $30,000 in January 2023, largely from one image-generation customer. He says Modal is now at least 50 times larger than when he last appeared on the show two years ago, has about 200 employees, and expects about 250 by year end and perhaps 700 next year.

Video interview frame of two people in conversation about Modal's early revenue growth.
Discussion of Modal's early growth after Stable Diffusion and its first big customer.

Where Modal gets GPU capacity

Modal once relied mostly on spot and on-demand capacity from the big clouds. That no longer works, so it now deals with almost 25 clouds, often signing three-year deals with large upfront payments. It has a procurement desk of four people and about ten engineers managing bare-metal hardware. Modal rents everything and owns nothing, though Bernhardsson says buying is on the table. He prefers staying a lean software company.

He does not see a permanent shortage. Hardware prices eventually fall, he argues, and his bigger worry is a price collapse that would hurt anyone locked into expensive supply. He points to the Hunt brothers' attempt to corner silver as a warning against buying up everything. Smaller, riskier clouds are where Modal finds opportunity, since Anthropic and OpenAI tend to prefer established suppliers. He expects 2027 might finally be the year of non-Nvidia accelerators, citing AMD, Google's TPUs and Cerebras, including setups that use Nvidia chips for prefill and Cerebras for decode.

Video interview frame of two people discussing GPU capacity contracts and pricing risk.
Talk of renting versus owning GPUs and the risk of locking in three-year capacity deals.

Sandboxes, snapshots and the Hugging Face incident

Modal's two main products are functions, launched in 2021 and now about two thirds of revenue, and sandboxes, now about a third. A sandbox is an isolated environment where code, often written by a model, can run safely. Launched in 2023, they saw little traction and the team considered shutting them down, until vibe-coding companies, background coding agents and reinforcement learning labs drove rapid growth.

Bernhardsson expects sandboxes to become shorter-lived. Today's median Modal sandbox lasts about eight seconds. With fast snapshotting, an agent could start a sandbox, run a few commands, save its state and shut it down, or fork it into many copies. He gives CI as an example: snapshot a container after setup, then run every test in its own sandbox in parallel.

He also addressed the Hugging Face incident. An app hosted on Modal was compromised, and agents used it to reach the wider internet. He says Modal itself was not hacked, but the company is considering stricter default security, and now runs agents internally that try to escape sandboxes.

Engineering culture and the rectangle problem

Modal now has 24 forward-deployed engineers who tune customer workloads, with the aim of turning that work into product. It has no product managers. Code review is optional, with the weight placed on testing and CI.

Video interview frame of two people discussing agent sandboxes and snapshots.
Explaining how snapshotting could let sandboxes start and stop quickly for parallel testing.

Back on capacity, he calls the rectangular contract the real downside of scarcity. Modal can hand a customer 100 GPUs immediately because aggregate demand across many customers is smooth. He applies the same logic to open-model inference: when demand shifts between labs' newest models, a shared provider can move capacity without anyone asking.

Questions and answers

What did Modal CEO Erik Bernhardsson say about GPU contracts on Latent Space in 2026?

Erik Bernhardsson, CEO of AI infrastructure company Modal, told Latent Space that most GPU capacity is sold as a flat, three-year block starting months in the future, while real AI demand rises, falls and bursts. He argues this rectangular contract is the real downside of scarcity.

How does Modal source GPU capacity?

Modal now deals with almost 25 clouds, often signing three-year deals with large upfront payments. It relied mostly on spot and on-demand capacity from the big clouds before, but that no longer works. Modal rents everything and owns nothing, though CEO Erik Bernhardsson says buying is on the table.

How big is Modal's sandbox business?

Sandboxes are now about a third of Modal's revenue, while functions, launched in 2021, are about two thirds. Modal launched sandboxes in 2023 and saw little traction, and the team considered shutting them down. Vibe-coding companies, background coding agents and reinforcement learning labs then drove rapid growth.

How does Modal give customers GPUs immediately?

Modal can hand a customer 100 GPUs immediately because aggregate demand across its many customers is smooth. Modal pools compute and serves thousands of customers from one pool. CEO Erik Bernhardsson applies the same logic to open-model inference, where a shared provider can move capacity as demand shifts between models.

How much has Modal grown and how large is its team?

Modal is now at least 50 times larger than two years ago, according to CEO Erik Bernhardsson. The company has about 200 employees and expects about 250 by year end and perhaps 700 next year. Revenue was about $30,000 in January 2023, largely from one image-generation customer.

What happened in the Hugging Face incident involving Modal?

An app hosted on Modal was compromised, and agents used it to reach the wider internet. Erik Bernhardsson says Modal itself was not hacked. The company is considering stricter default security and now runs agents internally that try to escape sandboxes.

From the YouTube description

AI workloads don’t run in neat, three-year rectangles. But much of the GPU market still sells capacity that way. Modal CEO Erik Bernhardsson joins Latent Space to explain how Modal pools compute, scales AI workloads and thinks about the financial risks of building a GPU cloud.

Erik takes us from building Spotify’s recommendation system to founding Modal, then digs into GPU supply, alternative accelerators and the surprising growth of agent sandboxes. We also discuss sandbox security, developer experience in the age of agents, forward-deployed engineers and why Modal makes code review optional.

Links:
• Modal - https://modal.com/
• Erik’s writing - https://erikbern.com/
• Modal on serverless GPU economics - https://modal.com/blog/how-to-price-serverless
• Modal’s GPU memory snapshots - https://modal.com/blog/gpu-mem-snapshots
• Scaling to one million concurrent sandboxes - https://modal.com/blog/scaling-to-1-million-concurrent-sandboxes-in-seconds
• Our earlier conversation with Erik - https://www.latent.space/p/modal
• Modal CTO Akshat Bubna on AI infrastructure and sandboxes - https://www.latent.space/p/modal2026
• Latent Space - https://www.latent.space/

Timestamps:
0:00 What Modal does
1:25 From Spotify to building Modal
4:19 Founding before the generative AI boom
7:43 First customers and fundraising
10:00 Building for inference and autoscaling
13:21 Where Modal gets GPU capacity
15:39 Renting vs. owning infrastructure
19:45 The risk of GPU prices falling
24:18 Is AI demand infinite?
26:12 Alternatives to NVIDIA
28:25 What Modal can learn from neoclouds
30:26 GPUs as an asset class
31:55 Modal’s products: functions and sandboxes
36:03 The case for smaller training workloads
41:21 How agent sandboxes are changing
46:48 Anthropic and sandbox security
49:29 Using agents to test security
52:51 Developer experience in the age of agents
57:45 What Modal’s forward-deployed engineers do
59:55 Modal’s approach to product management
1:03:29 Optional code reviews and engineering culture
1:05:56 Cloud, on-prem and bring-your-own-cloud
1:09:25 Capacity, fundraising and growth
1:13:07 Scaling the team
1:17:28 Erik’s tweets: ephemeral sandboxes
1:18:31 The problem with rectangular GPU contracts
1:21:20 Inference providers vs. model builders
1:23:25 Where models improve next

Sponsorship and business inquiries: business@latent.space

Watch on YouTube

Working out what this means for your business?

Aileron Shift builds the systems behind this site: AI newsrooms that research, write and publish on their own, marketing automation and WordPress hosting for companies that need to move faster than their competitors.