by ccgibson · 1mo ago · 0 comments
The harness, alongside the model, decides how much prefill work gets wasted. Across clients, uncached input ranged from 1.6% (deepseek-harness) to 11.1%. A mostly uncached request uses roughly twice the energy of a cached one of the same size.
Past 128k tokens, a turn that re-reads over half its prompt costs about as much prefill as 600 normal turns at that depth.
Every cache break in our lab came from a harness editing something it had already sent, such as changing the date in the system prompt.
Happy to discuss the methodology.
What would be helpful would be a cheap API call that would give me the energy cost estimates:
> Given some prefix-cache uuid, what is the cost (in mW of GPU energy) of adding X tokens that will branch off from what's been cached at offset Y tokens.
Suppose at some turn n, I read a file and pull it into the context. Now at turn n+m, I discover that the file has mutated on disk. The most energy efficient option might be any of these:
1. Replace the content of the file in the cache
2. Append the new file to the end of the cache
3. Add a thing to the context saying the file has been updated.
4. Compact memory then do option #3
As a harness builder, it's pretty hard for me to pick the most energy efficient strategy - I assume every model has a different cost for prefill vs decode and I also expect that a provider (an inference cloud) might have slightly different implementations that would impact how expensive a prefix-cache miss is.
Ofcourse, I also need to target aggregators like openRouter because as a solo hobbyist harness builder, it's really hard for me to track every cloud's unique API. Then there's the fact that I'm optimizing for lowest billed cost, not lowest energy consumption.
I'm waiting for the industry to standardize on a good way to express these in an API so that I can start doing these tradeoffs at runtime in my harness.
It's strange that people who have LLMs write entire articles for them often claim this. It might be true that you prompted it with your ideas, but the result is still in its own style, and style (and it variety) is why we prefer to read human text.