MoE CPU-offload benchmark on Deepseek V4/Gemma4/Qwen/GPT-OSS — TensorSharp vs llama.cpp
Mirrored from r/LocalLLaMA for archival readability. Support the source by reading on the original site.
| TensorSharp's MoE CPU-offload feature has been merged into main. Here is the parameters description of this feature: Mixture-of-Experts CPU offload: --n-cpu-moe <N> | -ncmoe <N> Keep the routed MoE expert weights of the first N layers in system RAM and multiply them on the CPU; attention, norms, the router and the shared expert stay on the accelerator. This is what makes a 35B-A3B MoE fit beside a long-context KV cache on a 12-16 GB card. Pass 'all' for every layer. Default: 0 (everything on the accelerator; TS_N_CPU_MOE env var overrides). Example: --n-cpu-moe 32 --cpu-moe | -cmoe Shorthand for --n-cpu-moe all: every routed expert stays in system RAM. Default: off (TS_CPU_MOE env var overrides). Example: --cpu-moe To measure its performance, I ran benchmark to compare TensorSharp with llama.cpp, and here is the result. The completed benchmark report has been checked-in: https://github.com/zhongkaifu/TensorSharp/blob/main/docs/moe_cpu_offload_benchmark.md Host and software
Results by modelRatios are TensorSharp / llama.cpp: >1.0x means TensorSharp is faster, and for VRAM >1.0x means TensorSharp is heavier. Gemma 4 26B-A4B it (UD-IQ4_XS, 30 MoE layers)
Qwen 3.5 35B-A3B (UD-IQ4_XS, 48 MoE layers)
GPT-OSS 20B (Q8_0 / MXFP4, 24 MoE layers)
DeepSeek V4 Flash (UD-Q8_K_XL, 5 shards / 150.7 GiB, 43 layers, both GPUs)
TensorSharp is a native open-source inference engine for running GGUF LLMs locally, with CUDA, Vulkan, Metal, OpenAI-compatible APIs, continuous batching, speculative decoding, and multimodal support. Github repo: https://github.com/zhongkaifu/TensorSharp Thank you for checking out it and starring the project! Any feedback is really appreicated. [link] [comments] |
More from r/LocalLLaMA
-
Qwen 3.8 Flash Next locally on simple mobile phone at 3.5 tok/s
Aug 30
-
Unpopular opinion Qwen 3.8 is hard to understand
Aug 30
-
Qwen3.8-Flash-Next turns 4xR9700 into a local AI powerhouse! 120 t/s TG and 12k t/s PP single request with optimized vLLM
Aug 30
-
Oh so that's where my PCIe lanes went...
Aug 30
Discussion (0)
Sign in to join the discussion. Free account, 30 seconds — email code or GitHub.
Sign in →No comments yet. Sign in and be the first to say something.