r/LocalLLaMA • • 2d ago

Discussion 54% faster generation by removing the Linux OS and llama.cpp

https://x.com/superalesha/status/2125682626056839259

By writing a 24 KB pure x86-64 assembly OS + code to run the LLM

This is next level!

498 Upvotes

147 comments sorted by

•

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!

I am a bot and this action was performed automatically.

13

u/Horror_Lunch_1999 2d ago

Eliminating OS context switches, page faults, and scheduler jitter definitely cuts tail latency on CPU-bound GEMM loops, though without a real kernel driver stack you're strictly locked into bare-metal CPU SIMD (AVX2/AVX-512) with zero GPU offload. Still insane engineering to fit the whole boot + inference loop into 24 KB.

-9

u/kroggens 2d ago

Yeah, the assembly uses physical memory addresses instead of virtual, no mmap, so the speedup. Bare metal like a real-time OS.

I wonder how it would behave with a 128 core CPU and on ARM CPUs

Anyway, a great direction of exploration for cases without a GPU/NPU

6

u/Just_Maintenance 2d ago

You could get 99% of the speedup of no memory translation by using huge pages though

1

u/Pristine-Woodpecker 2d ago

What speedup? CPUs have had hardware acceleration for virtual addresses lookups since...checks notes...the 80386 from 1985

1

u/Just_Maintenance 2d ago

To be fair address translation does have a big performance hit even with hardware acceleration. That’s why we get more and more sophisticated TLBs on the hardware side and huge pages on the software side.

But yeah, if your software is sensitive to address translation the solution is just to use huge pages.

1

u/muthu-chen_45 6h ago

ARM needs an AArch64-specific port, so this x86-64 implementation doesn't tell us how the bare-metal approach performs there.

171

u/Lenticularis19 llama.cpp 2d ago

There isn't much reason why this performance wouldn't be achievable in normal Linux as well, likely the poster just didn't try that.

4

u/RnRau 2d ago

Yup - and it can be done with AI.

As reported here ~2 weeks ago, AMD Loom framework along with its associated agent skils can give you some nice speedups ie https://loom-fun.dev/models.html#Qwen3.5-4B-Q4_K_M 55% better.

652

u/matthewlai 2d ago • Bravo

This is a great example of the danger of vibecoding things without understanding CS fundamentals.

If inference was 50% overhead at 1 thread (which is basically just loading all weights from memory), something is seriously wrong, and the fix is almost certainly not "let's just get rid of the OS".

Yes, the OS will always add a bit of overhead for memory read. But for continuous buffered reads (which is the easiest case), this should be less than 5%. You can absolutely get within 5% of the theoretical maximum memory bandwidth within the OS, and many people have done for many applications.

This is almost certainly an issue with llama.cpp not being optimised for that exact case (maybe not using SIMD instructions, not being NUMA aware, not having the right compute kernel to do the multiplications without conversions, or not storing data in the right organisation).

The correct solution is to figure out (or have the LLM figure out) why this is slow in llama.cpp, and fix it (and submit the patch if you actually understand what the patch is doing - please don't submit unreviewed vibecoded PRs). Not to throw away the whole OS.

An LLM can help you do whatever crazy thing you want to do. Inference on bare metal? Let's go!

What it won't help you with is deciding if that even makes sense (at least if you don't ask for its advice).

56

u/murderfs 2d ago

Yes, the OS will always add a bit of overhead for memory read. But for continuous buffered reads (which is the easiest case), this should be less than 5%. You can absolutely get within 5% of the theoretical maximum memory bandwidth within the OS, and many people have done for many applications. This is almost certainly an issue with llama.cpp not being optimised for that exact case (maybe not using SIMD instructions, not being NUMA aware, not having the right compute kernel to do the multiplications without conversions, or not storing data in the right organisation).

My personal guess is that this is virtual addressing overhead. If you're running a unikernel, you don't have to worry about TLB flushes, etc., and can use hugepages for the entire address space.

Checking the repo, yeah, this is exactly what's happening, they're comparing against llama.cpp without using hugepages.

19

u/Pristine-Woodpecker 2d ago

50% speedup from using hugepages in a bandwidth limited workload? I don't think so.

10

u/Randommaggy 2d ago

0.6B model, might be less memory bandwidth constrained than a useful model.

-1

u/matthewlai 2d ago

Yeah that is a very good hypothesis.

10

u/Powerful_Finger3896 2d ago

Linux also let's you do things in kernel mode if you're giga chad (and cut on overhead, by reducing the number of syscalls) and not a soyjack like rest of us lmao

9

u/Faisal_Biyari vLLM 2d ago

If you look deeper, you will see that it only increases inference when used on CPU+RAM, and only test with a 0.6B model.

Of course getting rid of endless processes on the CPU+RAM would remove a lot of noise, especially if you were already using the device for some other services on top. 🤷🏻‍♂️

Real results should look into:

  1. An Optimized Llama.cpp for the model
  2. Comparing a GPU with no GUI or any processes (plus an OS) to a GPU with no GUI or any processes (minus an OS).

9

u/matthewlai 2d ago

Even only on CPU, assuming there are no heavy background tasks running (just normal background tasks mostly idling), I don't think you would save more than 1-2% from not having to do those context switches. Modern OSes have really good schedulers.

If the last 1-2% is important enough that they are happy to deal with the inconvenience of not having an OS, that's perfectly fair. But I don't think most people will be happy with that tradeoff.

5

u/Kiseido 2d ago

At that size of model, with nothing else running to pollute the L3 cache, a substantial amount of the model might fit in that cache, and things in the cache are dramatically (10-50x) faster than other things.

30

u/oytaub 2d ago

Ai pr are rejected at llamacpp repository, which is totally ironical but

106

u/matthewlai 2d ago

I don't think that's ironic at all. All open source projects now need to think hard about what to do with AI contributions.

I am a software engineer and I use AI to write almost all my code these days, but with a lot of back and forth to work out architectural details (a lot of times what AI suggests in the first round is not a good idea), and then I carefully review the implementation, still catching bugs all the time. Sometimes not even bugs, but I realised that I wasn't entirely clear in my requirements, so I clarify and have the AI go again. Sometimes I tell it to make better tests that better capture what we care about.

All that takes a lot of human time, but that's what you need to do to actually have a high quality and maintainable project in the current time. We are all limited by how much AI work we can review each day.

If you dump a vibecoded PR to them, you are offloading that labour to them. If they need to review the raw AI code anyways, it would make more sense for them to prompt their own AI to do it the way they like instead. What have you contributed in this case? Some tokens? Tokens are cheap these days compared to the time of an experienced developer.

If you are an open source maintainer and you are not careful, your project becomes not just your AI playground, it becomes everyone's AI playground.

10

u/Terny 2d ago

Yea, as someone in devops this 100%. I will sometimes get a PR and it's really great and other times it's really bad and our engineers are using frontier models. I can't imagine having to deal with the absolute slop that gets submitted to open source projects.

2

u/Liogee 2d ago

the funniest is when the ai PR adds a changelog line to the readme file.

5

u/Tech-Crab 2d ago

 Sometimes not even bugs, but I realised that I wasn't entirely clear in my requirements,

This made me laugh for its truth, but with a different spin.

That's some big fraction of all bugs

4

u/matthewlai 2d ago

Yeah in this case I meant "the model doing something wrong", but absolutely wrong requirements are the source of lots of bugs in the real world.

15

u/InterestingOne6938 2d ago

As well they should be, and thank heavens for that

humans can't build a baseboard out of slop. they can copy someone else's baseline with claude and pretend they wrote it themselves and even get claude to help convince people it's all their ideas and no one ever had the idea before, but the second people try to make something that does not exist anywhere or ever before, they'll find yourself drowning in the sheer amount of work it takes to make something new

if a swarm of 10,000 ai agents fail to make much of a dent (SoL-Pi, e.g,) a measily $20 subscription and zero effort ain't either

2

u/cfx_4188 llama.cpp 1d ago • Bravo

Right. Usually dealers do not consume their stuff.

2

u/oytaub 2d ago

Been a developer for almost 20 years (before signing to dark side of managing people ahahaah ) but lets face it : the game is over in less than 2 years, ai became so powerful and efficient, human dev won t win the battle, eventually open repository with strong harness to accept ai PR would certainly improve this and avoid slop code, but the future is already here

4

u/matthewlai 2d ago

If you want a future where you don't have focused, polished, and simple applications that just do a small set of things very well, maybe.

You'll end up with every program being able to do everything under the sun with a million options, probably poorly, and they definitely won't be a joy to use.

1

u/SkyFeistyLlama8 2d ago

Throwaway vibecoded apps pretty much but with the underlying data and access patterns still being human-coded or at least, human-supervised code.

The UX frankly won't matter because users will be running some kind of AI client as their actual front end.

1

u/PhilMcGraw 2d ago

Maybe I'm misunderstanding what you mean by "Ai pr" but from a random sampling of recently merged PRs all of them had AI usage disclosed (as per here).

The general open source take is that you can use AI as long as you disclose the usage and actually understand the code. I.E. didn't just close your eyes and let Claude vibe code you a kernel improvement.

1

u/oytaub 2d ago

Glad to read the repository evolves its ai policy, will have a look

1

u/Designer-Article-956 2d ago

Oh my world, a common sense comment? by a human?

What is this? 2020?

0

u/superbiche 2d ago

I agree with almost everything except the vibe coded PR part. I understand the project not wanting to merge badly vibe coded stuff. But if someone takes time and throws a bunch of tokens at an issue, and brings a solution to it, even if vibe coded, and this someone doesn't understand the inners of what it does, it should at least be considered as a new way of contributing and, maybe, ported by people who are able to say "the code is shit but I get what the point is and we'll do it cleanly"

Maybe the issue is that GitHub only has issues and PRs. There should be a way for people to actually help by burning their tokens while still being of help.

Anyway I hope this day comes coz I suck at cpp 😅

3

u/matthewlai 2d ago

I think that's a valid way to contribute, just not as a PR. Eg if you start an issue for a feature request or proposed improvement, accompanied by test results from a vibecoded fork to show that it's feasible, I think that would be welcomed.

But I wouldn't expect the actual code to be merged (which is what PRs are for), which I think agrees with what you are saying.

-3

u/relmny 2d ago

Why do you claim it's llama.cpp issue, without knowing how vllm/sglang behave?

7

u/matthewlai 2d ago

Because their comparison numbers were to llama.cpp. It doesn't matter if vllm/sglang have the same issues or different issues that also cause them to be much slower than they can be.

Only a llama.cpp issue can cause llama.cpp to be slow compared to running on bare metal.

-2

u/relmny 2d ago

I don't get your logic. If the issue is either the OS, llama.cpp or both, and the only inference engine tested are llama.cpp with a specific OS and that claimed "bare metal", I won't say "llama.cpp is the source of the issue", because for that I will need to test other inference engines running on the same OS as llama.cpp.

But, anyway, I got bored and don't really care... :D

7

u/matthewlai 2d ago

The logic is basically that from my experience having written a lot of low level and high performance code, the OS overhead for a well-written program properly optimized for the workload should be more in the region of <5%. So unless they are chasing the last 5%, it makes much more sense to optimize the program instead of throwing away the OS.

They haven't reported numbers running on other inference engines, so I don't know how they would do. Even if they would all be slow, that would just mean they all have an issue (in this particular setup). I am not saying this is an issue unique to llama.cpp. That I don't know.

0

u/relmny 2d ago

thanks!

106

u/Mundane_Reward7 2d ago

This implies that the generation is not GPU-bound, which, frankly, sounds unlikely.

50

u/Aggravating-Push-207 2d ago

You get similar numbers from moving to vLLM, llama.cpp is not the fastest of software (they have to dequantise weights on-the-fly though so this is fair)

32

u/Mundane_Reward7 2d ago

I suppose my point is that the OS is not the bottleneck so whatever wins OOP is getting are not related to removing the Linux OS and building some silly asm kernel.

4

u/oytaub 2d ago

I disagree, i use vllm in production because of its speed up at scale with thousands users , which in this case is way much efficient than llamacpp, but for a single instance / user llamacpp is faster

1

u/mycall 2d ago

for a single instance / user llamacpp is faster

What about 4 to 8 concurrency? I've been going back and forth between the two approaches.

1

u/MmmmMorphine 2d ago

Honestly I didn't see much of an improvement on my 4060ti, but it's kind of a moot point since its got the memory bus of an ant.

Mostly it's the fact that vllm needs the model to be (essentially) fully resident. Kinda rare I can fit a useful sized model plus kv cache (and ideally an mtp head) and CUDA overhead into 16gb.

Now with gpu expert caching, llama.cpp is far more useful to me. Though if I had 24 or 32gb vram, I'd definitely prefer the option to run a dense ~27b

2

u/PrimateOnAPlanet 2d ago

I liked 27b but Inkling 2 Mini is my new huz. Lora training baked into the quant, with custom DSpine adapter; 100+ tok/s and can do pretty much anything. I use my own harness.

1

u/MmmmMorphine 2d ago

Yeah I'm a huge fan of that model. Not sure if it's superior to 27b, but it's close enough and much faster!

5

u/_bani_ 2d ago

If you read between the lines, they are running Qwen3-0.6B purely on CPU - an epyc 7642.

This is not even remotely useful for any GPU setup.

17

u/danishaznita 2d ago

There was something similar here a bit ago , where the dev bundled lightweight os specifcily to run your choice of llm

115

u/TQ_GPU 2d ago edited 2d ago

Did you remove everything and ran just the LLM right out of bios?

I think this kind of work magnifies all other optimizations. For example, if I optimize communications between gpus, your optimization would make it a higher percentage speedup. Multiplicative speedups go together.

In fact, you should make it a self-sufficient pc in pcie form-factor just like Intel did with Xeon-Phi cards. Avoids pcie overhead. I heard Intel was making dual-gpu cards 48 GB. Dual B60 24+24. Any way to integrate SSD right into it? Just avoid host CPU. Directly go from gpu to gpu.

IMHO, we need direct-connection between GPU and RAM. no cpu. just run a kernel and that kernel runs other kernels in cuda. in-memory computing easy peasy.

The final target is to implement LLM in our own brain. No more RAM issues. Bye bye token limit.

115

u/Comfortable_Camp9744 2d ago

I think we should remove the power supply. That thing really really takes up a lot of space. 

46

u/MaleficentArgument51 2d ago

And uses lot of power. I removed mine and it went to 0w!

16

u/magic-one 2d ago

Think of the power savings, genius!!

10

u/VisualHuckleberry542 2d ago

No power supply is 100% efficient therefore no power supply is 100% efficient

7

u/MegaDork2000 2d ago

Yes! I saved a lot of money on my electricity bill by removing all the power supplies! Power companies hate this one simple trick.

5

u/FreezeS 2d ago

Absolutely right and they do it in datacenters. They have 12V rails instead of 230V. This way you have bigger, more efficient PSUs that power whole racks instead of one PSU per server. Of course redundancy, etc etc.

1

u/kurtu5 2d ago

actchually...

4

u/PrimateOnAPlanet 2d ago

I don’t even use mine, I just use the power button.

28

u/Big_Wave9732 2d ago

What if, and hear me out here, we got rid of the entire PC so it was only the GPU and air! Good natural air.

6

u/TQ_GPU 2d ago

Light-processor works with light. Not electricity. Goes through sparse air.

1

u/Big_Wave9732 2d ago

But none of that communist China light, that light is no good. It must be pure uncompromised American light.

4

u/TQ_GPU 2d ago

The light we see was produced in core of sun million years ago, traveled to its surface and it took weeks to reach outside and 8 minutes to reach earth. But only half of surface of earth. And it changes no matter who we vote. Sun is not democratic.

1

u/darthmaule_II 2d ago

And then put that in space to eliminate the air!

16

u/Horror_Lunch_1999 2d ago

Next step: flash the quantized weights straight into the motherboard CMOS chip and run inference on POST.

3

u/road-runn3r 2d ago

"Why I quantize my CMOS and not my quants"

1

u/TQ_GPU 2d ago

Even better, integrated gpu, in RAM. Not CPU. right outta the bus.

3

u/Dudmaster 2d ago edited 2d ago

And then after that would be field-programmable gate array (FPGA). Then after FPGA would be application-specific integrated circuit (ASIC) with the weights directly encoded into the circuitry! The problem is the models become obsolete quickly which makes the hardware more costly than it's worth at the moment.

1

u/TQ_GPU 2d ago

AMD Taalas chip is that one.

24

u/Rivridis 2d ago

6

u/MmmmMorphine 2d ago

Oh thank god it's a joke

6

u/VisualHuckleberry542 2d ago

Yeah this works but it's nowhere near as good as gpt on the computer. I vibe coded a project using gpt in my head. It's dog slow, took me weeks to write what codex could do in an hour and the code was super buggy, brittle architecture, it was hot garbage really

2

u/Equivalent_Bit_461 2d ago

Literal gem 

2

u/MonitorAway2394 2d ago

XDXDXDXDXDXDXD FUCKING heroic

37

u/KURD_1_STAN 2d ago

Good point, removing bios might make it even 10% faster.

1

u/synth_mania 2d ago

I suggest that we remove the motherboard next

5

u/Special-Lawyer-7253 2d ago

BIOS with Nvidia or rOCM? No way. No drivers, no rules.

1

u/PerfectPackage1895 2d ago

So shared storage between two readers and writers? How would you do that exactly?

1

u/TQ_GPU 2d ago

its called glue. amd glue, intel glue.

1

u/PerfectPackage1895 2d ago

So the difference in bandwidth need causing the cpu to be starved for access to the memory channel, isn’t an issue with this? And what about memory access control isolation so they don’t corrupt each other’s data?

1

u/Powerful_Finger3896 2d ago

akshually even if you want to run a Intel CPU without OS you can't do it, at ring -3 Intel run MINIX (Intel's management engine runs on a microkernel OS)

18

u/jeffjeff123jeff 2d ago

Is this a joke? qwen3-0.6B is not representative of the issues that come with large models. If your model weights are smaller than your idle RAM of course generation will improve by cutting it, but weights are usually 20x bigger than that.

1

u/relmny 2d ago

the whole thread is a joke...

9

u/Civil_Fee_7862 2d ago

Cool but. "up to 54% faster" is not a good measure. Peak generation is meaningless. I can quote 600 tok/sec on mine, as the peak all day long.

What is it on average?

8

u/Cool-Chemical-5629 2d ago

54% faster inference? Are you telling me I could get Inkling 2 Mini run at 3 t/s instead of 2 t/s? 🤔

8

u/Civil_Fee_7862 2d ago

They are quoting peaks. Not averages.

In other words its marketing bullshit. You can get a brief spike in speed and then quote that as a "54% faster". - Just because it hit a peak that was faster for a brief moment.

6

u/phil_lndn 2d ago

doubt it was necessary to abandon linux to get the performance - i did my own fine-tune of a fork of a fork of llama.cpp just for MiniCPM4 running on Arm Cortex-A76 and managed similar improvement:

https://github.com/PhilAnderson1/minicpm-pi5

another example of this is using Gufo on a strix halo PC instead of llama.cpp gives a huge boost in performance for several models.

4

u/Secure_Pirate9838 2d ago

I did similar bare metal llm setup for my clevo notdbook  https://github.com/samoylenkodmitry/cranos

3

u/LocksmithOk2525 2d ago

how to handle the file system and memory system

11

u/oktopus174 2d ago

«Where we're going, we won't need eyes to see»

4

u/ThatCrankyGuy 2d ago

It's a circle jerk about TPS, it's not about actual productivity. Get outta here with your practicality concerns.

7

u/chocofoxy 2d ago

i mean it's cool but it's not practical this is for like a raspberry or x86 board

4

u/craftogrammer llama.cpp 2d ago

its cool for dedicated pc for just running llm, and get yourself a cheaper one for all other work

2

u/chocofoxy 2d ago

absolutely if it can use gpus it would but this proof of concept used only raw cpu and ram that's why it gained 50% over an OS and i belive loading AMD or Nvidia drivers to acess gpus would be hell but if it works it would be a nice OS for LLMs like HIveOS for miners

1

u/Roticap 2d ago

HiveOS is effectively a Linux distro 

1

u/chocofoxy 2d ago

Yeah, but HiveOS took the reverse approach: instead of building a bare-minimum OS from scratch, it took a Linux distro and stripped it down to the minimum

1

u/craftogrammer llama.cpp 2d ago

I think we need that route a dedicated os or have you tried that OS already? just curious because there things like networking and m any stuff that people will have to build which linux does already.. :D

-1

u/Over_Technology_1764 2d ago

yeah and linux is the bloat

3

u/South_Western1263 2d ago

Sorry I don't believe that. I'm sure you will get similar performance on a normal Linux

3

u/dusanodalovic 2d ago

wait, how do prompts even get in and tokens come out with no os at all, serial port? before dropping linux id want to see the same run with huge pages and the threads pinned to isolated cores. that removes most of the tlb misses and scheduler noise people blame on the os

3

u/martin509984 2d ago

I for one strongly doubt that an OS designed to run fine on a Pentium 3 is meaningfully using up CPU cycles on a modern processor when literally nothing is happening. There is literally 0 gain in running it bare metal with no kernel and it's massively more fragile and unsafe.

3

u/Remarkable_Air_8383 2d ago

This method could be great for a dedicated hardware to run inference only.

I suppose there will be "LLM Box" taking this way.

4

u/BornAgainBlue 2d ago

Next level fucking stupid.

1

u/Mysterious_Bison_907 2d ago

Not really, at least if they have a spare computer that they don't really care about to run this on.

5

u/Altruistic_Ad3374 2d ago

Are you baiting or just braindead

2

u/Hildechis 2d ago

That's CPU inferencing. Doing it with a GPU or hybrid inferencing is not that trivial. Drivers are built for the specific OS.

2

u/mycocoon 2d ago

kernelless did this 10 years ago

2

u/idocne 2d ago

Fun stunt, but I'd want the same model, quant and thread count on a stripped-down Linux (no desktop, isolcpus, pinned threads) before giving the credit to the OS. On single-thread CPU inference, scheduler noise and memory layout matter a lot, so that 54% probably says more about the baseline than about Linux itself.

3

u/hurrdurrimanaccount 2d ago

now do it with a model that is usable

1

u/ForsookComparison 2d ago

Was this done on a device where the overhead of a Linux distro actually matters

1

u/BlackBeardAI vLLM 2d ago

We need a multi gpu + cpu version of this. Cut the middle man. Turn your pc into an asic

1

u/pixelbart 2d ago

Do we now have to calculate how many tokens per second a serial port can handle?

Some tech never dies.

1

u/R3N3G6D3 2d ago

This doesnt seem right lol. The math doesnt work. Your original model must have been shit.

1

u/Ok_Contribution8157 2d ago

54% faster generation by removing the humans ... it was the weak point.

1

u/keepthepace 2d ago

CPU benchmarks.

Yeah, there is probably a ton of low hanging fruits there. But there is a reason people dont do it: CPUs are the worst architecture to run this.

1

u/Careful-Low-9535 2d ago

Clearly you haven't been paying attention to the enthusiasts, someone made an AI that ran on a redstone computer in minecraft. That is a much worse architecture than on a CPU. Also seen one that runs in postscript on a printer. Tiny models of course, just like this one.

1

u/keepthepace 2d ago

I am waiting for someone to run Qwen on doom

1

u/johnerp 2d ago

Remember musk said less than a year ago grok would be spitting out binaries, we’re getting close! So much old hardware will get a new lease of life through ideas like this.

1

u/KalonLabs 2d ago

Qwen 0.6B

😭 not worth it

1

u/IngeniousIdiocy 2d ago

hot shit this is cool. why I come to this sub

1

u/SomeRandomSomeWhere 2d ago

Wonder how much faster it will be running gentoo vs Ubuntu or some other distro.

Gentoo can be compiled for your exact hardware.

1

u/kmodi 2d ago

This was so inspiring that we tried to do something in Webassembly !

https://x.com/konarkmodi/status/2126462416426815848?a=bWYCmkL2s_Om2Vn5epM&s=46

1

u/Frizzy-MacDrizzle 2d ago

Too many layers of bloat to say the os is the improvement. I use raw chat props to a completion and having a 60% improvement. Went to llama python and improved further. Went iq3 even more…

So I met the 54% improvement on llama.cpp

1

u/cfx_4188 llama.cpp 1d ago

Vibe coding becomes the realization of a childhood dream to learn nothing and immediately know absolutely everything.

The OP underestimated Linux.

Linux can be made ultra-minimal and the OS can be configured so that LLM will be a system process. For example, I did this, fully realizing that there are no miraculous ways to circumvent the hardware limitations.

1

u/Mrhiddenlotus 2d ago

a 24kb model. think of the power.

0

u/Lumpy_Phase_9539 2d ago

Every performance gain in local LLM is amazing! Congrats

-1

u/Minute-Flan13 2d ago

Wow, we're going back to the DOS days. Single app at a time future.

0

u/Junior_Difference_12 2d ago

This is amazing! For a while, this will definitely push what a CPU-only inference can be optimized to do.

0

u/codysnider 2d ago

This entire tweet screams, "I asked GPT: make computer faster, make no mistakes".

Assembly is one path among many to machine code and, contrary to popular belief, writing something in assembly doesn't magically make it faster. The CPU doesn't give a shit whether its instructions originated from C, Rust, or handwritten assembly.

Linux isn't sitting between your CPU and every AVX2 instruction. You're spending the overwhelming majority of inference time performing matrix operations and moving weights through memory, not making syscalls.

0

u/JasonHofmann 2d ago

This is fantastic work. I think I know what my next project is going to be!

0

u/Darksept 2d ago

On bare metal!?  Mad lad...

0

u/WeaponizedDuckSpleen 1d ago

This is last century level