Help me understand KV caching
reddit.com·21h·
Discuss: r/LocalLLaMA
Flag this post

Hello good people of r/LocalLLaMA

I’m buidling an agent that can call my app’s APIs (exposed as tools) and run automated test cases. Running everything on a CPU-only machine (8GB RAM) with LM Studio hosting Qwen 3 4B Instruct (Q4_K_M / Q8). I talk to it from a C# client using the OpenAI API format.

Performance is tiny but fine (1–2 tok/sec) ok for tool calling, I’m surprised it even works:)

But I noticed something: after the first turn, the llm response is noticably a bit faster.

Did some reading, found out this is probably KV cache which from what little I understand:

Is a processed prefix (system prompt + tool schemas + history) that model keeps, so it doesn’t re-do all the attention work every turn.

BUT it only works if …

Similar Posts

Loading similar posts...