Hacker News new | ask | show | jobs
by jdb9001 53 days ago
Every few weeks, someone stumbles on what llama.cpp has had for years again, and reimplements it. I'm not sure why.
5 comments

I have one of my own. My reason for this is that you can get up to 2x performance compared to llama.cpp on the same model weights. It is optimized for single model to serve it well.
I did, the sd.cpp take too much time on my laptop to generate image, the issue is known and it did not seem like it gonna be resolved, so I build my own, and that's why https://github.com/netdur/qwen-image-cplus
Have you considered contributing upstream?
llama.cpp has strict policies on AI-assisted contributions. Most of these specialization projects are done by coding agents. So llama.cpp won't take them (which is fair).
No, it doesn't. AI contributions are welcome if you understand the code. Ping me directly if you want to have something upstreamed.
> if you understand the code

Well, I don't mean to sound rude or anything but that can be a lot to expect from maintainers of those projects.

As I said, it's better for projects like llama.cpp to be selective in this regard.

Well even that is okay. I can use my agent to extract something useful from it.
llama.cpp is a generalized inference engine; therefore, model-specific optimizations should remain outside its core architecture. When developing a bespoke inference application, it is standard practice to fuse operations and heavily optimize the compute kernels for the specific target model.
Most of these custom engines exist because the more general purpose projects make contributing much harder than maintaining a custom engine (somewhat understandably). Consequently they take forever to adopt optimizations, and it is somewhat pointless if llama.cpp or vllm only reach performance parity with custom engines when the LLM architectures being optimized for are no longer the best ones.

The benefit of llama.cpp etc is just ease of use for people not already familiar with the local AI landscape.

Because with AI everybody can reinvent the wheel with ease
If you had read TFA, you would have seen that the reason is obvious.

The speed obtained by this optimized program is many times higher than the current speed reached by llama.cpp when reading weights from an SSD.

It is unlikely that llama.cpp will include any time soon code capable of reading SSDs at the speed limited by hardware.

If the SSD files are memory-mapped, you need to provide at appropriate points in the program the correct madvise hints (the Linux-specific advices, not the useless POSIX advices) to free the unused memory and populate the memory that will be soon used, in such a way as to guarantee that there will never be any page faults while reading the weights.

Otherwise, you must used asynchronous I/O with O_DIRECT, as in this project, which requires a significant reorganization of the program in comparison with using memory-mapped files, to guarantee that the desired data is always available at the right time and the inference computation overlaps perfectly with reading continuously from the SSDs.

Probably because its poorly documentrd.
it does it automatically. not sure what kind of documentation ppl need.
If i run ./llama-server -m huge-model.gguf it'll just work when the model is larger than ram? Ok