ModelOS Is an Operating System for AI Models, With a Rust Runtime That Controls the GPU Directly
On December 1, a developer going by yunwei37 introduced ModelOS, an operating system in development for large language model (LLM) inference and training.
In a conventional inference stack, inference software runs on a general-purpose OS such as Linux. The OS manages processes and memory, while the inference software manages model computation.
ModelOS has a Rust runtime. It has no processes, user space, or filesystem. The work needed to run AI models is built into a single kernel.
According to the design documentation, ModelOS uses Linux-derived early boot code and controls the GPU directly from Ring 0, the CPU's privileged execution level. It uses existing GPU routines from software such as cuBLAS and SGLang without modifying them.
Reusing those routines reflects the project's focus on what happens around GPU computation, including how work is submitted and how the data it needs is managed.
When an HTTP request arrives, a CPU core splits the input into tokens, the units the model processes. It assembles requests into a batch and starts computation on the GPU. It can delegate part of the work to other CPU cores as needed.
Where a general-purpose OS manages processes, ModelOS manages models and inference requests. Its resource allocation can account for which requests have completed and where the next data they need is located.
The OS allocates GPU memory
ModelOS manages model weights, GPU kernels, and the KV cache, which stores and reuses part of the computation for earlier tokens. To move weights from storage through system memory to GPU memory, it uses direct memory access (DMA), which lets devices transfer data by accessing memory directly.
The developer says memory used for CUDA contexts, memory management, and file caches in a conventional Linux inference setup can instead be made available to models.
In the developer's GeForce RTX 5090 tests, ModelOS had 31.44 GiB of GPU memory available to models after startup. A comparison setup with vLLM's GPU memory utilization set to 0.85 made up to 28.85 GiB available for weights and the KV cache.
The OS also decides how to allocate memory when multiple models run. It reserves a fixed amount of GPU and system memory for each model, distributes the rest according to demand, and moves idle models to system memory.
In one test, six models each received 0.5 requests per second. ModelOS completed 1,346 of 1,800 requests, compared with 1,169 when GPU memory was split evenly among models. The tests used different code versions, and both were recorded as failures overall.
Letting the OS allocate memory across models allows a busy model to use capacity idle models do not need. The design accounts for how each model's memory needs change as well as how many models can fit.
Inference measurements on an RTX 5090
The results available when the developer introduced ModelOS on December 1 came from tests with one GeForce RTX 5090 with 32 GB of GPU memory. The developer booted ModelOS in a KVM virtual machine and passed the GPU directly through to it using VFIO.
In an earlier test with 64 input tokens and one output token on Qwen3-0.6B, ModelOS posted a median latency of 2.28 ms. The SGLang comparison recorded 5.48 ms.
In earlier Qwen3.8-27B tests with 128 input tokens, the developer gave representative time-to-first-token figures of 56 ms for ModelOS, 80 ms for vLLM, and 87 ms for SGLang.
Startup time also differed. In a Qwen3-0.6B cold-start test, time from the start of virtual machine execution to receipt of the first token was measured five times per setup. The medians were 4.95 seconds for ModelOS, 54.6 seconds for a fresh SGLang launch, and 24.5 seconds for an SGLang setup restored through CRIU, which checkpoints and restores process state.
Measured from the launch of the QEMU process itself, the medians were 8.81, 58.67, and 28.54 seconds, respectively.
A long-input test with Qwen3.8-27B in NVFP4 format used 48,064 input tokens. It took 8.48 seconds to generate the first token and 14.9 ms per token afterward. The SGLang comparison accepted up to 15,760 tokens in that setup. The long-input trials were recorded as failures overall for both architectures. ModelOS also timed out without producing output at 156,224 input tokens.
A review of development status lists results slower than the representative earlier measurements. In a Qwen3-0.6B test with 64 input tokens and one output token, median latency was 3.825 ms. The first run with 64 input tokens took 3.419 seconds. The document says the 2.28 ms result came from an older implementation.
In a separate Qwen3.8-27B test with 128 input and 128 output tokens, ModelOS took 78.771 ms to the first token and 14.504 ms per subsequent token. The vLLM setup with multi-token prediction (MTP) recorded 101.200 ms and 7.441 ms, respectively. A faster first response does not always mean a faster answer overall.
The Qwen3.8-Flash-Next implementation still splits work across repeated GPU launches. Tests involving many models or long requests also have unresolved issues.
Reducing the work before handing computation to the GPU depends on more than specializing the OS. It also requires organizing each model's computation and memory transfers. How far the runtime can combine GPU work remains a development challenge.
Challenges of a performance-first design
ModelOS can already handle inference requests. For training, it includes facilities for managing adapters and gradients, and the forward and backward passes are still under development.
The design documentation prioritizes throughput and places isolation outside the project's scope. An environment that needs to prevent workloads from different models or users from interfering with one another would also need an isolation design.
ModelOS has a UEFI boot path for physical computers. According to the setup guide, it requires prepared GPU data, firmware, and model weights. It cannot yet build out the GPU environment on an unprepared PC.
Original code is generally available under the MIT license. Some Linux-derived code is under the GPL. GPU firmware, third-party GPU routines, and model weights are covered by their respective licenses.
ModelOS takes a different approach from building an AI runtime on a general-purpose OS. It chooses which operating system functions to include based on what AI workloads need.
How much should the OS know about the models it runs? ModelOS shows how much room there still is to rethink an operating system around what the computer will actually do.
KioskNews shows a cleaned-up reading view extracted from the publisher’s page — the original always lives on their site, not ours.
