DeepSeek Elastic Compute (DSec)
DeepSeek Elastic Compute (DSec)
A Sandbox Infrastructure for Effective Agentic Training at Scale
Core Thesis: To enable large-scale agentic training and evaluation, LLMs require more than just a simple runtime; they need an elastic, isolated, and stateful execution platform capable of handling massive bursts of heterogeneous workloads.
1. The Challenge of Agentic Workloads
Training "agents" differs from standard LLM inference. Agents must interact with the world—inspecting code repositories, triggering tools, and executing shell commands. This creates specific infrastructure pressures:
- Burstiness: Sandboxes are created in massive, sudden waves.
- Heterogeneity: Different tasks require different levels of isolation (from simple function calls to full OS environments).
- Statefulness: Environments must retain state across long-term interactions.
- Data Volume: Large image corpora are used, but individual reuse is often low.
2. System Architecture: DSec
DeepSeek Elastic Compute (DSec) is a production-grade platform that abstracts complex backend requirements into a unified SDK.
Backend Versatility
DSec doesn't rely on a single virtualization method. Instead, it offers a spectrum of isolation:
| Backend | Isolation Level | Primary Use Case |
|---|---|---|
FnCall | Low | Lightweight function execution |
| Container | Medium | Standard application environments |
| microVM | High | Stronger isolation with low overhead |
| Full-VM | Maximum | Complete OS-level autonomy |
Infrastructure Integration
The system optimizes resource utilization through several key mechanisms:
- Layered Composition: Environments are built from independently versioned layers to reduce redundancy.
- Resource Optimization: DSec employs to achieve high-density execution.
- Storage: It utilizes the Fire-Flyer File System (3FS), a distributed cluster-wide filesystem, to load image data on-demand.
3. Co-design with Reinforcement Learning (RL)
DSec is not a standalone tool but is deeply integrated with the RL training loop.
The Decoupling Strategy: The system separates stateful rollout execution (where the agent acts) from preemptible GPU training (where the model learns). This ensures that if a GPU node is preempted, the state of the agent's environment is not lost.
Logic Flow for Resource Management:
def manage_sandbox_lifecycle(training_status, sandbox_state):
if training_status == "IDLE":
reclaim_cpu_resources(sandbox_state) # Save costs
preserve_memory_snapshot(sandbox_state) # Keep state
elif training_status == "ACTIVE":
restore_environment(sandbox_state)
execute_rollout()
Safety Measures:
DSec is specifically designed to mitigate agent misbehavior, such as reward hacking (where agents find loopholes in the environment to get high scores without solving the task).
4. Performance and Scale
The scale of DSec is massive, designed to handle the demands of frontier model training.
Key Metrics:
- Cluster Size: nodes per production unit.
- Daily Volume: sandboxes created per day.
- Concurrency: simultaneous active sandboxes.
- Throughput: .
Deployment Checklist:
- Reduce environment setup latency.
- Optimize image distribution overhead.
- Maintain performance under high-density overcommit.
- Ensure state preservation during RL transitions.
Summary
By moving from a static sandbox to an elastic compute platform, DSec allows DeepSeek to scale agentic training efficiently. It solves the tension between the need for strong isolation and the need for high-density resource utilization.