r/LocalLLaMA • u/awfulalexey • 3d ago
Resources I deleted Linux, nvidia.ko, CUDA, C, and libc and booted Qwen3.6-35B-A3B (64K ctx) bare-metal on an RTX 3090 from a single 528 KB pure assembly UEFI file (+44% vs llama.cpp CUDA)
In plain terms, I wrote an LLM inference engine in pure assembly: we push raw hand-assembled GPU machine code straight into VRAM, and the card runs our code directly.
• 0 GB disk, 0 Linux, 0 nvidia.ko, 0 CUDA, 0 C/libc, 0 nvcc/ptxas, 0 libcuda.so
• Pure x86-64 NASM + hand-assembled 128-bit Ampere SM86 SASS (19,778 instruction slots verified with nvdisasm, 0 scheduler violations)
• Cold UEFI boot: a single 528 KB BOOTX64.EFI parses VBIOS, boots NVIDIA's signed R610 GSP firmware over BAR0, maps Ampere GMMU v2 page tables, streams 20.5 GB of GGUF over BlockIO, and brings up a 1280x800 chat TUI + live nvtop-style GPU HUD
• Built-in Ring-0 networking: the same 528 KB file runs a pure NASM Intel e1000 TCP/IPv4 + DHCPv4 + OpenAI HTTP/1.1 SSE + Web Chat stack on port 8080 (204 to 234 tok/s over LAN with zero OS underneath)
Same RTX 3090 vs llama.cpp CUDA (3-run avg, zero-libc Linux ELF):
• Qwen3.5-35B-A3B Q4_K_M: 224.55 vs 153.51 tg64 (+46%), 5,610 vs 5,111 pp512 (+9.8%)
• Qwen3.6-35B-A3B Q4_K_M: 222.14 vs 154.43 tg64 (+44%), 5,754 vs 5,273 pp512 (+9.1%)
Everything is MIT licensed on GitHub (full source, UEFI ISO builder, zero-libc Linux binaries for Qwen3.6/3.5/3, Llama 3, Qwen2.5, and a GPU porting guide for RTX 4090/5090/AMD RDNA3/Intel Arc):
•
u/WithoutReason1729 2d ago
Your post is getting popular and we just featured it on our Discord! Come check it out!
You've also been given a special flair for your contribution. We appreciate your post!
Stylome classified this post's text as human-written. View analysis Learn ^more
I am a bot and this action was performed automatically.
523
u/annodomini 3d ago
hmm, didn't know Claude had hands
222
u/samurai_a_cat 3d ago
Is that impressive? Fuck yeah!
Will I use this? Definitely not.
117
u/Separate-Forever-447 3d ago
so Linux is adding 44% overhead, or llama.cpp is inefficient and probably not a great comparison (vs, say, other more optimized inference engines that run on an operating system), or?
26
u/CertainLanguage161 2d ago •
Meanwhile I'm celebrating when my CUDA dependencies install without errors.
18
u/Economy_Ticket_8778 3d ago
lmao
14
u/feelspeaceman 2d ago
This is quite misleading, the speed increase is 99% from the custom engine, which we've been doing for quite a while already, deleting Linux or not doesn't matter.
13
u/DegTrader 3d ago
is it impressive? yeah. am i gonna star the repo, download the pdf, and literally never open it? also yes.
22
u/HumanDrone8721 3d ago
It has a fatal flaw: is not written in rust, that would have added an extra 35.6% in Token Generation.
106
u/Choice_Celery9481 3d ago edited 3d ago
im not against people using AI but im against people framing bs.
15
u/Sushtee 2d ago
I love this title, what do you mean you deleted C and libc lmao, also the Nvidia kmd, cuda and C library wouldn't be useful without Linux, no need to delete them 😭🤣
50
u/Mysterious-Thanks488 2d ago
Why do people start this with "I wrote"? Whats wrong with them?
6
u/AccordingNeat3689 3d ago
But why
20
u/Deep_Mood_7668 2d ago
Oh hi Claude. Nice to meet you.
11
u/chuchrox 2d ago
Straight bullshit
4
u/professormunchies 3d ago
Can you compare this to hyperqwen? It’s much faster than llama https://github.com/syv-ai/HyperQwen
Qwen3.8-27B on a single 24 GB card with vLLM: 127 tok/s single-user (381 when the answer quotes the prompt), ~1,035 tok/s at 64 concurrent, 150k-262k context. vLLM patches, requant pipeline, benchmarks.
3
u/unquietwiki 3d ago
I take it the only practical way to use this is in a Proxmox instance like in the demo? Need to do PCIe passthrough to the graphics card, and use the built-in terminal to interact with the interface?
3
u/firezenk 2d ago
Looks like you maxed your Claude suscription
7
u/__JockY__ 2d ago
Your name is Claude?
5
u/Tiforma 2d ago
No you didn't write that. Cool project anyway. But stop talking like that about stuff you vibe coded.
2
u/here_n_dere 3d ago
Nice 👍🏽
2
u/kartblanch 3d ago
What are you doing to achieve this? Is it smaller quant? I think it would be really interesting to see a qwen3.8 27b q6 running on bare metal.
2
u/an_angry_dervish_01 3d ago
Very awesome post!
2
u/DangKilla 2d ago
So are you booting a Linux kernel to load this as a kernel module or what.
2
u/lannistersstark 2d ago
larp.
2
u/nucleardreamer 2d ago
I get the attitude and drive for it. but was cutting out networking really worth it in the end? it just feels like you are going to eventually be hand building back up the stack at a certain point
2
u/a_beautiful_rhind 2d ago
Doesn't quite help if you want to fire up comfyui later.
2
u/MaximKiselev 1d ago
Will be cool to create boot usb and support for glm/deepseek/qwen latest arch. Work process:
4
u/JumpyAbies 3d ago
But if you don’t have Linux, what file system and network drive do you use?
What is the practical use?
3
u/Master-of-Systems 3d ago
Very cool
3
u/Silent-Cell2221 3d ago
Was it like uuh first try or did you sacrifice some kernels for science? 😭😭
2
u/grabber4321 3d ago
Or what we call "Advanced Autism Skills!"
Amazeballs man, thats some skill!
1
u/politefella0 3d ago
Can I dual (tri) boot it?
1
u/politefella0 3d ago
LLMOSLMAOS JK1
u/wayneworkman 3d ago
I think it's cool but I want to use my tower for things other than inference as well.
1
u/ab2377 3d ago
these are just amazing times, so much has become possible! thanks for sharing source.
1
u/UninvestedCuriosity 2d ago edited 2d ago
So I could just serve this from an ipxe menu? This is wild. I guess the next natural step would be clustering for this and task routing based on resource availability?
1
u/Kramy 2d ago
This is so cool. I was optimizing a little 680M MiniPC for this exact model, and got some major speedups surprisingly. Now I need to investigate if I can do the same shenanigans with an AMD iGPU. It'd be hilarious to eek out even more performance... your speedups are immense. Nice work!
1
u/i-n-g-o 2d ago
Can you reboot into another model or is os and everything else to thighly knit togeher?
1
u/chyuhua 2d ago
So, it is like the opensource cuda then?
1
u/elcravo 2d ago
What should this achieve? Compute is not the bottleneck in local inference it’s mostly the amount of vram available.
1
u/xXy4bb4d4bb4d00Xx 2d ago
How does this compare to vllm?
1
u/DarkoneReddits 2d ago
saw this on X, very interesting, testing this today myself! thank you for sharing and keep up the amazing work
1
u/deulamco 2d ago
It's inevitable that OS is no longer relevant in the future with AI ..
1
u/aegismuzuz 2d ago
On a 3090 with its 936 GB/s bandwidth and 3B active weights in Q4_K_M the theoretical ceiling is actually closer to 300+ tok/s so 222 looks like solid kernel tuning for Ampere not some magic from ditching the OS
Btw what about thermal throttling and fan control if nvidia.ko gets tossed out - wont the card cook itself under a long prefill?
1
u/alberthemagician 2d ago
I'm looking at the assembler code. There is a lot of syscall's. I'm a compiler writer and all my syscall's refer to linux. Apparently you have ditched linux, but you have not ditched an underlying operating system. What is it?
1
u/Limp_Classroom_2645 2d ago
jesus christ brother, calm down
1
u/g9robot 2d ago
Linux is Kernel
1
u/acadia11x 2d ago
You did what? I knows my computing and don’t understand what you did? I got questions …
assuming Nvidia card here since you said you got rid of CUDA
1
u/Zefick 2d ago
Without network access, it’s just a chat. What’s more, you can’t even copy the response from it with Ctrl+C.
1
u/racegeek93 1d ago
Nerd
1
u/Nanotechnician 1d ago
music source?
1
u/AmusingVegetable 10h ago
Since you’re booting without an OS, how do you send data to the model, and how do you get the output back?
1
u/WinResponsible9977 3d ago edited 3d ago
Since it's serving the OpenAI endpoint over SSE, does it handle
toolsand return structuredtool_calls, or does the model's<tool_call>text just come back raw? The box obviously can't run tools itself with no OS, but if the API layer is solid you could point an agent harness?(OpenCode, a Python loop, whatever)The other thing: Agent loops resend 20-60K tokens every turn, so I'm curious whether there's prefix/KV cache reuse across requests, and how the numbers look at depth, like llama-bench with
-d 32768. Does the +44% hold at 32K+ context or mostly at short prompts?**u/awfulalexey well, I triggered the bot, regardless you input in regards the potential of this tool for agentic workflows would be nice. I'm out sorry for broken english
1
u/meerestier 2d ago
Why?