Do you find `ik_llama.cpp` gives you better performance?

#1
by jukofyork - opened

Are you running everything on CPU or using a GPU at the same time?

For mainline llama.cpp I can get around 32 tokens/s for prompt processing using Q4_K shared experts and have to keep any batch less than ~2.8K tokens in RAM (I've hacked the ludicrously low 32 token offload threshold).

I had hoped the new ik_llama.cpp4bit quant(s) would speed things up for PP, but it actually was slightly worse than mainline using Q4_K (IIRC ~25 tokens/s for RAM/CPU prompt processing) and everything else was way worse (IIRC token generation was about 50% of mainline and offloaded batches were about 80% of mainline).

It was about a month ago I tried this and I did read the guides ubergarm made and tried a few variations on the 4bit "R" quants and all the different MLA/MOE command line args, but overall it was disappointing :/

Just wondering if I should try again or if the boost people are seeing is from sub-4bit quants or CPU-only inference?

I should add that Q4_K seems to work quite a bit better on mainline llama.cpp usingCascade Lake, Skylake and Broadwell Xeons, and mainline Q4_0 and IQ4_XS get a similar ~25 tokens/s to ik_llama.cpp - making me wonder if there has been some optimisation for Q4_K that is missing in ik_llama.cpp?

Sorry I missed these messages earlier.

Are you running everything on CPU or using a GPU at the same time?

GPU+GPU

Do you find ik_llama.cpp gives you better performance?

So mainline doesn't have -fmoe (fused moe) or -mla3. These features drastically reduce vram usage, allowing me to offload more layers to the GPUs.
If I'm running 100% on GPU, then no, performance is similar (I've read that mainline is actually faster). But prompt processing is a lot quicker for CPU+GPU.

Apparently it's also much faster for CPU-only than mainline, though I haven't tested this myself.

And these ks quants give me much better quality than the equivalent sized quants I could fit on mainline. Eg. with a 280GB IQ_XS or unsloth quant, the model doesn't think for as long, and the creative writing suffers.

If you give it a try, look up Ubergarm's quants, he tests them meticulously. Here's his Kimi-K2 quant: https://huggingface.co/ubergarm/Kimi-K2-Instruct-GGUF

See the IQ3_KS perplexity is actually lower than Unsloth's UD-Q4_K_XL? It's probably a lot better than Q4_0 though I haven't seen a benchmark.

image.png

Perplexity certainly isn't everything for creative writing, but anecdotally, I'm finding iq3_ks to be as good as Q4_K with deepseek models, but not the new Qwen3 MoE
I tend to use iq2_ks when I want >200t/s prompt processing, otherwise iq3_ks.

Sign up or log in to comment