How Compaction Works in Pi
earendil.com
How Compaction Works in Pi
1–10 of 100 posts
Re: How Compaction Works in Pi
#2Re: How Compaction Works in Pi
#3Re: How Compaction Works in Pi
#4See: https://github.com/earendil-works/pi/blob/main/packages/codi...
Re: How Compaction Works in Pi
#5Can someone recommend a Hermes alternative that is less token hungry? Pi did not work well for my use case.
Re: How Compaction Works in Pi
#6I pretty much just start a new session whenever i fill the context.
Re: How Compaction Works in Pi
#7I get it into 1M+ routinely on local models with operations between 50k-85k
Re: How Compaction Works in Pi
#8Can someone recommend a Hermes alternative that is less token hungry? Pi did not work well for my use case.
Re: How Compaction Works in Pi
#9Re: How Compaction Works in Pi
#10One trick I find useful is to have one model with two KV caches running and while first cache has produced tokens, second cache immediately summarizes them during input tokens are being generated (tools time), then harness switches to the second KV cache which takes newly produced input tokens while KV in first cache is getting replaced with compacted summary tokens. This is a kind of ping pong, so we trade more space for less time. Still experimenting but it looks it works, and nice bonus it improves GPU utilization. Btw I have my own harness and model serving code, but it can be easily implemented in any other harness and model server.