A New OS for Local AI Boils Down to a Chatbot : No Windows, No Linux

A New OS for Local AI Boils Down to a Chatbot : No Windows, No Linux
3 min read

A developer has written a minimalist operating system in assembly that boots a PC directly into a chatbot, without Windows or Linux. Named asm-llm-os, this project is the second part of the llm.asm repository, published under the MIT open-source license by an anonymous developer known by the pseudonym alesha-pro on GitHub.

The program powering this chatbot weighs less than a single compressed JPEG photo. When the virtual machine boots, a prompt ‘asm-llm>’ awaits the user’s first question, without any conventional software libraries. According to the author’s measurements, the prompt appears in 74 to 94 milliseconds.

The chatbot is based on Qwen3-0.6B, the smallest model in Alibaba’s Qwen3 family. With its 600 million parameters, it belongs to the category of small language models, far from the large cloud-hosted models and the best open models.

The entire system is hand-coded in x86-64 assembly, a language very close to the processor, without using a compiler. The kernel, the core of the system that communicates directly with the hardware, weighs only 24,252 bytes. According to the author, the engine produces 134.9 tokens per second, a token roughly corresponding to a word fragment, on 16 virtual cores of an AMD Epyc 7642 server processor.

24 KB of Code, but 640 MB of Model

However, these 24 KB represent only the engine. The artificial intelligence model itself weighs about 640 MB, bringing the complete disk image to nearly 700 MB. The provided examples allocate 2 GB of RAM for execution, with nearly 470 MB dedicated to the KV cache, the area that allows the chatbot to keep track of the conversation without recalculating everything for each word.

The measurements were performed in virtual machines, under QEMU/KVM and Proxmox. The repository presents the image as bootable on a real PC, but no tests on physical hardware have been conducted. The Linux version of the same engine claims a speed 18 to 36% higher than llama.cpp, the reference tool for local AI, but only during the response generation phase, as the engine reads the question token by token.

The concept is not entirely new. The sectorllm project already fit a Llama 2 engine into 1,356 bytes, and NightRun boots AIs without an operating system on Raspberry Pi 5. Here, however, the package combines a recent model, a continuous conversation, and the utilization of all processor cores.

How It Fits in So Little Space

To achieve such a small size, the developer removed everything that wasn’t essential, starting with the hard drive driver. At boot, the GRUB loader places the model directly into RAM, and the kernel reads it in place without copying. The display uses VGA text mode, and the keyboard communicates via the PS/2 port. The model weights are quantized in Q8_0, meaning stored in 8 bits instead of 16, which halves their size, for a quality loss deemed almost imperceptible by the author.

The engine utilizes AVX2 and FMA instructions, which allow the processor to handle multiple numbers in a single operation. Without them, the system refuses to boot, excluding Intel chips older than 2013. The AI chip integrated into recent PCs, the NPU, is not used: everything relies on the main processor, as leveraging the NPU in laptops would require writing a specific driver for each manufacturer.

To try it, you paradoxically need a Linux PC, required for compilation. A machine equipped with QEMU and an AVX2-compatible processor is sufficient. The steps involve downloading Qwen3-0.6B from Hugging Face and converting it with the provided Python script, assembling the kernel with nasm via the ‘make os’ command, then launching everything in QEMU with ‘make os-run’ or generating an ISO image. The chatbot can retain a context of 2,048 tokens, meaning a very short discussion.

S’abonner
Notification pour
guest

0 Commentaires
Le plus ancien
Le plus récent Le plus populaire
0
Nous aimerions avoir votre avis, veuillez laisser un commentaire.x