Why AI Compute Comes in Rectangles — Erik Bernhardsson, Modal

Latent Space

Summary

Modal CEO Erik Bernhardsson joins the Latent Space podcast to explain how Modal evolved from his early workflow orchestration experiments in 2021 into a global AI infrastructure platform that has grown roughly 50x in two years. Rather than owning data centers, Modal rents capacity across nearly 25 cloud providers—often signing three-year reservation deals—and pools it into a single global system. This allows Modal to transform rigid three-year GPU supply blocks into elastic, on-demand compute for thousands of customers. While Modal Functions drives two-thirds of revenue primarily through inference, Modal Sandboxes has surged to one-third of revenue, growing 30% monthly as vibe coding platforms, background agents, and reinforcement learning labs spin up isolated environments with a median lifespan of eight seconds.

Bernhardsson warns that a future collapse in GPU prices poses a severe correlated tail risk for overleveraged buyers, explaining why Modal sources smaller clusters worldwide and focuses on software capital efficiency. Looking ahead, Modal plans to expand from roughly 200 employees to 700 by the end of next year while building products for small-to-midsize training, batch processing, and millisecond-scale sandbox snapshotting that could parallelize CI testing and agent workflows.

How time-sensitive the topic is: Developing story

By the numbers

  • 50 x growth: Estimated minimum growth in Modal's revenue, users, and usage compared to two years prior. (Mentioned at 1:03)
  • 30,000 USD per month: Modal's monthly revenue in January 2023 after growing from $100 in November 2022 and $2,000 in December 2022. (Mentioned at 8:47)
  • 25 clouds: Approximate number of cloud providers Modal works with to procure GPU capacity. (Mentioned at 14:44)
  • 2/3 of revenue: Share of Modal's revenue generated by Modal Functions, with Modal Sandboxes accounting for the remaining one-third. (Mentioned at 33:16)
  • 5,000 years of audio: Volume of audio files a customer transcribed in a few days using Modal's batch capacity. (Mentioned at 36:38)
  • 150 engineers: Approximate size of Modal's engineering team at the time of the interview. (Mentioned at 38:10)
  • 100 milliseconds: Target spin-up time for an ephemeral sandbox to wake up, run commands, and snapshot back to sleep. (Mentioned at 44:17)
  • 24 forward-deployed engineers: Approximate number of forward-deployed engineers at Modal, up from four at the start of the year. (Mentioned at 58:16)
  • 700 employees: Projected headcount for Modal by the end of next year, up from over 200 currently and a projected 250 by year-end. (Mentioned at 1:13:58)
  • 8 seconds: Approximate median duration of a sandbox running on Modal today. (Mentioned at 1:17:56)

Questions this video answers

Why is AI GPU capacity sold in three-year contracts and how does Modal solve this?

Because GPU supply is tight, infrastructure providers require buyers to sign three-year fixed contracts starting three to six months in the future. However, real AI workloads burst and fluctuate throughout the day. Modal solves this by renting capacity across nearly 25 clouds and pooling demand across thousands of customers, smoothing out usage so developers can rent GPUs on demand.

Erik Bernhardsson, 1:18:31 to 1:25:16

From this keypoint: Solving Rectangular GPU Contracts and Model Shifts

Why did Modal build its own container runtime and file system instead of using Kubernetes?

Kubernetes and Docker were designed for steady backend workloads running on cheap CPUs at low utilization. Generative AI requires loading massive models over the network onto expensive GPUs and scaling containers up and down rapidly. Modal built its own file system, scheduler, container runtime, and GPU snapshotting tools to eliminate startup overhead.

Erik Bernhardsson, 10:30 to 13:41

From this keypoint: Why AI Workloads Required a Custom Stack

How does Modal procure GPU capacity without buying its own hardware?

Modal transitioned from hyperscaler spot instances to signing three-year reservation deals with upfront prepayments across nearly 25 cloud providers. The company employs a four-person procurement desk to vet global vendors against strict hardware specs and a ten-person bare-metal engineering team to manage hardware failures. Renting preserves capital efficiency and avoids the equity dilution or debt risks of owning hardware.

Erik Bernhardsson, 13:41 to 17:57

From this keypoint: Shifting from Spot GPUs to Three-Year Leases

What drove the sudden growth of Modal Sandboxes?

Launched as a quick prototype in 2023 to isolate LLM-generated code, Modal Sandboxes saw very little revenue for two years and was nearly shut down in summer 2025. Growth exploded when LLMs became capable of generating entire applications rather than just code snippets. Today, vibe-coding platforms like Lovable, enterprise background agents at Ramp, and reinforcement learning labs drive Sandboxes to one-third of Modal's revenue.

Erik Bernhardsson, 32:01 to 36:02

From this keypoint: Code-Generating LLMs Saved Modal Sandboxes

How can container snapshotting improve AI agent workflows and CI pipelines?

Most current agent sandboxes act like persistent cloud dev boxes, which wastes compute when agents sit idle. Fast container snapshotting allows a sandbox to wake up in 100 milliseconds, execute a single command, and pause or clone itself. This enables agents to branch into hundreds of parallel executions and allows CI pipelines to snapshot test setups once and run every test in its own parallel sandbox.

Erik Bernhardsson, 41:34 to 46:48

From this keypoint: Ephemeral Sandboxes and Container Snapshotting

What happened in the Hugging Face security incident involving Modal?

Agents that exploited Hugging Face discovered a vulnerability in a third-party application deployed on Modal and used it as a springboard to gain full internet access. Modal's own infrastructure was not breached, similar to how a misconfigured app on AWS does not mean AWS itself was hacked. In response, Modal is evaluating stricter default security settings and using internal AI agents to attempt sandbox escapes.

Erik Bernhardsson, 47:30 to 52:51

From this keypoint: Hardening Defaults After Hugging Face Exploit

Why do AI coding agents make it harder for developer tools to deprecate old syntax?

Because large language models are trained on vast amounts of existing public code, coding agents strongly prefer generating older versions of Modal syntax. Nudging agents away from legacy patterns is difficult, forcing Modal to become much more conservative about deprecating features and to meticulously update every code example online.

Erik Bernhardsson, 52:51 to 57:48

From this keypoint: How AI Agents Reshape SDKs and Deprecation

How do neoclouds finance rapid GPU data center expansion?

Neoclouds secure multi-year chip commitments from major AI buyers like OpenAI or Anthropic and take those signed contracts to Wall Street lenders. Using the customer contract and GPUs as collateral, they raise billions in debt or equity to buy hardware from NVIDIA, Dell, or Supermicro. This pre-selling structure lets them scale massive pipelines before owning the underlying capacity.

Erik Bernhardsson, 26:21 to 31:54

From this keypoint: Alternative AI Chips and Neocloud Financing

Why is fine-tuning open-source AI models becoming less necessary?

A few years ago, teams had to fine-tune small open-source models on domain data to match frontier quality and lower costs. Today, open-weight models like Kimi K3, DeepSeek 4.1, and GLM 5.3 are strong enough off the shelf to replace frontier models directly at a fraction of the price. While post-training and reinforcement learning remain popular, standard domain fine-tuning is now largely optional.

Erik Bernhardsson, 36:10 to 41:21

From this keypoint: Midsize Training and Off-the-Shelf Open Models

Why does Modal make code reviews optional for its engineers?

Erik Bernhardsson believes mandatory human code reviews often serve as a crutch to avoid personal accountability for merging code into production. Instead of requiring human sign-offs on routine changes, Modal invests heavily in automated continuous integration tests, decoupled architecture, and system-wide rate limits. Engineers still request reviews for major architectural changes, but routine updates ship directly.

Erik Bernhardsson, 57:48 to 1:05:52

From this keypoint: Forward-Deployed Engineers and Optional Reviews

Why should AI inference providers exist separately from model builders?

Whenever a lab releases a new state-of-the-art open-source model, user demand shifts rapidly toward the new leader. If individual model labs held dedicated inference capacity, their utilization would swing wildly between launches. Independent inference platforms like Modal aggregate overall demand and automatically reallocate thousands of GPUs from yesterday's model to today's winner.

Erik Bernhardsson, 1:18:31 to 1:25:16

From this keypoint: Solving Rectangular GPU Contracts and Model Shifts

Credible AI™ signals

Confidence: Candid Executive Insights. Modal CEO Erik Bernhardsson provides detailed, firsthand operational and financial metrics from building an AI infrastructure platform. While his perspective naturally favors Modal's architecture, he candidly discusses past outages, procurement risks, and market uncertainties without relying on unsubstantiated hype.

Bias: Cloud-Maximalist Infra View. The conversation naturally centers on Modal's product thesis: multi-tenant cloud pooling, serverless GPU functions, and ephemeral sandboxes. Bernhardsson openly acknowledges his bias toward cloud infrastructure and Modal's specific role in transforming rigid three-year GPU contracts into flexible on-demand compute.

Originality (84%): Deep Operational Mechanics. Rather than repeating high-level AI platitudes, the discussion examines the unglamorous mechanics of GPU cloud procurement: three-year rectangular neocloud contracts, bare-metal failure rates across 25 providers, agentic sandbox escape testing, and how LLM training data makes deprecating old SDK syntax difficult.

Depth (82%): Rigorous Systems & Market View. Bernhardsson connects low-level systems engineering (container snapshotting, gVisor vs VMs, CI parallelization overhead) with macroeconomic realities (GPU scarcity rents, neocloud debt financing, and correlated tail risks in hardware resale markets).

Key points (13)

  • Short (25 min): key points 1, 3, 6, 8 and 13
  • Medium (42 min): key points 1, 2, 3, 4, 6, 8, 9 and 13
  • Relaxed (1h 15min): all 13 key points

1. Stable Diffusion Sparked Modal's Early Growth

Timestamp: 00:04:53 to 00:09:41 (5 min)

Speaker: Erik Bernhardsson

Erik Bernhardsson launched Modal in 2021 to solve general cloud execution rather than workflow scheduling, initially struggling to find revenue. When Stable Diffusion launched in late 2022, founder-led social media marketing drew developers needing custom inference, jumping monthly revenue from $100 to $30,000 by January 2023. This early traction with image and audio generation established generative AI inference as Modal's primary growth engine.

Impact: Medium. Why it matters: Demonstrates how general-purpose developer tools often find product-market fit only when a specific, compute-heavy application wave exposes the limits of legacy infrastructure.

“we went from like you know $100 a month in like I think like November 2022 and the next month we did like $2,000 a month and then like January 2023 we did like 30,000 all of a sudden”

In the video: Erik Bernhardsson, at 8:37

Neutral: YouTube: Latent Space

2. Why AI Workloads Required a Custom Stack

Timestamp: 00:10:30 to 00:13:41 (3 min)

Speaker: Erik Bernhardsson

Erik Bernhardsson argues that traditional cloud tools like Kubernetes and Docker were built for steady, low-utilization CPU backends rather than bursty, expensive GPU workloads. To load massive models quickly and autoscale containers in seconds, Modal built its own file system, container runtime, scheduler, and GPU snapshotting tools from scratch. Treating global compute across regions as one unified pool allowed the company to manage capacity despite occasional scaling bugs.

Impact: High. Why it matters: Validates the thesis that generative AI requires rethinking low-level systems primitives rather than wrapping existing container orchestration tools.

“you can't build like a wrapper on top of the old stuff in order to to do the new stuff you kind of need to start over a little bit from scratch”

In the video: Erik Bernhardsson, at 12:15

Neutral: YouTube: Latent Space

3. Shifting from Spot GPUs to Three-Year Leases

Timestamp: 00:13:41 to 00:17:57 (4 min)

Speaker: Erik Bernhardsson

After relying on hyperscaler spot instances and one-year reservations through late 2025, Modal had to adapt to a tightening cloud market by contracting with nearly 25 different clouds. Securing capacity now requires locking in three-year deals with upfront prepayments, prompting Modal to hire a four-person procurement desk and ten bare-metal engineers.

Impact: High. Why it matters: Exposes the heavy financial and operational burden behind serverless AI platforms, which must absorb multi-year lease risks to offer on-demand compute.

“we actually work with almost 25 clouds at this point and in many cases um in order to get the capacity we want like we we have to go and do you know three plus year deals”

In the video: Erik Bernhardsson, at 14:44

Neutral: YouTube: Latent Space

4. Bernhardsson Fears GPU Price Drops Over Scarcity

Timestamp: 00:18:06 to 00:26:12 (8 min)

Speaker: Erik Bernhardsson

Erik Bernhardsson pushes back on the idea that GPU supply is completely cornered, noting that NVIDIA ships hundreds of thousands of Blackwell chips monthly and smaller global clusters remain available. Because hardware prices historically fall like gravity, he worries far more about a correlated market downturn where GPU prices, utilization, and resale demand collapse simultaneously.

Impact: High. Why it matters: Challenges the prevailing industry dogma of buying infinite compute at any price, highlighting the solvency risk facing over-leveraged GPU buyers if hardware deflates.

“I don't necessarily worry too much about prices going up. I do worry more about actually prices collapsing. I don't think that's going to happen anytime soon. Uh but I think that would be a quite bad thing”

In the video: Erik Bernhardsson, at 19:43

Neutral: YouTube: Latent Space

5. Alternative AI Chips and Neocloud Financing

Timestamp: 00:26:21 to 00:31:54 (6 min)

Speaker: Erik Bernhardsson

Erik Bernhardsson predicts 2027 could finally bring wider adoption of non-NVIDIA accelerators as software layers mature and developers adopt disaggregated inference mixing NVIDIA with Cerebras or Groq. He also explains how neoclouds like Nscale and CoreWeave scale rapidly by taking five-year customer commitments to Wall Street to finance hardware purchases before owning the chips.

Impact: Medium. Why it matters: Clarifies both the technical path around NVIDIA's bottleneck via hybrid inference and the financial engineering powering the rapid rise of neoclouds.

“there's some interesting you know people doing these like hybrid you know disagregated inference where they run you know NVIDIA for the prefill and and cerebras for the decode and and things like that.”

In the video: Erik Bernhardsson, at 27:55

Neutral: YouTube: Latent Space

6. Code-Generating LLMs Saved Modal Sandboxes

Timestamp: 00:32:01 to 00:36:02 (4 min)

Speaker: Erik Bernhardsson

Modal operates two main products: Modal Functions, which drives two-thirds of revenue largely through inference, and Modal Sandboxes, which generates the remaining third. Built as a prototype in 2023 to isolate LLM-generated code, Sandboxes saw minimal revenue for two years and nearly faced cancellation in summer 2025.

Impact: High. Why it matters: Illustrates how infrastructure primitives built ahead of model capabilities can suddenly become core revenue drivers once AI models cross a capability threshold.

“going into the summer of 2023. So two years later we even discussed like do we even need this product like should we shut it down then it just started exploding.”

In the video: Erik Bernhardsson, at 34:25

Neutral: YouTube: Latent Space

7. Midsize Training and Off-the-Shelf Open Models

Timestamp: 00:36:10 to 00:41:21 (5 min)

Speaker: Erik Bernhardsson

Expanding beyond inference, Erik Bernhardsson targets underserved midsize training workloads—such as computational biotech and audio models requiring around 64 GPUs—alongside massive batch jobs like transcribing 5,000 years of audio. Simultaneously, he observes that traditional domain fine-tuning has become largely optional because off-the-shelf open-source models like Kimi K3, DeepSeek 4.1, and GLM 5.3 now nearly match frontier performance at much lower cost.

Impact: Medium. Why it matters: Signals a major shift in enterprise AI strategy: teams can often skip costly custom fine-tuning by deploying capable open-weight models directly.

“today I I would say like the open source models are so good that like you can basically just like swap them out and just run you know instead of you know the the Frontier ones”

In the video: Erik Bernhardsson, at 40:39

Neutral: YouTube: Latent Space

8. Ephemeral Sandboxes and Container Snapshotting

Timestamp: 00:41:34 to 00:46:48 (5 min)

Speaker: Erik Bernhardsson

To support millions of concurrent sandboxes and full Linux compatibility, Modal expanded from gVisor container isolation to full virtual machines while heavily investing in container snapshotting. Erik Bernhardsson argues that treating sandboxes like persistent cloud dev boxes is an inefficient lift-and-shift approach.

Impact: High. Why it matters: Redefines cloud execution architecture for AI agents, shifting from long-lived virtual machines to massively parallel, sub-second ephemeral environments.

“having the ability to like spin up a sandbox in, you know, 100 millisecond, run a few commands, and then like shut it down and like snapshot it.”

In the video: Erik Bernhardsson, at 44:15

Neutral: YouTube: Latent Space

9. Hardening Defaults After Hugging Face Exploit

Timestamp: 00:47:30 to 00:52:51 (5 min)

Speaker: Erik Bernhardsson

Addressing an incident where agents exploited Hugging Face, Erik Bernhardsson clarifies that attackers breached a vulnerable third-party application hosted on Modal to gain internet access, rather than hacking Modal itself. Comparing the issue to early public AWS S3 buckets, Modal is exploring more restrictive default security settings for deployed apps.

Impact: Medium. Why it matters: Shows how AI agents create both new attack surfaces for cloud hosts and powerful automated red-teaming tools for infrastructure defense.

Neutral: YouTube: Latent Space

10. How AI Agents Reshape SDKs and Deprecation

Timestamp: 00:52:51 to 00:57:48 (5 min)

Speaker: Erik Bernhardsson

Erik Bernhardsson maintains that good developer experience—clear documentation, descriptive errors, and imperative SDKs—directly translates to good agent experience. However, because LLM training data contains vast amounts of older online code, coding agents stubbornly use outdated Modal syntax, forcing the company to deprecate features much more conservatively.

Impact: Medium. Why it matters: Highlights an unexpected operational constraint for developer toolmakers: LLM training cutoffs make breaking API changes far costlier than before.

“we've actually seen that like because of agent training data it's very hard to deprecate things now. uh we see that like agents often like love using you know old versions of modal syntax”

In the video: Erik Bernhardsson, at 55:05

Neutral: YouTube: Latent Space

11. Forward-Deployed Engineers and Optional Reviews

Timestamp: 00:57:48 to 01:05:52 (8 min)

Speaker: Erik Bernhardsson

Modal expanded its forward-deployed engineering team from four to roughly 24 engineers this year to help customers tune LLM inference, cut overprovisioned compute costs, and identify product gaps without hiring dedicated product managers. Internally, Modal treats managers and individual contributors as equal members of technical staff where almost everyone writes code.

Impact: Medium. Why it matters: Offers a contrarian engineering template for AI startups: replace bureaucratic gatekeeping like mandatory code reviews and PM layers with automated testing and customer-embedded engineers.

“my view is like code reviews in in large part is like people in many cases trying to just escape the the accountability of like you know merging things into production”

In the video: Erik Bernhardsson, at 1:03:37

Neutral: YouTube: Latent Space

12. Multi-Tenant Cloud Focus and Scaling to 700 Staff

Timestamp: 01:06:09 to 01:16:03 (10 min)

Speaker: Erik Bernhardsson

Calling himself a cloud maximalist, Erik Bernhardsson rejects on-premises deployments as outdated security models that slow product iteration, though Modal may explore bring-your-own-cloud setups to pool unused GPU reservations held by AI labs. Because GPU prepayments dwarf payroll, Modal enjoys high operating leverage as it scales from over 200 employees toward roughly 250 by year-end.

Impact: Medium. Why it matters: Explains why control over the full multi-tenant stack is vital for rapid infrastructure iteration, while detailing the organizational limits of hypergrowth.

“by the end of the year maybe 250 by the end of next year you know but but like you know we're going to keep growing like maybe 2 and a half 3x so it's very likely we'll end up like next year like 700 people”

In the video: Erik Bernhardsson, at 1:13:50

Neutral: YouTube: Latent Space

13. Solving Rectangular GPU Contracts and Model Shifts

Timestamp: 01:18:31 to 01:25:16 (7 min)

Speaker: Erik Bernhardsson

Addressing the core problem in AI compute, Erik Bernhardsson explains that while GPU capacity is sold in rigid three-year rectangular blocks starting months in the future, real customer workloads burst and fluctuate daily. By aggregating thousands of customers, Modal smooths out demand to offer instant, granular on-demand GPUs and effortless reallocation whenever users switch between newly released open-source models.

Impact: High. Why it matters: Captures the central economic thesis of serverless AI infrastructure: duration transformation and cross-model pooling solve the mismatch between rigid hardware supply and volatile model demand.

“The biggest downside of GPU scarcity is not that it's hard to get GPUs, but that almost all capacity is sold as three years as a three-year rectangle starting 3 to 6 months in the future.”

In the video: YouTube: Latent Space, at 1:18:31

Neutral: YouTube: Latent Space

Conflicts of interest (1)

Executive Stake in Modal Platform

Financial conflict, High severity

Erik Bernhardsson is the founder and CEO of Modal, holding a direct financial and leadership stake in the AI infrastructure company he is analyzing.

Sources: Erik Bernhardsson, Modal

Significance: His assessment of multi-tenant serverless compute, neocloud economics, and competing bring-your-own-cloud models favors Modal's specific product architecture and commercial positioning.

Key sources

  • Erik Bernhardsson: CEO and Co-founder of Modal, former CTO of Better.com
  • YouTube: Latent Space: Podcast Host

Who's in this

  • Modal
  • Spotify
  • Better.com
  • Akshat Bubna
  • NVIDIA
  • Anthropic
  • OpenAI
  • Suno
  • Hugging Face
  • AWS
  • Cerebras
  • Groq

Also mentioned

  • Modal Functions (First mentioned at 32:14)
  • Modal Sandboxes (First mentioned at 32:15)
  • Stable Diffusion (First mentioned at 6:44)
  • Latent Space (First mentioned at 0:49)
  • ChatGPT (First mentioned at 4:47)
  • Luigi (First mentioned at 4:58)
  • Mage (First mentioned at 9:18)
  • Kubernetes (First mentioned at 11:04)
  • Docker (First mentioned at 11:04)
  • GCP (First mentioned at 13:24)
  • Oracle (First mentioned at 13:54)
  • AMD (First mentioned at 26:43)
  • Google (First mentioned at 26:51)
  • Trainium (First mentioned at 26:53)
  • Nscale (First mentioned at 28:41)
  • CoreWeave (First mentioned at 30:06)
  • gVisor (First mentioned at 33:52)
  • Lovable (First mentioned at 34:58)
  • Ramp (First mentioned at 35:00)
  • GitHub Actions (First mentioned at 45:00)
  • Decagon (First mentioned at 0:21)
  • Runway (First mentioned at 0:23)
  • Cognition (First mentioned at 0:23)
  • Zach Frankel (First mentioned at 3:02)
  • Vishal Garg (First mentioned at 3:13)
  • Airflow (First mentioned at 5:02)
  • Prefect (First mentioned at 5:03)
  • Dagster (First mentioned at 5:03)
  • New York (First mentioned at 9:16)
  • ComfyUI (First mentioned at 9:46)
  • Azure (First mentioned at 13:51)
  • Armenia (First mentioned at 22:29)
  • Indonesia (First mentioned at 22:32)
  • SemiAnalysis (First mentioned at 23:47)
  • TSMC (First mentioned at 27:19)
  • ASML (First mentioned at 27:19)
  • Nebius (First mentioned at 28:29)

This analysis was generated by skim (skim.plus), an AI-powered content analysis platform by Credible AI. Scores and classifications represent the platform's AI-generated assessment and should be considered alongside other sources.