GPULake

GPULake:Pooling Fragmented GPUs
for Many Coding Agents

Zhuoming Chen
InfiniAI Lab, Carnegie Mellon University · November 2026
GPULake live monitor · 4 agents sharing 1 L40timelapse

Four Claude Code agents share one L40 through GPULake for five hours, on two kernel tasks and two image and video serving tasks. The timelapse covers the run's last three hours: the job on the GPU, the queue, each agent's GPU budget, and who held the GPU when, ending with all four agents graded.

Coding agents now write the kernels, inference servers and experiments behind the next models, and every step of that loop runs on GPUs. Two things waste the GPUs a lab has: an agent given a GPU for its whole session uses it a fraction of the time, and the GPUs a lab can reach are scattered over shared servers and several clouds. GPULake pools them. Agents work in sandboxes with no GPU and submit short GPU jobs, which run with the agent's own files and software on a local GPU, an owned server or a rented machine.

49→0.4 min
median wait for an agent's first GPU, holding vs. sharing two H200s
57%→0%
of held GPU time with no job running, in the same runs
98%
of a 5-hour run one L40 was held, by four agents that each beat SGLang
4 / 4
tasks graded while a rented machine was killed every 2 minutes
The problem

GPUs are the bottleneck, and many of them sit idle

Agents that improve models and their systems (AlphaEvolve, KernelBench, ServerBench, RE-Bench, Singularity-Bench) all run on GPUs, and GPUs are what an academic lab has least of. For the short, iterative GPU work of kernels, inference engines and systems optimization, two things waste them.

28–43%of held GPU time ran a job

Agents hold GPUs they are not using

An agent spends most of a session reading, thinking, editing and compiling, and needs the GPU in bursts of seconds to minutes. In our runs, a GPU attached to an agent's session ran jobs only 28–43% of the time it was held, while other agents waited up to 73 minutes for one.

0.4 s – 172 sto get a GPU, by source

The GPUs a lab can reach are fragmented

A few free cards on servers shared with people, other servers the lab owns, and credits at RunPod, Vast.ai, Modal and Daytona. Each has its own interface, start-up time, way of getting software onto a machine, and billing. No single source is large enough, and an agent cannot be expected to juggle all of them.

How it works

Sandboxes without GPUs, one coordinator, any GPU

GPULake is one service, the coordinator, that holds all the GPUs on the agents' behalf. An agent asks for GPUs, or simply submits a command; when its turn comes, the command runs in a separate container that sees exactly the GPUs it was given, with the agent's own files and software, wherever the scheduler found them.

GPULake architecture: agent sandboxes without GPUs talk to the coordinator, which runs GPU work on local GPUs, owned servers or rented machines
1

Compile in the sandbox

Builds, CPU tests and code reading need no GPU. gpurun gpus says each GPU's model and what to compile for, before any machine has started.

2

Submit a short GPU job

The call returns at once. A queue with priorities and backfilling places the job on a GPU in the pool; short, honest limits start sooner.

3

Keep working, collect the result

The job holds its GPU only while it runs, and the GPU passes to the next job 0.07 s after it exits. One blocking call returns the exit code.

agent sandbox · no GPU
# compile in the sandbox, without a GPU
$ nvcc -arch=sm_89 -O3 -o bench bench.cu
# queue the GPU step with an honest time limit; it returns at once
$ gpurun submit -g 1 -t 3m -p "v4: tiled epilogue" -- ./bench
gpurun: J41 submitted (queue position 2). Keep working; ...
# ... prepare v5 while J41 waits and runs, then collect the result
$ gpurun job J41 --wait 600

Short jobs, not sessions

A submitted job brings its own short lease, which ends when the command ends. Leases remain for interactive work, such as a server the agent queries from its sandbox.

The environment travels

Locally, a job shares the sandbox's image, files and localhost. Remotely, the machine runs the sandbox's image and gets only the files that changed.

One pool, many sources

Local GPUs, owned servers and four clouds behind one lease interface, in the operator's order of preference: local first, the cloud takes the overflow.

Limits from outside the agent

Per-agent and per-user limits, GPU-hour budgets, spending caps, tokens bound to their sandbox, and jobs that see only their own GPUs. Only usable time is charged.

Every wait explained

A queued request says its place, its expected start and what each GPU it could get is doing; a denial says why and when retrying will help.

Built to fail safely

Retries and cool-downs, reruns of lost jobs, a sweep for leaked machines, and a coordinator that picks up where it left off after a restart.

GPU sources

One pool over fragmented GPUs

To the scheduler, a GPU is a GPU. Each source is a backend behind the same lease interface, and a new cloud implements four operations: create, check, delete and list machines. Every source below was tested live.

This host
0.07 shand-off between jobs

Local GPUs

a machine is
a job container next to the sandbox
software
the sandbox's image and folders
tested on
H200, L40
SSH
3 scontainer ready

Owned server

a machine is
a container on the lab's server
software
the sandbox's image, copied once
tested on
a 10-GPU L40 server
Marketplace
80 s13 GB task image ready

RunPod

a machine is
a rented pod
software
a chosen image, or the sandbox's via a registry
tested on
RTX 4090
Marketplace
172 s13 GB task image ready

Vast.ai

a machine is
the cheapest suitable offer
software
as RunPod
tested on
RTX 4090
Sandbox cloud
0.4 sto get a GPU

Modal

a machine is
a Modal sandbox
software
built on Modal, or the sandbox's
tested on
T4, A10G
Sandbox cloud
73 sfrom grant to a running job

Daytona

a machine is
a Daytona GPU sandbox
software
a chosen public image
tested on
RTX 4090
  • Only changes are sent. Before each job, the working folder's fingerprints are compared with what the machine last received: 4.3 s for a lease's first job, 1.0 s when nothing changed. Results come back when the job ends.
  • Saved environments. What an agent built on a machine (packages, compiled extensions, models) is saved when the machine is given back, and the same agent's next machine starts from it. Saves are never shared between agents.
  • Start early, charge late. A machine is created the moment its lease is granted, so it boots while the agent keeps working; the lease's clock starts only when the machine is up.
  • No local GPUs needed. The coordinator can run on a laptop and rent every GPU, for the agents and their graders.
Results

Sharing beats holding, with real agents

We ran Claude Code (Claude Sonnet 5.5) and Codex (gpt-6.1-sol) agents through the Harbor evaluation framework, each in a sandbox with 4 CPUs and no GPU, plus emulated agents that isolate the scheduling.

Eight agents (four Claude Code, four Codex) each build an inference server for Qwen3.5-2B on two H200s, with 5 hours and 1 GPU-hour each. Under hold, each agent asks for one GPU at the start and keeps it; under share, each submits short GPU jobs through GPULake. Nothing else differs.

Timelines of eight agents holding GPUs for their sessions vs. sharing two H200s through short jobs
(a) Hold: the first agents to ask keep both GPUs for 24–46 minutes each while their jobs run less than half of that time (light bars), and the Claude Code agents wait up to 73 minutes. (b) Share: every agent has a GPU within 1.5 minutes.
49 → 0.4 min
First GPU in seconds, not an hour

Median wait for an agent's first GPU (max 73 → 1.5 min).

162 → 78
Half the GPU time occupied

GPU-minutes held for the same work: 72 of 162 ran jobs under hold, all 78 under share.

No worse
Sharing doesn't cost results

Two agents with two GPUs to themselves reached 15.5× and 8.6×, no better than the shared agents (7/8 passed shared, 8/8 holding).

Emulated agents run 12 iterations of about 15 s of CPU work and 5 s of real GPU kernels each, so an agent needs the GPU about a quarter of its time. Policies: hold a lease per session, batch a blocking job per GPU step, or submit a job and pipeline the next step's CPU work.

GPU busy share and makespan for 1 to 16 emulated agents under hold, batch and submit
(a) Under hold, the GPU runs jobs 28–33% of the time however many agents share it. (b) Eight holding agents take 33 minutes, eight submitting agents 10.
28% → 92%
GPU busy with 8 agents

Short jobs let agents interleave until the GPU itself is the limit, at 99% SM utilization while leased.

33 → 10 min
Eight agents finish 3× sooner

Holding serializes agents: the k-th agent waits for everyone before it.

−57%
Less time blocked by pipelining

With one agent; −48% with two and −15% with four, until the queue dominates.

Eight agents share one H200, with no internet and no serving frameworks: four build an OpenAI-style server for Qwen3.5-2B (gated on held-out MATH500 accuracy), four a text-to-speech server for Ming-3.0-tts-0.5B (gated on Whisper word error rate and speaker similarity). A GPU job here loads a model, captures CUDA graphs, starts a server and scores it.

Timeline of eight agents sharing one H200, with each server's speedup
(a) Each lane is one agent, with its server's speedup over the reference on the right. (b) Up to six agents waited at once, but every job released the GPU as soon as it ended.
A minute of the live monitor, nine minutes in: one agent benchmarks its Qwen server while five wait.
TaskAgentSpeedup
Ming TTSClaude Code665×, 652×
Ming TTSCodex501×, 415×
Qwen3.5-2BCodex23.7×, 20.5×
Qwen3.5-2BClaude Code15.7×, 7.1×
8 / 8
Every server passed

All quality gates, and a code audit found no rule broken: full model per request, no caching, nothing below bf16.

2.0 min
Median wait for the GPU

p95 5.8 min, max 7.5 min, with up to six agents waiting at once.

93%
Of the run the GPU was leased

126 agent leases and 8 graders over 112 minutes; every granted lease ran a job.

Long runs

Hours-long runs on a single GPU

Sharing has to hold up over hours. Four Claude Code agents shared one L40 for 4 hours each on two kernel tasks from Hy4-flash-FP8 and two generation-serving tasks; the kernel tasks were served first. Four Codex agents shared one H200 for 8 hours each on a ServerBench task.

Timelines of the ServerBench run on one H200 and the four-task run on one L40
(a) Four Codex agents on a ServerBench server, on one H200. (b) Four Claude Code agents on two kernel and two generation tasks, on one L40; all four beat SGLang's score on their task (in parentheses).

An MoE kernel 1.4× SGLang's

The MoE block of Hy4-flash-FP8 on one L40, scored as the fraction of the roofline reached: 0.651 against SGLang's fused-MoE kernels at 0.454, from a starter at 0.0155, using 27 of its 60 GPU-minutes.

KernelClaude Code · median wait 1.5 min · 44 leases
0.651
roofline fraction, vs. 0.454 for SGLang

A sparse-attention indexer 3× SGLang's

The compressed indexer of Hy4-flash-FP8, from single-token decode to 8K-token prefill: 0.231 of the roofline against 0.076 for SGLang's own indexer kernels, from a starter at about 0.007, with 42 of 60 GPU-minutes.

KernelClaude Code · median wait 1.1 min · 32 leases
0.231
roofline fraction, vs. 0.076 for SGLang

Image serving above SGLang Diffusion

Serving Z-Image-Turbo on a replay of real prompts, scored as throughput per dollar behind image-quality gates: 5.45 against 4.21 for SGLang Diffusion and 3.70 for the starter, with 75 of 120 GPU-minutes.

Image generationClaude Code · median wait 5.3 min · 16 leases
5.45
throughput per dollar, vs. 4.21 for SGLang Diffusion

Video serving above SGLang Diffusion

Serving Wan2.1-T2V-1.3B text-to-video on a replay of real prompts: 4.79 throughput per dollar against 4.53 for SGLang Diffusion and 3.19 for the starter, with 72 of 120 GPU-minutes.

Video generationClaude Code · median wait 8.5 min · 15 leases
4.79
throughput per dollar, vs. 4.53 for SGLang Diffusion

Twelve hours, one H200, four agents

A ServerBench task: the most cost-efficient server for Qwen3.8-27B-INT4, scored on a replay of real coding-agent traffic, where SGLang scores 1.05. The agents wrote their own INT4 and FP8 engines; the two graded ones scored 0.61 and 0.58. Two gradings were lost when other users' containers filled the server's disk.

Inference servingCodex · 69 leases · 2.5 GPU-hours per agent
99%
of the 12-hour run the GPU was leased

Over the 5-hour L40 run, the GPU was held 98% of the time, by 107 agent leases and four graders. Without preemption, one grader waited 40 minutes behind another.

Failures

Rented GPUs, and machines that die

With no local GPU at all, four agents and their graders rented every GPU from RunPod, Vast.ai and Modal, while a chaos monkey terminated a random running machine through its provider's API every 2–2.5 minutes.

kill 1 · Vast.aiidle
21 sto notice

A warm machine between jobs; given back and counted against its backend.

kill 2 · RunPodunder a job
4 sto notice

The job was rerun, but its agent had pinned it to a one-slot backend; a lost slot is now only a preference.

kill 3 · Modalunder a job
3 sto notice

The job was rerun on another backend and exited 0.

kill 4 · Vast.aiunder a job
29 sto notice

The job was rerun and exited 0.

PoolWorkloadResult
RunPod + Vast.ai RTX 4090s only8 kernel tasks, Claude Code and Codex7 / 8 solved with 28 jobs; machines up 32–123 s after the grant
Local H200 + RunPod + Vast.ai + Modal4 kernel tasks, the scheduler places workdone in 7 minutes; 16 of 18 jobs on the local GPU, the overflow rented
RunPod + Vast.ai + Modal, no local GPU4 kernel tasks; agents and graders rented28 leases, 4 / 4 graded, 18 minutes, $0.58
Compare

How GPULake compares

The closest systems give an agent a cluster, run atomic programs on exclusive GPUs, schedule batch jobs for people, or split one GPU into slices.

GPULakeSkyPilotKCoralSlurm / KubernetesMIG / MPS
What an agent getswhole GPUs, per job or per leasea clusterexclusive GPUs for one request (≤ 15 min)GPUs for a batch joba slice of one GPU
GPU workany command, seconds to hours, in the agent's own environmentjobs on its cluster; workdir snapshotan atomic program on uploaded filesa script in a fixed imageits own processes
GPU sourceslocal, owned servers, 4 clouds, one APIabout 25 clouds and clustersits own nodesthe cluster'sone GPU
Across agentsqueue, backfilling, priorities, budgets, idle reclaimper cluster; autostopleast-busy GPUqueues, fair sharestatic split
GPU held while the agent thinksnowhile the cluster is upnoif the job is the sessionyes
Written for modelsCLI, MCP, skill; every wait explainedCLI, API, agent skillHTTP client, CLInono

SkyPilot

SkyPilot gives an agent a cluster on about 25 clouds and the credentials to make one. GPULake keeps GPUs and credentials on the coordinator's side, carries the agent's live environment, and enforces what many agents spend together.

KCoral

KCoral runs atomic kernel programs on exclusive GPUs, a good fit for check-benchmark-profile loops. GPULake also runs servers, long benchmarks and training, and pays for that with about 0.8 s to start a container.

MIG and MPS

Slices let several processes share one GPU at once, but each agent keeps its slice while it thinks, and a benchmark on a slice measures the slice. GPULake time-shares whole GPUs at the granularity of jobs.

Get started

Run GPULake on your GPUs

GPULake is open source under the MIT license. The coordinator needs Docker, and accounts only at the clouds you want to rent from.

your GPU host
$ git clone https://github.com/Infini-AI-Lab/GPULake && cd GPULake
$ uv venv .venv && uv pip install -e .
# set the GPUs agents may use, their limits, and any remote backends
$ cp examples/config.yaml ~/.gpulake.yaml
$ .venv/bin/gpu-coordinatord -c ~/.gpulake.yaml
Questions

Questions

What is GPULake, in one sentence?

A service that pools a lab's scattered GPUs (shared servers, owned machines and clouds) for many coding agents in GPU-less sandboxes, which submit short jobs that carry their own environment, so a GPU is held only while it computes.

Does waiting for a shared GPU make agents worse?

Not in our runs. As a baseline we gave one Claude Code and one Codex agent two GPUs to themselves, with the same task and budget; they reached 15.5× and 8.6×, no better than the agents that shared. Waiting a minute or two for a GPU did not hurt; waiting an hour for one, under holding, did.

Which GPUs can it use? Do I need GPUs of my own?

Local GPUs, servers you own reached over SSH, RunPod, Vast.ai, Modal and Daytona, in your order of preference. The coordinator can also run on a machine with no GPU and rent every GPU, under per-backend spending caps.

How does an agent's environment get to a rented machine?

The machine runs the sandbox's own image, pushed once to a registry or copied once to an owned server. Before each job only the files that changed are sent, results are copied back, and what the agent built there is saved for its next machine. Logins and credentials never leave the sandbox.

How do you keep agents from using each other's GPU time?

Sandboxes have no GPU devices, so the only way to a GPU is a lease charged to its agent. A job's container has only its lease's GPUs, each sandbox's token works only from that sandbox, a GPU is handed on only after the previous lease's containers are gone, and idle leases are reclaimed.

What happens when a machine or a cloud fails?

Provider calls are retried, a failing backend sits out a cool-down that doubles each time, a machine that never starts sends its job back to the queue with its place kept, a lost machine's job is rerun elsewhere, shutdowns are retried until confirmed, and a restarted coordinator picks up from its on-disk state.

What are its limits?

No preemption: a running job keeps its GPU until it ends. No splitting of one GPU between jobs. A job on another machine does not share the sandbox's localhost. Each job starts a container, about 0.8 s. And sharing works only if agents give GPUs back; budgets and idle reclaim cover the rest.

Where can I read more?

The technical report has the design, the optimizations and the case studies; the experiment log has every run.