Case Study: Hugging Face achieves secure, fast code execution for Open R1 with E2B Sandboxes

A E2B Case Study

Preview of the Hugging Face Case Study

How Hugging Face Is Using E2B to Replicate DeepSeek-R1

The customer, Hugging Face, faced the challenge of needing to safely execute potentially risky, AI-generated code as part of a reinforcement learning pipeline for their Open R1 project. The execution was required for a verifiable reward function, but running unverified code locally posed significant security dangers, such as system corruption or data loss.

The vendor, E2B, provided a solution through their secure E2B Sandboxes, which are isolated cloud environments. This allowed Hugging Face to execute code safely and at scale, integrating it into their training process in just a few hours. The solution was praised for its security, speed—with sandboxes starting in about 150ms—and cost-effectiveness, costing only a few dollars per training run. This enabled the research team to launch hundreds of secure sandboxes in parallel per training step.


View this case study…

Hugging Face

Lewis Tunstall

Research Engineer


E2B

6 Case Studies