Hey everybody, brand new to running local LLMs, so I'm learning as I go. Also brand new to lemmy.
I have a 16 GB VRAM card, and I was running some models that would overflow 16GB by using the CPU+RAM to run some of the layers. It worked, but was very slow, even for only a few layers.
Well I noticed llama.cpp has an rpc-server feature, so I tried it. It was very easy to use. Lin here, but probably similar on Win or Mac. I had an older gaming rig sitting around with a GTX 1080 in it. Much slower than my 4080, but using it to run a few layers is still FAR faster than using the CPU. Night and day almost.
The main drawbacks I've experienced so far are,
-
By default it tries to split the model evenly between machines. That's fine if you have the same card in all of them, but I wanted to put as much of the model as possible on the fastest card. You can do that using the --tensor-split parameter, but it requires some experimenting to get it right.
-
It loads the rpc machine's part of the model across the network every time you start the server, which can be slow on 1 gigabit network. I didn't see any way to tell rpc-server to load the model from a local copy. It makes my startups go from 1-2 seconds, up to like 30-50 sec.
-
Q8 quantized KV cache works, but Q4 does not.
Lots of people may not be able to run 2 or 3 GPUs in one PC, but might have another PC they can add over the network. Worth a try, I'd say, if you want more VRAM space.
What's the advantage over Ollama (on Linux)? I've tried a few different combinations of Nvidia cards and each time, they all got used to their full potential (it seemed)
Im in the process of working out how to combine an AMD card with an Nvidia
I'm very new to this so someone more knowledgeable should probably answer this for real.
My impression was that ollama somehow uses the llama.cpp source internally, but wraps it up to provide features like auto-downloading of models. I didn't care about that, but I liked the very tiny dependency footprint of llama.cpp. I haven't tried ollama for network inference.
There are other backends too which support network inference, and some posts allege they are better for that than llama.cpp is. vllm and ... exllama or something like that? I haven't looked into either of them. I'm running on inertia so far with llama.cpp, since it was so easy to get going and I'm kinda lazy.
That's a pretty good summation unless you want a more technical breakdown like how it handles weights, or how it runs connectors for multi node setups.
Check out mozillas project for LLMs. It's a nice halfway point between llama.cpp and openwebui.
https://github.com/Mozilla-Ocho/llamafile