by Tiberium · 1y ago · 0 comments
https://docs.claude.com/en/docs/build-with-claude/prompt-cac...
https://ai.google.dev/gemini-api/docs/caching
If I'm missing something about how inference works that explains why there is still a cost for cached tokens, please let me know!
TtFT will get slower if you export kv cache to SSD.
1) low latency desired, long user prompt 2) function runs many parallel requests, but is not fired with common prefix very often. OpenAI was very inconsistent about properly caching the prefix for use across all requests, but with Anthropic it’s very easy to pre-fire
for example if a user sends a large number of tokens, like a file, and a question, and then they change the question.