The editorial argues that the layered mental model of 'frameworks → runtimes → kernels → instructions' has convinced developers that running a model is inherently a complicated systems problem. By stripping away the OS, libc, Python, and CUDA, llm.asm demonstrates that inference is fundamentally just arithmetic against a flat memory model — and that most of the stack above it is abstraction, not necessity.
While acknowledging precedents like GPT-2 microcontroller ports and llama2.c's single-file C implementation, the editorial positions llm.asm as going further by removing the C runtime, OS, and compiler safety rails entirely. What remains is the inference loop as raw instructions against RAM — a demonstration layer that previous minimalist projects stopped short of.
By submitting the `02-baremetal-os` module specifically (rather than the repo root or an earlier module), miohtama signals that the no-OS variant is the noteworthy milestone. The 118-point score suggests the HN audience agrees this crosses a threshold earlier bare-metal ML experiments did not.
The editorial highlights the aesthetic and historical weight of modern transformer output flowing through the same text-mode framebuffer as 1980s DOS programs. This framing treats llm.asm less as a practical engineering artifact and more as a demonstration that collapses forty years of abstraction into a single running program.
A GitHub repo called `llm.asm` from user `alesha-pro` is making the rounds on Hacker News with 118 points and climbing. The headline module is `02-baremetal-os`: a Qwen-family language model running inference on x86 with no operating system underneath it. No Linux. No Windows. No libc. No Python. No CUDA. The bootloader hands control to an assembly program, and that program does tokenization, the transformer forward pass, sampling, and output — straight to VGA text mode.
It is, in the most literal sense, an LLM talking to you through the same text buffer that DOS used in 1985. The repository is structured as a progression — earlier modules run inference under a normal OS in assembly, and this module removes the OS entirely. The weights live in memory the program manages itself. There is no `malloc`. There is no `read()`. There is a processor, a page of RAM, and a sequence of instructions that eventually produce a token.
This is not the first bare-metal LLM experiment — there have been toy GPT-2 ports to microcontrollers, and projects like `llama2.c` compressed the entire stack into a single C file. But `llm.asm` goes further: it removes the C runtime, the OS, and the compiler's safety rails. What's left is the thing most developers have never actually seen: the inference loop as pure arithmetic against a flat memory model.
Most of the discussion around LLMs happens three or four layers up from the metal. You talk about frameworks (PyTorch, JAX), then runtimes (vLLM, TensorRT-LLM, llama.cpp), then kernels (FlashAttention, cuBLAS), and then — if you ever get there — the actual instructions the GPU executes. Each layer adds abstraction, and each abstraction is defensible on its own. But stacked together, they produce the modern practitioner's mental model: that "running a model" is a complicated systems problem requiring a complicated systems stack.
`llm.asm` is a demonstration that this mental model is wrong at the floor — inference is a loop over matmuls, and a matmul is nested loops over multiplies and adds. There is no inherent complexity in the math. The complexity is in making the math fast on specific hardware, in moving weights between memory tiers, and in orchestrating thousands of concurrent requests. Strip those away and you are left with something a hobbyist can write in a weekend, assuming they're comfortable with assembly.
This matters for three reasons, none of which are "we should all switch to assembly." First, it is an education artifact of unusual clarity. The repo is readable — you can trace exactly which bytes represent the embedding table, exactly how the attention computation is laid out in memory, exactly where the softmax happens. There is no `import torch` hiding the shape of the problem. For engineers who want to actually understand what their inference server is doing, this is a better teaching tool than most textbooks.
Second, it's a useful lower bound on what inference costs. A lot of infrastructure discourse assumes the overhead of the serving stack is irreducible. `llm.asm` shows that for a small Qwen variant, you can go from boot to a sampled token with nothing between your code and the FPU. Any production stack that charges you for "framework overhead" is, in principle, paying for convenience — not necessity. Whether that convenience is worth it is a separate question, but it's clarifying to know the floor.
Third, the project lands into an industry conversation that keeps re-litigating the same point: the gap between "the model" and "the system around the model" has gotten uncomfortably large. Every time someone ships a cleaner inference runtime — `llama.cpp`, `mistral.rs`, Modular's MAX — the response is a mix of "this is a toy" and "wait, why did my stack need Kubernetes again?" `llm.asm` is the reductio ad absurdum of that argument: if a transformer can run with zero system software, the system software is a choice, not a given.
A common HN reaction is to ask about performance, and this is where the framing matters. Bare-metal assembly does not beat a tuned GPU kernel — that's not the claim and it never was. The point is methodological: by removing every layer, you can see what each layer is actually buying you. If PyTorch is 10× slower than this for a small model, that cost is paying for autograd, dynamic graphs, and dtype coverage. If vLLM is 100× faster, that speed is paying for KV-cache management and batching. Each number tells you something useful about where your money goes.
If you are shipping LLM features, the practical takeaway is not to rewrite your runtime. It's to know where your overhead actually lives. Profile your inference path. How much time is spent in Python glue? How much in tensor dispatch? How much in actual matrix multiplication? Most teams discover that "the model is slow" really means "the surrounding orchestration is slow," and that's a far cheaper problem to fix than the one they thought they had.
If you are building edge or embedded inference — IoT-scale deployments, on-device assistants, air-gapped systems — the repo is a useful reference. You don't need a general-purpose OS to run a 0.5B-parameter model, and once you internalize that, the hardware envelope collapses dramatically. Projects like this are proof-of-concept for a world where small models run on trivial hardware with trivial support software. That's a real deployment target for a lot of domains — industrial sensors, offline tooling, safety-critical environments where every unaudited line of kernel code is a liability.
And if you are doing security or verification work on AI systems, the educational value is direct. Formal reasoning about model behavior gets dramatically easier when the model is running on code you can read in an afternoon, rather than code distributed across a half-million-line framework. Bare-metal inference is an attack surface of exactly the arithmetic operations and nothing else. For researchers thinking about model integrity, side channels, or adversarial inputs, that's a useful starting point.
Expect more of this. The combination of smaller capable models (Qwen 0.5B, SmolLM, Phi-mini) and continued curiosity about removing dependencies is going to produce a steady stream of minimal-stack demos. Some will be toys. A few will become real artifacts — the way `llama.cpp` started as a weekend experiment and became the serving backend for a meaningful chunk of consumer LLM traffic. The useful question to carry forward is not "should I use bare metal?" but "what layer in my inference stack is genuinely earning its keep, and what layer is there because nobody has bothered to ask?" `llm.asm` is a 118-point reminder that the answer to that question is almost never "all of them."
Please release a "OS.ASM" without AI :-) "A standalone bootable x86-64 operating system that runs directly on hardware or KVM with no Linux, no Windows, no C, no Rust, and no libc." Maybe have some basic tools like ssh/curl built in. This will be much more useful to everyone
For smaller models on scarce compute, this could be useful for optimizing speed. But for frontier models, the additional layer -- that is, Linux or other management tools to host it -- is incredibly minimal in terms of resource allocation relative to the resources used by the frontier model.Apart fr
> 134.9 tok/s decode on QEMU KVM (AMD EPYC 7642, 16 vCPUs; 23.7 tok/s at 1 vCPU, 118.1 tok/s at 8 vCPUs, 136.6 tok/s peak) and 55.4 tok/s live on a 0 GB disk Proxmox VE VM (Intel Xeon E5-2670 v3, 12 cores).Do I miss anything or the performance isn't that great for a
What I want is an AI that I plug into an USB port and talk to over tty.
Top 10 dev stories every morning at 8am UTC. AI-curated. Retro terminal HTML email.
It looks like this is one subproject in a larger exercise and the top-level README presents the benchmarks that peg this against a pure-assembly Linux ELF (also in this repo) and llama.cpp:https://github.com/alesha-pro/llm.asm/blob/main/README.md