Divide a GPU equally among six models and an idle model can hold memory that a busy one needs for its growing KV cache. ModelOS gives the operating system direct control over those objects. The prototype from yunwei37 can move model state and decide which requests get the next round of GPU work. Its measurements on one 32 GB RTX 5090 address two different questions. How long does a new request wait, and how much work does the card finish?
From a network packet to a GPU launch
One CPU core polls the network card, handles TCP, parses HTTP, tokenizes the input and groups ready requests into a round of GPU work. ModelOS calls that round a Step. Tables describe which rows belong to each request and where its cache lives. The same core submits device operations, polls for completion and streams decoded tokens to the client over SSE. Other CPU cores can run computations. The part concentrated on one core is the control path from receiving a request to submitting its work.
ModelOS keeps existing GPU kernels from production binaries including cuBLAS, Strata and SGLang. The OS submits those programs directly. A completion fence gives the scheduler a point at which it can change the request mix or object placement for the next round. Updating a row map expresses a change in batch membership while allowing the operator implementation and the scheduling policy to evolve separately.
Where the cold-start clock begins
A model Image records weights, tokenizer, device programs and a precomputed layout. Activation transfers objects into place by DMA and binds the programs to form a running Instance. An idle instance can park in host RAM and keep state for its next activation. Loading a cold model and moving a parked model back to the GPU therefore incur different costs.
The experiment passed the GPU through to a KVM guest using VFIO. For Qwen3-0.6B, the median over five runs from guest execution to the first visible token was 4.95 seconds. Over the same interval, starting a fresh SGLang process took 54.6 seconds and restoring from a CRIU checkpoint took 24.5 seconds. QEMU initialization precedes that clock. A separate activation test took 1.19 seconds for a parked ModelOS model and 1.55–1.69 seconds with vLLM sleep mode. A capacity plan for on-demand models needs to account for which state is still in host RAM when a request arrives.
Batch throughput and the first visible token
The authors sent 128 concurrent requests to Qwen3-0.6B, each with 128 input and 128 output tokens. The table shows five-round medians for the time to finish the whole batch and the client-side first-token metric. The llama.cpp baseline used BF16 GGUF, CUDA and flash attention.
| Runtime | Batch completion | Client first-token metric |
|---|---|---|
| ModelOS | 2.39 s | 1.15 s |
| llama.cpp | 5.79 s | 0.57 s |
A consumer that waits for every result gets about 2.4 times the throughput with ModelOS on this workload. A user watching a streamed response sees content sooner with llama.cpp. The individual rounds also matter. ModelOS took 5.99 seconds for its first batch and 2.31–2.41 seconds for each of the next four. The median describes a typical round in this run, while the first round captures a delay relevant to the initial burst.
Which requests finish when six models share memory?
Weights, KV blocks, experts and GPU programs have explicit locations and lifetimes. Each model gets a minimum allocation, and the system lends out the remaining capacity according to demand. Idle instances can move to host RAM. Waiting requests’ deadlines determine when to wake them. A busy model can thus use temporarily spare memory for a growing context even when its weights stay fixed.
With six model instances receiving an average of 0.5 requests per second each, the authors offered 1,800 requests over 600 seconds. Dynamic allocation completed 1,346, compared with 1,169 under fixed equal shares, a gain of 177 completions. The dynamic run still recorded 454 failed or short outputs. The completed streams lacked a token-level correctness reference. The counts establish how often enough output arrived under this load. Correctness and compliance with a latency objective require separate measurements.
One guest owned the GPU throughout, and the design places tenant isolation outside its scope. ModelOS represents trainable adapters, Adam state and gradients as objects. Forward and backward training Steps are still under development. The measured path on this card is inference.