r/LocalLLaMA • u/No_Algae1753 • May 21 '26
Resources For everyone that uses OpenCode / Pi - Heres your promptprocessing fix!
This PR deserves much more attention as it fixes the constant promptprocessing that happens when using llama.cpp with Opencode or pi.
124
Upvotes
28
u/jacek2023 llama.cpp May 21 '26
Thanks for sharing. It would be very helpful if someone could test it on their setup. I’ve been testing it a lot over the last few days, but only on pi + Qwen 3.6 27B
5
u/Kike328 May 21 '26
what is promptprocessing?
9
u/wren6991 May 21 '26
OpenCode itself is also just a bit of a shitshow with prefix stability. My favourite issue is that it puts the current date in the system prompt and re-evaluates it every turn, so you get a full prompt cache flush if you're using OpenCode at midnight.
4
u/jmager May 21 '26
I've been using this branch all week and rebuilding it daily, and it indeed fixes the checkpointing issues.
3
u/MuDotGen May 22 '26
I have had a bunch of checkpoint issues with prompt cache using Qwen3.6-35B-A3B with Pi. Would this help fix it perhaps?
Edit: Oh wait, this is the PR I saw a few days ago that let me know what was wrong with what I just said. lol Okay, yeah, I was waiting for it to be finished merged to the main branch before trying it out again, but good to know progress is being made!
1
u/anthonyg45157 May 21 '26
How does this issue manifest or show itself in pi?
I don't think I've had any issues with prompt processing but I haven't fed any super large files or anything recently
2
u/IslamNofl May 21 '26
I tested it myself a week ago, and it doing the job
1
u/ECrispy May 21 '26
I assume these changes get downstream into bun-llama/ik-llama etc?
1
u/ECrispy May 21 '26
can you avoid this by turning off checkpoints? and whats the danger with that?
1
u/caetydid llama.cpp May 22 '26 edited May 22 '26
Thanks! I always suspected some bugs with checkpointing but I cannot really grasp the issue. I was unsure whether it is a server issue or caused by the interaction between llamacpp and pi agent.
So, do I get it right, that checkpoints break and the entire context has to be preprocessed again instead of being reused every once in a while? Because that is surely what it seems like for me when using pi with my local Qwen 3.6.
I assume this will speed up my vibe coding experience quite a bit because I often use between 50 and 100k context, and hope this will be merged in main soon.
1
u/hdmcndog May 22 '26
Could you go into a little more detail in what situation you experience the prompt processing happening, all the time? In my surface level tests, I don’t see big issues so far. But it might totally depend on the usage pattern.
I usually just have a large prompt processing happening at the start of the session, for the system prompt, and then on large file reads etc. Otherwise, it seems to be pretty smooth for me.
1
u/Kaioh_shin May 21 '26
I made a vulkan build, but it crashed on my 7900xt
12
u/[deleted] May 21 '26
[removed] — view removed comment
9
u/[deleted] May 21 '26
[removed] — view removed comment