File size: 9,942 Bytes
56ec530
f804d12
 
 
56ec530
 
f804d12
56ec530
 
f804d12
 
 
 
 
56ec530
 
f804d12
 
 
 
 
56ec530
 
 
f804d12
56ec530
 
f804d12
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
56ec530
f804d12
56ec530
f804d12
56ec530
f804d12
 
 
 
 
 
 
56ec530
f804d12
 
 
56ec530
 
 
f804d12
 
 
 
 
 
 
 
56ec530
f804d12
56ec530
f804d12
56ec530
f804d12
 
 
 
 
 
 
 
56ec530
f804d12
 
 
 
 
56ec530
 
f804d12
 
 
 
 
56ec530
f804d12
 
 
 
 
 
56ec530
 
f804d12
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
56ec530
 
f804d12
 
56ec530
f804d12
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
---
license: other
license_name: upstream-terms
license_link: https://huggingface.co/datasets/livecodebench/code_generation_lite
task_categories:
  - reinforcement-learning
  - text-generation
language:
  - en
pretty_name: LiveCodeBench 3-Layer EROFS Sandboxes (v1..v6)
size_categories:
  - 1K<n<10K
source_datasets:
  - livecodebench/code_generation_lite
tags:
  - stratabox
  - erofs
  - code-agents
  - reinforcement-learning
  - sandbox
  - http-range
  - livecodebench
  - competitive-programming
  - code-execution
viewer: false
---

# LiveCodeBench on StrataBox (`stratabox/livecodebench-erofs`)

1,055 `LiveCodeBench` problems (`v1`..`v6`) with decoded public and private tests and a shared multi-language judge toolkit. Mount it directly from the Hub with [StrataBox](https://github.com/stratabox/stratabox) over `hf://` HTTP Range.

[![GitHub](https://img.shields.io/badge/GitHub-stratabox%2Fstratabox-181717?logo=github)](https://github.com/stratabox/stratabox)
[![Website](https://img.shields.io/badge/Website-stratabox.github.io-0EA5E9)](https://stratabox.github.io/)
[![Python SDK](https://img.shields.io/badge/pip%20install-stratabox-3776AB?logo=python&logoColor=white)](https://github.com/stratabox/stratabox#official-sdks)
[![SDKs](https://img.shields.io/badge/SDKs-Rust%20%7C%20Python%20%7C%20Go%20%7C%20TypeScript-3776AB)](https://github.com/stratabox/stratabox#official-sdks)
[![Integrations](https://img.shields.io/badge/Integrations-verl%20%7C%20Harbor-8A2BE2)](https://github.com/stratabox/stratabox/tree/main/integrations)
[![License](https://img.shields.io/badge/StrataBox-MIT%20OR%20Apache--2.0-blue)](https://github.com/stratabox/stratabox)

See the [50-sandbox cold-boot demo](https://raw.githubusercontent.com/stratabox/stratabox/main/docs/assets/swebench-50-boot.gif) recorded on `stratabox/swebench-verified-erofs`.

Official SDKs: Rust (`cargo add stratabox-sdk`), Python (`pip install stratabox`), Go (`go get github.com/stratabox/stratabox-sdk-go`), TypeScript (`npm install @stratabox/sdk`).

## Overview

1,055 problems, 3 platforms, 6 releases. Each task is stored as read-only EROFS layers served from this repository, so an Edge mounts a task by fetching only the 256 KiB chunks it touches. Metadata (`meta.erofs`) is prefetched, so directory walks and `stat` calls cost no data reads. Writes go to a per-sandbox OverlayFS upper directory and never modify the shared blobs.

## StrataBox EROFS Dataset Suite

| Repository | Upstream benchmark | Tasks | Logical size | EROFS size | Size ratio | Range network saved (cold boot) | Status |
| :--- | :--- | ---: | ---: | ---: | ---: | ---: | :--- |
| [`stratabox/swebench-verified-erofs`](https://huggingface.co/datasets/stratabox/swebench-verified-erofs) | `princeton-nlp/SWE-bench_Verified` | 500 | 1,278.60 GiB | 105.54 GiB | 12.12x | 99.64% | Live |
| [`stratabox/swebench-multilingual-erofs`](https://huggingface.co/datasets/stratabox/swebench-multilingual-erofs) | `SWE-bench/SWE-bench_Multilingual` | 300 | 481.73 GiB | 457.18 GiB | 1.05x | 98.10% | Live |
| **[`stratabox/livecodebench-erofs`](https://huggingface.co/datasets/stratabox/livecodebench-erofs)** (this repo) | `livecodebench/code_generation_lite` | 1,055 | 1,409.45 GiB | 9.72 GiB | 144.95x | 99.90% | Live |
| [`stratabox/terminal-bench-erofs`](https://huggingface.co/datasets/stratabox/terminal-bench-erofs) | `harborframework/terminal-bench-2.0` | 89 | 81.57 GiB | 80.00 GiB | 1.02x | 99.08% | Live |
| [`stratabox/swebench-pro-erofs`](https://huggingface.co/datasets/stratabox/swebench-pro-erofs) | `ScaleAI/SWE-bench_Pro` | 731 (planned) | - | - | - | - | Publishing |

Sizes are computed from each repository's root `index.json`. Network savings are the share of logical image bytes not transferred during a measured cold boot (see the telemetry table on each card).

## Storage and Deduplication

| Metric | Value |
| :--- | ---: |
| Tasks | 1,055 |
| Unique base layers | 1 |
| Unique toolkit layers | 1 |
| Unique workspace layers | 1,055 |
| Total unique layers | 1,057 |
| Aggregate logical image size | 1,409.45 GiB (1,513,383,177,639 bytes) |
| Contiguous EROFS size | 9.72 GiB (10,440,413,184 bytes) |
| Size ratio | 144.95x (99.31% saved) |

EROFS layers are uncompressed and chunk-aligned to 256 KiB so that HTTP Range reads map directly to touched file extents.

One shared base and one shared judge toolkit serve every problem, so the 1,055 per-problem workspaces (decoded public and private tests) are the only per-task bytes.

## Measured `hf://` Cold-Boot Telemetry

Recorded against this live repository with a single StrataBox Edge (`stratabox cluster --edges 1`, kernel `7.0.0-1018-gcp`, GCP `n2-standard-64`, empty L2 chunk cache, no Docker daemon). 50 sandboxes (24 AtCoder, 4 Codeforces, 22 LeetCode) plus an oracle judge self-test.

| Strategy | Sandboxes | Logical image size | Network I/O | Wall time | Host RAM delta |
| :--- | ---: | ---: | ---: | ---: | ---: |
| Eager OCI pull | 50 | 66.64 GiB | 66.64 GiB | - | - |
| StrataBox `hf://` 256 KiB HTTP Range | 50 | 66.64 GiB | **70.9 MiB** (99.90% saved) | 77.0 s | ~495 MiB |

Wall time includes first-touch lazy paging over the public internet and depends on the Edge-to-Hub path. A warm L2 cache serves repeat boots with no remote reads.

## Quickstart

Terminal 1 starts a local cluster whose storage reads straight from this repository over HTTP Range. No Docker daemon, S3 credentials, or image pulls are needed.

```bash
export STRATABOX_REMOTE_URI="hf://datasets/stratabox/livecodebench-erofs"
# Optional mirror (for example mainland China or offline CI):
# export HF_ENDPOINT="https://hf-mirror.com"
./target/release/stratabox cluster --edges 1
```

Terminal 2 boots sandboxes from `index.json` with the runnable demo [`examples/livecodebench_boot_demo.py`](https://github.com/stratabox/stratabox/tree/main/examples/livecodebench_boot_demo.py):

```bash
export STRATABOX_REMOTE_URI="hf://datasets/stratabox/livecodebench-erofs"
pip install stratabox httpx
python3 examples/livecodebench_boot_demo.py
```

## Python SDK Snippet

Self-contained example (requires the cluster from Terminal 1):

```python
import asyncio, httpx
from stratabox import StrataBoxClient, StrataBoxContainerRunArgs

INDEX = "https://huggingface.co/datasets/stratabox/livecodebench-erofs/resolve/main/index.json"

async def main():
    tasks = httpx.get(INDEX, follow_redirects=True).json()["instances"]
    t = next(x for x in tasks if x["platform"] == "atcoder")
    async with StrataBoxClient("http://127.0.0.1:18080") as client:
        sbx = await client.run_container(StrataBoxContainerRunArgs(
            base_layer=t["base_layer"], toolkit_layers=[t["toolkit_layer"]],
            workspace_layers=[t["workspace_layer"]], memory_limit_mb=512))
        try:
            r = await sbx.run_shell("/opt/lcb/bin/python3 -I /opt/lcb/runner.py --verify-workspace", timeout=180)
            print(t["question_id"], r.exit_code, r.stdout.strip())
        finally:
            await sbx.stop()

asyncio.run(main())
```

## Integrations

- **verl.** `StrataBoxVerlTool` and `StrataBoxRolloutEnv` accept `base_layer`, `toolkit_layers`, and `workspace_layers` straight from `index.json`, with `idle_auto_pause_ms` freezing idle rollouts between LLM turns. See [`integrations/verl`](https://github.com/stratabox/stratabox/tree/main/integrations/verl).
- **Harbor.** `stratabox_harbor:StrataBoxEnvironment` runs Harbor task directories on the `container`, `microvm`, `fullvm`, and `fncall` backends. See [`integrations/harbor`](https://github.com/stratabox/stratabox/tree/main/integrations/harbor).

## Layout and `index.json`

```text
index.json                      root manifest (schema_version 1)
.gitattributes                  Git LFS rules for *.blob and *.erofs
layers/<layer_slug>/            meta.erofs, layer_id.txt, layer_manifest.json
blobs/<blob_slug>/              data.blob, blob_manifest.json (served via HTTP Range)
```

Each layer uses a contiguous five-file layout with no per-chunk files, which stays far below the Hub's 10,000-files-per-directory limit.

Example `instances[0]` entry:

```json
{
  "instance_id": "1873_A",
  "question_id": "1873_A",
  "title": "A. Short Sort",
  "platform": "codeforces",
  "difficulty": "easy",
  "contest_id": "1873",
  "contest_date": "2023-08-21T00:00:00",
  "release": "v1",
  "fn_name": null,
  "base_layer": "lcb/base:ubuntu22",
  "toolkit_layer": "lcb/tk:judge-py312-cpp20",
  "workspace_layer": "lcb/ws:1873_A",
  "target_file": "solution.py",
  "test_cmd": "/opt/lcb/bin/python3 -I /opt/lcb/runner.py --suite all --solution /testbed/solution.py",
  "public_test_count": 1,
  "private_test_count": 4,
  "logical_image_bytes": 1425590251
}
```

## Reproduce This Dataset

```bash
python3 examples/livecodebench_pack.py --out-remote-dir ./hf_export
hf upload-large-folder stratabox/livecodebench-erofs ./hf_export --repo-type=dataset
```

The packer pulls each upstream image, converts layers with `stratabox layer publish-dir`, and writes the manifest. Source: [`examples/livecodebench_pack.py`](https://github.com/stratabox/stratabox/tree/main/examples/livecodebench_pack.py).

## Licensing

The card metadata declares `license: other` because the upstream `livecodebench/code_generation_lite` card lists a Creative Commons license and the problem statements originate from LeetCode, AtCoder, and Codeforces, which retain their own terms. The packaging tooling is MIT. Review upstream terms before redistribution or commercial use.

## Citation and Credits

Upstream benchmark: [`livecodebench/code_generation_lite`](https://huggingface.co/datasets/livecodebench/code_generation_lite). Jain et al., *LiveCodeBench: Holistic and Contamination Free Evaluation of Large Language Models for Code* (2024). Packaging and sandbox runtime: [StrataBox](https://github.com/stratabox/stratabox), an independent open-source implementation inspired by DSec (arXiv:2609.22978).