Does it support CPU MoE offloading?
@Nekotekina So, according to this function:
https://github.com/antirez/ds4/blob/80ebbc396aee40eedc1d829222f3362d10fa4c6c/ds4_help.c#L146-L186
There is no way or command line argument to offload MoE layers or experts to CPU, or system RAM. What you can only do instead is using --ssd-streaming and other similar options in your ds4 or ds4-server command according to these lines of code at https://github.com/antirez/ds4/blob/80ebbc396aee40eedc1d829222f3362d10fa4c6c/ds4_help.c#L165-168
They basically do DirectStorage but for weights.
We keep asking for the --n-cpu-moe implementation but 'till now we got no answers. 🙄
llama.cpp got proper DS4 support, not sure what's the point of this project anymore
We keep asking for the --n-cpu-moe implementation but 'till now we got no answers. 🙄
There is no CPU-side MoE layers setting. DS4 was a DeepSeek V4 runtime that was first designed to run on Apple Silicon, and the early code assumed that the CPU and GPU share the same RAM. You can use SSD streaming instead.
We keep asking for the --n-cpu-moe implementation but 'till now we got no answers. 🙄
There is no CPU-side MoE layers setting. DS4 was a DeepSeek V4 runtime that was first designed to run on Apple Silicon, and the early code assumed that the CPU and GPU share the same RAM. You can use SSD streaming instead.
That's why we are asking to implement it. It's pretty ironic to say the goal is "Democratizing AI" while "leaving out" users with consumer hardware.
As nice as ssd-streaming is, it's not a valid solution. On my machine (128GB ram + 16GB VRAM) i can get ~5tk/s using DS4. Using the same Antirez iq2 model on llama.cpp i get ~15tk/s.
We keep asking for the --n-cpu-moe implementation but 'till now we got no answers. 🙄
There is no CPU-side MoE layers setting. DS4 was a DeepSeek V4 runtime that was first designed to run on Apple Silicon, and the early code assumed that the CPU and GPU share the same RAM. You can use SSD streaming instead.
That's why we are asking to implement it. It's pretty ironic to say the goal is "Democratizing AI" while "leaving out" users with consumer hardware.
As nice as ssd-streaming is, it's not a valid solution. On my machine (128GB ram + 16GB VRAM) i can get ~5tk/s using DS4. Using the same Antirez iq2 model on llama.cpp i get ~15tk/s.
I'm extremely sorry. This project actually assumes a unified memory system. Normal PCs with dedicated GPUs do not use unified memory. This project also only uses ARM64 NEON intrinsics, which is basically, a tell-tale sign of being Apple-Silicon-first.
It seems to have MoE caching, which is quite superior: copy an expert into vram when needed, run it, leave it in vram unless there's no vram left and some other expert needs the space. Some other projects (llama.cpp forks) have shown that this works -- there are certain experts that are more frequently needed for a given output. With this and streaming from ssd you can potentially run VERY large MoE's. If llama.cpp and vllm would grow that feature, open weight AI would be a very different landscape.
It seems to have MoE caching, which is quite superior: copy an expert into vram when needed, run it, leave it in vram unless there's no vram left and some other expert needs the space. Some other projects (llama.cpp forks) have shown that this works -- there are certain experts that are more frequently needed for a given output. With this and streaming from ssd you can potentially run VERY large MoE's. If llama.cpp and vllm would grow that feature, open weight AI would be a very different landscape.
Yeah. I agree with that.
Sadly I discovered that ds4 won't do this with multi-gpu setups.
Sadly I discovered that ds4 won't do this with multi-gpu setups.
Just open up a new issue.