Inference
prefix caching in llama.cpp: worth it? - Printable Version

+- Inference (https://www.datasculpting.ai/inference)
+-- Forum: Inference Engines (https://www.datasculpting.ai/inference/forumdisplay.php?fid=9)
+--- Forum: llama.cpp / GGUF (https://www.datasculpting.ai/inference/forumdisplay.php?fid=35)
+--- Thread: prefix caching in llama.cpp: worth it? (/showthread.php?tid=1240)

Pages: 1 2


prefix caching in llama.cpp: worth it? - northcraft90 - 10-14-2026

This keeps coming up in conversation so I figured I'd start a thread.

It feels like the conversation has shifted hard toward inference and serving details lately, and honestly that makes sense once you start dealing with consumer GPUs.

Wondering if this is just where the whole space is heading now.

I care more about stability than squeezing the last possible tokens/sec out of it.


Re: prefix caching in llama.cpp: worth it? - phasescope - 10-15-2026

Quote:This keeps coming up in conversation so I figured I'd start a thread.

A couple things I'd check first. If you're on TensorRT-LLM, I'd confirm the version first and then reduce variables until the behavior is obvious.


Re: prefix caching in llama.cpp: worth it? - dockridge - 10-15-2026

Appreciate the detail. The pattern around INT4 has been pretty similar for me.


Re: prefix caching in llama.cpp: worth it? - pixelcrate82 - 10-16-2026

Not sure I agree there. I get why that seems right, but on 4090 the bottleneck felt elsewhere. Worth testing the simpler explanation before adopting the more interesting one.


Re: prefix caching in llama.cpp: worth it? - latentcraft - 10-16-2026

Interesting, I hadn't tried that. I ended up in about the same place using TensorRT-LLM. I got better results once I stopped chasing one metric and just looked at whether the workflow felt usable.


Re: prefix caching in llama.cpp: worth it? - bytesupply76 - 10-16-2026

That matches what I was seeing. The pattern around tail latency has been pretty similar for me. The biggest change for me was simplifying the stack instead of adding one more optimization layer.


Re: prefix caching in llama.cpp: worth it? - latentcraft - 10-16-2026

I hit almost the same issue last night.

There are a few different conversations hiding inside this thread, so being explicit about the goal helps.


Re: prefix caching in llama.cpp: worth it? - northcraft90 - 10-16-2026

that fixed it for me too.


Re: prefix caching in llama.cpp: worth it? - mlxgarden - 10-17-2026

I don't think that's the whole story. I've seen people blame batch size when the real issue was much more mundane.


Re: prefix caching in llama.cpp: worth it? - embershed99 - 10-17-2026

Quote:I don't think that's the whole story. I've seen people blame batch size when the real issue was much more mundane.

I hit almost the same issue last night.