RSIBox: Towards Live-Editable LLM Infra for RSI A new runtime sandbox called RSIBox cuts the time to test a one-line edit in the vLLM GPU engine from 228 seconds to 2.4 seconds, a speedup of up to 95x, by keeping heavy GPU state alive in a fault-isolated sandbox and hot-reloading only the changed component instead of cold-restarting the engine. The RSIBox authors report that agents spend 60% to 95% of wall-clock time waiting on GPU tests, and that RSIBox lets an agent reach a 6-hour vLLM optimization target 2.3x sooner while generalizing across six engines (vLLM, SGLang, Megatron-LM, FastVideo, veRL and Miles) for up to 1.52x end-to-end workload speedups with near-zero cold restarts. The work targets the evaluation bottleneck in recursive self-improvement, where a 6-hour experiment showed scaling token generation to 1500 tps shrank total runtime by only 6% because GPU evaluation dominated the clock. TL;DR. Improving AI systems through recursive self-improvement RSI is bottlenecked by evaluation: agents spend 60% to 95% of their wall-clock time waiting for GPU tests to finish. Today, testing even a one-line code change in a GPU engine like vLLM requires killing the process and booting the entire system from scratch, waiting several minutes to reload model weights and re-initialize the GPUs before a single test prompt can run. We introduce RSIBox , a runtime sandbox and execution environment that makes GPU systems live-editable . Instead of restarting the engine on every edit, RSIBox keeps the heavy GPU state alive inside a fault-isolated sandbox, hot-reloads only the small piece of the system that the edit actually changed, and rolls back or recovers from broken edits without losing warm GPU state. Paired with rapid targeted testing, RSIBox shrinks the time to test an edit in vLLM from 228 s to 2.4 s up tp 95x faster , lets an agent reach a 6-hour vLLM optimization target 2.3x sooner , and generalizes across six major AI engines vLLM , SGLang , Megatron-LM , FastVideo , veRL , and Miles to deliver up to 1.52x end-to-end workload speedups with near-zero cold restarts. Evaluation Is the Bottleneck of RSI evaluation-is-the-bottleneck-of-rsi Imagine you are a developer sitting at your keyboard fixing a bug or tuning a kernel in an AI engine. You tweak a few lines of code, run a quick check to see whether it helps, and either keep the change or revert and try something else. As a project grows larger, however, evaluating even a single line of code against the full system can take several minutes to warm up. As a result, you can wait for several minutes or even longer to test your one line of change actually runs and perform as expected in the real system. Recursive self-improvement RSI for AI systems follows that exact loop. Each iteration has two steps: 1 the model generates candidate edits token generation , and 2 the runtime evaluates each edit on physical GPUs for correctness and speed. As frontier coding models generate tokens faster and faster, GPU evaluation becomes the dominant wall-clock bottleneck. Booting a distributed engine, loading weights from storage, and compiling kernels still take just as long today as they did before coding agents existed. As a concrete example, we ran a 6-hour experiment to optimize vLLM on a particular metric, and replayed it while speeding up model’s token generation. As shown in the figure, even as we scale the token generation to 1500 tps, the total runtime only shrink by 6% because the evaluation dominated the clock. In other words, faster code generation will quickly hit an Amdahl’s Law wall unless we make evaluation itself faster. Reloading the System can Dominate Evaluation Time reloading-the-system-can-dominate-evaluation-time In a standard agentic workflow, each code change is evaluated by running a pre-defined test script from a clean process, which forces the system to reload from scratch on every trial. To see how much overhead this adds, consider optimizing vLLM to serve Nemotron 3.5 Super on an NVIDIA GB200 GPU. Even when an agent modifies just a single line in the request scheduler, testing that change triggers a full cold restart through four heavy startup stages before a single test prompt can run: 1. Kernel autotuning ~73 s : Resolving and warming up GPU kernel launch configurations. 2. Model weight loading ~57 s : Streaming multi-gigabyte checkpoints into GPU memory. 3. CUDA graph capture ~40 s : Recording decode kernel launch graphs across batch sizes. 4. Process, library, and device initialization ~30 s : Importing the Python/C++ software stack torch , triton , vllm and initializing device contexts, communication groups, and KV cache pools. Repeating this initialization sequence before running the ~28 s test suite means evaluating a single one-line scheduler edit takes 228 s , nearly 90% of which is pure system reload overhead. This is not specific to vLLM. Timing one check phase by phase on six systems shows the same pattern: engine start-up is 77% to 91% of the wall time, and none of it depends on the edit being tested Figure 2b . Notice that none of those four startup stages depends on the modified line in the scheduler. In general, most exploratory edits are localized tweaks to a scheduling rule, a kernel loop bound, or a communication call that only invalidate a tiny fraction of the running system. As the upper steps of Figure 2a show, keeping the engine process and GPU state warm in memory while hot-reloading only the modified code eliminates the ~200 s reload tax completely, cutting a full evaluation from 228 s down to 23.6 s 9.6x faster . Once that ~200 s reload wall is out of the way, the remaining 23.6 s is spent on the test suite itself: a full test batch to measure throughput 14.1 s followed by a log-probability check 9.5 s , a separate reference-prompt pass that compares output token log-probability distributions against a golden baseline to verify numerical accuracy without adding logprob copy overhead to the throughput run . Because most exploratory edits fail correctness checks or regress latency right away, we no longer need to run the full test batch on every trial: screening first with a small-batch targeted test on the warm engine the bottom steps of Figure 2 compresses the evaluation loop all the way down to 2.4 s 95x faster , or 4.8 s when including the log-probability check pass. This motivates making GPU engines live-editable rather than restarting them from scratch for every experiment. How to Make vLLM Live-Editable how-to-make-vllm-live-editable So how do we make a complex system like vLLM live-editable? Our guiding principle is simple: reload only the minimal subset of the system that an edit actually invalidates, and keep all untouched GPU state warm in memory. Think about how you work inside a Jupyter Notebook . Once you have imported PyTorch and loaded a multi-gigabyte model into GPU memory in cell 1, you never restart the kernel just to tweak a helper function in cell 5. You simply re-run the cell that defines that one function, and your next forward pass immediately uses the new code while the model weights, CUDA context, and allocated buffers stay right where they are. That notebook workflow makes live editing look effortless. In a production system like vLLM, however, changing a function in place immediately hits four system-level caveats: 1. Compiled and captured execution layers: What if the function is a JIT-compiled GPU kernel such as Triton or C++/CUDA or is already baked into a captured CUDA graph? Updating a host-level function pointer does nothing if the GPU keeps replaying stale compiled binaries or recorded driver graphs. 2. Stateful mutations and native extensions: What if the edit changes class attributes, reshapes pre-allocated KV or activation buffers, or modifies a compiled C++/CUDA extension rather than a pure stateless function? 3. Multi-process and multi-node distributed workers: What if the system runs across multiple processes or distributed worker nodes over a network across tensor-, pipeline-, or expert-parallel ranks, or remote Ray actors ? If rank 0 updates a collective call mid-step while rank 1 runs the old version, the cluster deadlocks. 4. System-breaking faults and state contamination: What if a submitted edit crashes the process, triggers an illegal GPU memory access that corrupts the CUDA context, or silently mutates model weights, KV caches, or random seeds so that every subsequent test runs on contaminated state or never even executes the edited path ? How do we recover from fault states? Existing process checkpointing tools CRIU , cuda-checkpoint and inference memory/snapshot systems such as NVIDIA Dynamo already make great strides on accelerating inference startup and unchanged-code recovery. For LLM inference, RSIBox builds directly on top of them—and adds a standalone application-layer runtime for training, diffusion, and RL—separating persistent GPU state loaded weights, communication groups, KV pools, and unaffected CUDA graphs from mutable execution layers so code edits take effect in milliseconds without restarting the engine. Reloading Only What Changed reloading-only-what-changed To turn the minimal-reload principle into a concrete system rather than a collection of ad-hoc patches, we first asked an empirical question: what do real code changes in a production system like vLLM actually modify? We surveyed the vLLM repository’s pull-request history, scanning roughly 5,000 PRs related to logic and performance changes and selecting 487 representative candidates with deep execution-path and state-boundary audits across 80 performance PRs . Across these real-world changes, we found that only ~5% of deep engineering changes mostly large multi-file refactorings, file movements, and distributed topology changes truly require a full cold restart. The remaining 90% to 95% of practical optimization and bugfix edits fall cleanly into four modification patterns, reaching progressively deeper into the runtime stack Figure 3a . We designed our live-reload mechanisms directly around these four cases: Case 1: Editing a pure host function ~20% of audited PRs; reload in ~0.05 to 0.15 s . Roughly a fifth of performance and logic PRs modify pure host-level orchestration code, such as tweaking a batch-ordering heuristic in vLLM’s request scheduler Scheduler.schedule or a logit-filtering rule in the token sampler. Standard module reloaders importlib.reload fail here because they only rebind the top-level module attribute, while the running LLMEngine , worker loops, bound methods, and closures keep pointing to the old function object in memory. Instead, we locate the live function object via its active referrers gc.get referrers and swap its compiled bytecode code , default arguments, and closure cells in place, so the very next step runs the new logic in about 0.1 s . Case 2: Editing a JIT-compiled GPU kernel ~0.1 to 0.3 s . What if we edit a custom @triton.jit GPU kernel, such as fixing duplicate boundary probability accumulation in vLLM’s split top-p sampling kernel or tuning tile sizes in a fused MoE helper? Here, swapping the Python function object alone has zero effect on the GPU. Triton compiles each kernel into a native GPU binary cubin on first launch and caches it by specialization signature; worse, when an outer Triton kernel calls an inner @triton.jit helper, the compiler inlines that helper directly into the caller’s binary. To make a kernel edit take effect, we trace the cross-module Triton call graph, clear the compiled binary and autotuner caches on both the edited kernel and all of its transitive callers, and recompile only those affected kernels in ~0.1 to 0.3 s . Case 3: Editing code or kernels inside captured CUDA graphs ~0.4 to 1.0 s ; together with Case 2 covering ~51% of audited PRs . Over half of vLLM performance PRs touch GPU kernels or operators that execute inside vLLM’s decode loop, which records sequences of kernel launches into captured CUDA graphs across dozens of padded batch sizes at startup. During decode, replaying a CUDA graph dispatches the recorded GPU kernel pointers directly from C++ inside the CUDA driver without re-entering Python or Triton caches at all, meaning even a freshly recompiled Triton kernel would be completely bypassed. After updating the host function or recompiling the Triton kernel, we trace which captured graphs invoke that operator and selectively recapture only the affected batch-size or piecewise layer CUDA graphs in ~0.4 to 1.0 s , leaving all other graphs untouched. Case 4: Editing stateful objects, native C++/CUDA kernels, or worker startup flags ~18% in-process state/C++ + ~5% warm respawn; reload in 0.2 to 12 s . Not every optimization is a stateless function or Triton kernel tweak. About 8% of audited PRs add a new state attribute or scratch tensor inside a component’s init for example, pre-allocating a reusable position-metadata buffer on the attention runner so it is not rebuilt on every layer ; for these, we re-initialize only that modified sub-module or restore its saved component snapshot in ~0.2 to 1.8 s while keeping GPU model weights and KV caches intact. Another 10% modify a native C++/CUDA .cu kernel such as vectorizing vLLM’s fused RMSNorm or rotary embedding C++ kernel ; we incrementally compile the .cu source into a versioned shared library loaded via ctypes.CDLL ..., RTLD LOCAL and rebind the operator on the PyTorch C++ dispatcher torch.library.Library in ~7 to 12 s , followed by selective CUDA graph recapture. Even when an edit changes a process-level startup flag or global registry that requires a clean worker process, we can still avoid re-reading checkpoints from disk or re-importing the Python stack. We hold model weights in an out-of-process CUDA IPC weight sentinel and fork fresh workers from a pre-CUDA Zygote fork server that has already imported torch , triton , and vllm upfront. The forked worker initializes a clean CUDA context and reattaches multi-gigabyte model weights over zero-copy CUDA IPC in 5 to 12 s with zero disk reads. Finally, in a multi-GPU run such as tensor-parallel decoding across 4x GB200 GPUs , all workers must switch to the new code at the exact same step boundary or not at all, lest rank 0 and rank 1 diverge on a collective call. While the system runs, the runtime classifies the edit and finishes any compilation in the background. During the brief ~1 ms pause between two steps, a two-phase coordinator PREPARE - COMMIT / ABORT applies the update atomically across all GPU ranks. The table below summarizes the full hierarchy of reload boundaries: | Reload Boundary | How the Runtime Applies the Edit | What Edits It Handles | Reload Time | |---|---|---|---| | In-place function swap | Updates the function’s code object and closure cells in place across all live references gc.get referrers and distributed workers | Pure host functions, schedulers, samplers, and method bodies | ~0.05 to 0.15 s | | Compiled GPU kernel rebuild | Extracts updated kernel source, walks the cross-module @triton.jit call graph to clear binary and autotuner caches on all transitive callers, and recompiles | Triton GPU kernels and inlined @triton.jit helper functions | ~0.1 to 0.3 s | | Selective CUDA graph recapture | Applies the code or kernel update and selectively recaptures only the affected batch-size or piecewise layer CUDA graphs | Functions and GPU kernels executed inside captured CUDA graphs | ~0.4 to 1.0 s | | In-process object re-initialization | Re-initializes modified sub-modules or restores saved component snapshots while keeping GPU model weights and KV caches intact | Edits to init , adding new state attributes, or resizing local scratch buffers | ~0.2 to 1.8 s | | Native C++/CUDA extension hot-reload | Incrementally compiles edited .cu /C++ sources into a versioned shared library loaded via ctypes.CDLL ..., RTLD LOCAL , rebinds the PyTorch dispatcher Cv