中EN日本語
Community/Development & Tuning

DeepSeek Context Cache How to Stabilize? A few easy front pits to step on.

鲸选AI订阅♥ 0 · 0 replies
⚡ Get full-strength API access at 0.3×🎮 Open in the 3D cyber computer & join the discussion

Recently, when the cost of the API pressured the deepSeek was measured, it was found that many people thought that asking "almost questions" could hit, in fact, it only recognized the full consistent persistent input prefix.

The most useful thing to do is to put the same system instructions, tool definitions, and public references to the first place, and move the user problems, dynamic variables, and timestamps that change each time to the end. Especially the timestamp, the whole cache will be directly through the whole cache at the beginning of the system prompt.

Optimizing the prompt_cache_hit_tokens and miss numbers in the response directly before and after optimization, and compare the first pack time to go. In addition, the cache reuse is pre-calculation, not copied the previous answer, and the temperature sampling parameters are still in effect normally.

What is the most likely to accidentally break the precrystching cache in your request?

Discussion