GLaDOS: an operating system in Rust with a language model in the kernel

About
GLaDOS is an operating system for x86-64, written from scratch in Rust, which boots on bare metal and runs entirely in ring 0. Its distinguishing feature is that a transformer lives in kernel space. The model is compiled into the same binary as the page tables and the disk driver, and shares an address space with both.
That arrangement deletes most of the machinery an AI agent usually needs. Between the model and the machine there is no userspace to marshal arguments into, no wire format, no dispatcher and no process boundary to cross. When the model decides to run ls, the kernel calls ls, and the call costs what any other function call costs.
What is underneath the paint is ordinary systems work. The TCP/IP stack, the TLS 1.3 client, the NVMe, xHCI and HD Audio drivers, the ACPI interpreter, the compositor, the system language and the inference code were all written for this project, which comes to 313 files of Rust and about 241,000 lines. Programs written elsewhere run beside it at ring 3 on a Linux syscall surface: busybox, SDL2 programs, 32-bit games, and Mesa, which does Vulkan and OpenGL on a real graphics card through a render node this kernel serves. Beside the model runs the adult fruit fly's nervous system, 138,639 neurons simulated spike for spike, whose mood colours the desktop and wears on the voice. The name comes from Portal, and so does the look.
All downloadsLatest file releases
| Model | Context | Size | |
|---|---|---|---|
| Netinstall | n/a | 297 MB | Download |
| Qwen3-0.6B | 8192 | 1.5 GB | Download |
| Qwen3.5-2B hybrid | 8192 | 1.8 GB | Download |
| Qwen3.5-2B hybrid | 32768 | 1.8 GB | Download |
Verify what you download against SHA256SUMS. A truncated image still flashes, still boots, and then fails somewhere that has nothing to do with the truncation.
All newsLatest news
GLaDOS is an operating system with a language model living inside its kernel. Rust, from nothing, on real hardware. No Linux underneath it and no wall between the model and the machine.
Release notes · 4 images
GLaDOS is an operating system with a language model living inside its kernel. Rust, from nothing, on real hardware. No Linux underneath it and no wall between the model and the machine.
Release notes · 2 images
GLaDOS is an operating system with a language model living inside its kernel. Rust, from nothing, on real hardware. No Linux underneath it and no wall between the model and the machine.
Release notes · 3 images
Public areas
| Download | Bootable UEFI images, kernel only through to the 2B model at a 32k context. |
| News | Release history, newest first. |
| Wiki | Twenty-five articles: every subsystem, how it works, and what it cost to find out. |
| Screenshots | The desktop, its moods, the brain, and a GPU driven from ring 3. |
| Archive | Mirror-style file index of images, sources and checksums. |
| Token | The utility token, what it gates, and what it deliberately does not. |
| Source code | All rights reserved, published to be read. |
The numbers worth quoting
Several of these came from measurements that contradicted a confident argument, which is why they are the ones published.
| Tool routing | A ridge regression over one hidden state chooses tools better than decoding the name under a grammar, at about 1.6 ms and no forward pass. |
| Council agreement | Three cores vote, and their agreement is the signal: 90.3% correct when all three agree, 50% when they split. |
| Interpreter step | About 14 ns. A routing vote spends 20 of them against a budget of 20,000, so the tree walk was never the cost it was assumed to be. |
| A full repaint | 2,376 us down to 1,629 us, once blank console cells stopped being painted a pixel at a time over a background that had just been filled. |
| Emulation | A hypervisor accelerator runs this about 160 times faster than pure emulation, which retired a long-standing belief that several things needed real hardware. |
| GPU | A 32-bit 3D game drew about 1 frame a second on the CPU and 27 to 38 on the GPU through Zink, measured standing still. |